diff --git a/CHANGELOG.md b/CHANGELOG.md index 8914d770..347d4218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # Changelog +## 9.1.0 (2026-09-11) + +### Features + +#### Use specific sub-endpoints URLs for create /instalment_schedules: with_schedule and with_dates + +The two variants for creating an instalment_schedule were surfaced as separate functions. However, they both went to the same URL and endpoint on the backend. + +This created some bugs in generating our openapi schema and therefore our API reference documentation. + +Therefore, we've added specific URLs for each endpoint aliased to the original one: `POST /instalment_schedules/with_dates` or `POST /instalment_schedules/with_schedule`. + +The existing POST /instalment_schedules endpoint is unchanged and will remain available for the foreseeable future. + +Client libraries will now use the specific endpoint matching the method - if you are stubbing the HTTP call you may need to update those stubs. + ## 9.0.2 (2026-09-09) ### Fixes diff --git a/package-lock.json b/package-lock.json index 4c6a3d16..fa5c2dff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gocardless-nodejs", - "version": "9.0.2", + "version": "9.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gocardless-nodejs", - "version": "9.0.2", + "version": "9.1.0", "license": "MIT", "dependencies": { "got": "^11.8.6", diff --git a/package.json b/package.json index e02ea97f..7b209128 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "9.0.2", + "version": "9.1.0", "description": "Node.js client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments", "author": "GoCardless Ltd ", "repository": { diff --git a/src/codeSamples/instalment_schedulesCodeSamples.test.ts b/src/codeSamples/instalment_schedulesCodeSamples.test.ts index ede8da77..942ed1b0 100644 --- a/src/codeSamples/instalment_schedulesCodeSamples.test.ts +++ b/src/codeSamples/instalment_schedulesCodeSamples.test.ts @@ -34,7 +34,7 @@ describe('InstalmentSchedules Code Samples', () => { test('create_with_dates code sample executes without error', async () => { // Convert :param placeholders to regex wildcards for flexible matching - const stubUrl = '/instalment_schedules'; + const stubUrl = '/instalment_schedules/create_with_dates'; const pathPattern = new RegExp('^' + stubUrl.replace(/:[\w]+/g, '[^/?]+') + '(?:\\?.*)?$'); // Mock response - repeat multiple times to handle code samples with multiple API calls @@ -85,7 +85,7 @@ describe('InstalmentSchedules Code Samples', () => { test('create_with_schedule code sample executes without error', async () => { // Convert :param placeholders to regex wildcards for flexible matching - const stubUrl = '/instalment_schedules'; + const stubUrl = '/instalment_schedules/create_with_schedule'; const pathPattern = new RegExp('^' + stubUrl.replace(/:[\w]+/g, '[^/?]+') + '(?:\\?.*)?$'); // Mock response - repeat multiple times to handle code samples with multiple API calls diff --git a/src/constants.ts b/src/constants.ts index fccd49b9..70998c0f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -3,7 +3,7 @@ enum Environments { Sandbox = 'SANDBOX', } -const CLIENT_VERSION = '9.0.2'; +const CLIENT_VERSION = '9.1.0'; const API_VERSION = '2015-07-06'; export { Environments, CLIENT_VERSION, API_VERSION }; diff --git a/src/services/instalmentScheduleService.ts b/src/services/instalmentScheduleService.ts index 1997c6ac..a435427c 100644 --- a/src/services/instalmentScheduleService.ts +++ b/src/services/instalmentScheduleService.ts @@ -250,7 +250,7 @@ export class InstalmentScheduleService { ): Promise { const urlParameters = []; const requestParams = { - path: '/instalment_schedules', + path: '/instalment_schedules/create_with_dates', method: 'post', urlParameters, requestParameters, @@ -276,7 +276,7 @@ export class InstalmentScheduleService { ): Promise { const urlParameters = []; const requestParams = { - path: '/instalment_schedules', + path: '/instalment_schedules/create_with_schedule', method: 'post', urlParameters, requestParameters,