Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
<!-- This file is generated, please add to it using `knope document-change` in the client-library-templates repo -->
# Changelog

## 3.8.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.

## 3.7.5 (2026-09-09)

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion gocardless_pro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from .client import Client

__version__ = '3.7.5'
__version__ = '3.8.0'

4 changes: 2 additions & 2 deletions gocardless_pro/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _default_headers(self):
'Authorization': 'Bearer {0}'.format(self.access_token),
'Content-Type': 'application/json',
'GoCardless-Client-Library': 'gocardless-pro-python',
'GoCardless-Client-Version': '3.7.5',
'GoCardless-Client-Version': '3.8.0',
'User-Agent': self._user_agent(),
'GoCardless-Version': '2015-07-06',
}
Expand All @@ -181,7 +181,7 @@ def _user_agent(self):
python_version = '.'.join(platform.python_version_tuple()[0:2])
vm_version = '{}.{}.{}-{}{}'.format(*sys.version_info)
return ' '.join([
'gocardless-pro-python/3.7.5',
'gocardless-pro-python/3.8.0',
'python/{0}'.format(python_version),
'{0}/{1}'.format(platform.python_implementation(), vm_version),
'{0}/{1}'.format(platform.system(), platform.release()),
Expand Down
4 changes: 2 additions & 2 deletions gocardless_pro/services/instalment_schedules_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def create_with_dates(self,params=None, headers=None):
Returns:
InstalmentSchedule
"""
path = '/instalment_schedules'
path = '/instalment_schedules/create_with_dates'

if params is not None:
params = {self._envelope_key(): params}
Expand Down Expand Up @@ -91,7 +91,7 @@ def create_with_schedule(self,params=None, headers=None):
Returns:
InstalmentSchedule
"""
path = '/instalment_schedules'
path = '/instalment_schedules/create_with_schedule'

if params is not None:
params = {self._envelope_key(): params}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name = 'gocardless_pro',
version = '3.7.5',
version = '3.8.0',
packages = find_packages(exclude=['tests']),
install_requires = ['requests>=2.34.2'],
python_requires = '>=3.6',
Expand Down
4 changes: 2 additions & 2 deletions tests/code_samples/instalment_schedules_code_samples_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@responses.activate
def test_instalment_schedules_create_with_dates_code_sample():
# Convert :param placeholders to regex wildcards for flexible matching
stub_url = '/instalment_schedules'
stub_url = '/instalment_schedules/create_with_dates'
url_pattern = re.compile('https://api.gocardless.com' + re.sub(r':[\w]+', r'[^/]+', stub_url))
# Mock response - repeat multiple times to handle code samples with multiple API calls
response_body = { 'instalment_schedules': {} }
Expand Down Expand Up @@ -82,7 +82,7 @@ def test_instalment_schedules_create_with_dates_code_sample():
@responses.activate
def test_instalment_schedules_create_with_schedule_code_sample():
# Convert :param placeholders to regex wildcards for flexible matching
stub_url = '/instalment_schedules'
stub_url = '/instalment_schedules/create_with_schedule'
url_pattern = re.compile('https://api.gocardless.com' + re.sub(r':[\w]+', r'[^/]+', stub_url))
# Mock response - repeat multiple times to handle code samples with multiple API calls
response_body = { 'instalment_schedules': {} }
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/instalment_schedules.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

"create_with_dates": {
"method": "POST",
"path_template": "/instalment_schedules",
"path_template": "/instalment_schedules/create_with_dates",
"url_params": [],
"body": {"instalment_schedules":{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000}}
},
"create_with_schedule": {
"method": "POST",
"path_template": "/instalment_schedules",
"path_template": "/instalment_schedules/create_with_schedule",
"url_params": [],
"body": {"instalment_schedules":{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000}}
},
Expand Down
Loading