Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list_for_billing_request doesn't take in a billing request ID #177

Open
Jon889 opened this issue Apr 5, 2024 · 0 comments
Open

list_for_billing_request doesn't take in a billing request ID #177

Jon889 opened this issue Apr 5, 2024 · 0 comments

Comments

@Jon889
Copy link

Jon889 commented Apr 5, 2024

I'm trying to use list_for_billing_request as documented here in step 5 https://developer.gocardless.com/billing-requests/billing-request-actions:

const constants = require('gocardless-nodejs/constants');
const gocardless = require('gocardless-nodejs');
const client = gocardless('your_access_token_here', constants.Environments.Sandbox);

// List of billing request institutions for a country code.
const institutions = await client.institutions.list_for_billing_request("BR123", { countryCode: 'GB'});

I switched to using Typescript after that code didn't work, and it seems there just isn't a first argument for the billing request ID.

It's defined like so, ids in InstitutionListForBillingRequestRequest is for ids of the institutions. Also you can see it's country_code not countryCode as in the documentation.

interface InstitutionListForBillingRequestRequest {
    country_code: string;
    ids?: string[];
    search?: string;
}
export declare class InstitutionService {
    private api;
    constructor(api: any);
    list(requestParameters: InstitutionListRequest): Promise<InstitutionListResponse>;
    list_for_billing_request(requestParameters: InstitutionListForBillingRequestRequest): Promise<InstitutionListResponse>;
}

No matter how I try to call it, I get an error saying resource not found and you can see the path the request is made to is:

/billing_requests/:identity/institutions?country_code=gb

I can't see anyway to get the ID of the billing request in place of the :identity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant