Skip to content

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

@Jon889

Description

@Jon889

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions