Skip to content
Open
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
2 changes: 0 additions & 2 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ Customer notifications
.. code:: python

# Handle a notification
client.customer_notifications.handle('PCN123', params={...})
client.customer_notifications.handle('EV1D18JEXAMPLE', params={...})

Events
''''''''''''''''''''''''''''''''''''''''''
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.5.0'
__version__ = '3.6.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.5.0',
'GoCardless-Client-Version': '3.6.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.5.0',
'gocardless-pro-python/3.6.0',
'python/{0}'.format(python_version),
'{0}/{1}'.format(platform.python_implementation(), vm_version),
'{0}/{1}'.format(platform.system(), platform.release()),
Expand Down
7 changes: 7 additions & 0 deletions gocardless_pro/resources/customer_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def metadata(self):
return self.attributes.get('metadata')


@property
def payer_name_verification_result(self):
return self.attributes.get('payer_name_verification_result')


@property
def trusted_recipient(self):
return self.attributes.get('trusted_recipient')
Expand Down Expand Up @@ -119,3 +124,5 @@ def customer(self):





7 changes: 7 additions & 0 deletions gocardless_pro/resources/institution.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ def name(self):
return self.attributes.get('name')


@property
def roles(self):
return self.attributes.get('roles')


@property
def status(self):
return self.attributes.get('status')
Expand Down Expand Up @@ -88,3 +93,5 @@ def single(self):





14 changes: 14 additions & 0 deletions gocardless_pro/resources/verification_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def company_number(self):
return self.attributes.get('company_number')


@property
def country_code(self):
return self.attributes.get('country_code')


@property
def description(self):
return self.attributes.get('description')
Expand All @@ -66,6 +71,13 @@ def postal_code(self):
return self.attributes.get('postal_code')


@property
def region(self):
return self.attributes.get('region')







Expand Down Expand Up @@ -98,3 +110,5 @@ def creditor(self):





7 changes: 4 additions & 3 deletions gocardless_pro/services/balances_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class BalancesService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List balances.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of
balances for a given creditor. This endpoint is rate limited to 60
requests per minute.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of balances for a given creditor. This endpoint is rate limited to
60 requests per minute.

Args:
params (dict, optional): Query string parameters.
Expand Down
4 changes: 2 additions & 2 deletions gocardless_pro/services/bank_account_details_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def get(self,identity,params=None, headers=None):
format described in RFC 7516.

You must specify a `Gc-Key-Id` header when using this endpoint. See
[Public Key
Setup](https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup)
Public Key Setup
(https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup)
for more details.

Args:
Expand Down
16 changes: 9 additions & 7 deletions gocardless_pro/services/bank_details_lookups_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ def create(self,params=None, headers=None):
account number match the details held by
the relevant bank.

If your request returns an [error](#api-usage-errors) or the
`available_debit_schemes`
If your request returns an error
(https://developer.gocardless.com/api-reference/#api-usage-errors) or
the `available_debit_schemes`
attribute is an empty array, you will not be able to collect payments
from the
specified bank account. GoCardless may be able to collect payments from
an account
even if no `bic` is returned.

Bank account details may be supplied using [local
details](#appendix-local-bank-details) or an IBAN.
Bank account details may be supplied using local details
(https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
or an IBAN.

_ACH scheme_ For compliance reasons, an extra validation step is done
ACH scheme For compliance reasons, an extra validation step is done
using
a third-party provider to make sure the customer's bank account can
accept
Expand All @@ -50,8 +52,8 @@ def create(self,params=None, headers=None):
customer is requested to adjust the account number/routing number and
succeed in this check to continue with the flow.

_Note:_ Usage of this endpoint is monitored. If your organisation
relies on GoCardless for
Note: Usage of this endpoint is monitored. If your organisation relies
on GoCardless for
modulus or reachability checking but not for payment collection, please
get in touch.

Expand Down
5 changes: 3 additions & 2 deletions gocardless_pro/services/billing_request_templates_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ class BillingRequestTemplatesService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List Billing Request Templates.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
Billing Request Templates.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your Billing Request Templates.

Args:
params (dict, optional): Query string parameters.
Expand Down
21 changes: 10 additions & 11 deletions gocardless_pro/services/billing_requests_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ class BillingRequestsService(base_service.BaseService):
def create(self,params=None, headers=None):
"""Create a Billing Request.

<p class="notice"><strong>Important</strong>: All properties associated
with `subscription_request` and `instalment_schedule_request` are only
supported for ACH and PAD schemes.</p>
Important: All properties associated with subscription_request and
instalment_schedule_request are only supported for ACH and PAD schemes.

Args:
params (dict, optional): Request body.
Expand Down Expand Up @@ -50,8 +49,7 @@ def create(self,params=None, headers=None):
def collect_customer_details(self,identity,params=None, headers=None):
"""Collect customer details.

If the billing request has a pending
<code>collect_customer_details</code>
If the billing request has a pending collect_customer_details
action, this endpoint can be used to collect the details in order to
complete it.

Expand Down Expand Up @@ -85,7 +83,7 @@ def collect_bank_account(self,identity,params=None, headers=None):
"""Collect bank account details.

If the billing request has a pending
<code>collect_bank_account</code> action, this endpoint can be
collect_bank_account action, this endpoint can be
used to collect the details in order to complete it.

The endpoint takes the same payload as Customer Bank Accounts, but
Expand All @@ -98,7 +96,7 @@ def collect_bank_account(self,identity,params=None, headers=None):
included in the payload along with the
country_code.

_ACH scheme_ For compliance reasons, an extra validation step is done
ACH scheme For compliance reasons, an extra validation step is done
using
a third-party provider to make sure the customer's bank account can
accept
Expand All @@ -107,8 +105,8 @@ def collect_bank_account(self,identity,params=None, headers=None):
customer is requested to adjust the account number/routing number and
succeed in this check to continue with the flow.

_BACS scheme_ [Payer Name
Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB)
BACS scheme Payer Name Verification
(https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB)
is enabled by default for UK based bank accounts, meaning we verify the
account holder name and bank account
number match the details held by the relevant bank.
Expand Down Expand Up @@ -214,8 +212,9 @@ def cancel(self,identity,params=None, headers=None):
def list(self,params=None, headers=None):
"""List Billing Requests.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
billing requests.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your billing requests.

Args:
params (dict, optional): Query string parameters.
Expand Down
5 changes: 3 additions & 2 deletions gocardless_pro/services/blocks_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ def get(self,identity,params=None, headers=None):
def list(self,params=None, headers=None):
"""List multiple blocks.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
blocks.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your blocks.

Args:
params (dict, optional): Query string parameters.
Expand Down
5 changes: 3 additions & 2 deletions gocardless_pro/services/creditor_bank_accounts_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List creditor bank accounts.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
creditor bank accounts.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your creditor bank accounts.

Args:
params (dict, optional): Query string parameters.
Expand Down
5 changes: 3 additions & 2 deletions gocardless_pro/services/creditors_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List creditors.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
creditors.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your creditors.

Args:
params (dict, optional): Query string parameters.
Expand Down
5 changes: 3 additions & 2 deletions gocardless_pro/services/currency_exchange_rates_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ class CurrencyExchangeRatesService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List exchange rates.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all
exchange rates.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of all exchange rates.

Args:
params (dict, optional): Query string parameters.
Expand Down
22 changes: 13 additions & 9 deletions gocardless_pro/services/customer_bank_accounts_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ def create(self,params=None, headers=None):

There are three different ways to supply bank account details:

- [Local details](#appendix-local-bank-details)

- IBAN

- [Customer Bank Account
Tokens](#javascript-flow-create-a-customer-bank-account-token)
-
Local details
(https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
-
IBAN
-
Customer Bank Account Tokens
(https://developer.gocardless.com/api-reference/#javascript-flow-create-a-customer-bank-account-token)

For more information on the different fields required in each country,
see [local bank details](#appendix-local-bank-details).
see local bank details
(https://developer.gocardless.com/api-reference/#appendix-local-bank-details).

Args:
params (dict, optional): Request body.
Expand Down Expand Up @@ -60,8 +63,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List customer bank accounts.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
bank accounts.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your bank accounts.

Args:
params (dict, optional): Query string parameters.
Expand Down
1 change: 0 additions & 1 deletion gocardless_pro/services/customer_notifications_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def handle(self,identity,params=None, headers=None):
this endpoint will return an `already_actioned` error and you should
not take
further action. This endpoint takes no additional parameters.


Args:
identity (string): The id of the notification.
Expand Down
9 changes: 5 additions & 4 deletions gocardless_pro/services/customers_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def create(self,params=None, headers=None):
def list(self,params=None, headers=None):
"""List customers.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
customers.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your customers.

Args:
params (dict, optional): Query string parameters.
Expand Down Expand Up @@ -130,8 +131,8 @@ def remove(self,identity,params=None, headers=None):
removed customer by
ID.

<p class="restricted-notice"><strong>The action of removing a customer
cannot be reversed, so please use with care.</strong></p>
The action of removing a customer cannot be reversed, so please use
with care.

Args:
identity (string): Unique identifier, beginning with "CU".
Expand Down
10 changes: 8 additions & 2 deletions gocardless_pro/services/events_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ class EventsService(base_service.BaseService):
def list(self,params=None, headers=None):
"""List events.

Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
events.
Returns a cursor-paginated
(https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination)
list of your events.

Important: This endpoint will no longer return events older than 18
months, including when filtering by resource. This takes effect no
sooner than 1 August 2026 in sandbox environments, and no sooner than 1
October 2026 in live environments.

Args:
params (dict, optional): Query string parameters.
Expand Down
Loading
Loading