Skip to content

Commit

Permalink
Merge pull request #77 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Release 1.39.0
  • Loading branch information
hjheath authored Feb 13, 2023
2 parents 2ef01e3 + 5f171a0 commit 5d8bef3
Show file tree
Hide file tree
Showing 40 changed files with 601 additions and 453 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<!-- @format -->
# 1.39.0

- Adding GET `/verification_details` endpoint to allow integrators to list verification details for a creditor

# 1.38.0

- Adding POST `/verification_details` endpoint to allow integrators to submit information against creditors for KYC checks
Expand Down
50 changes: 28 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ Bank authorisations

.. code:: python
# Get a Bank Authorisation.
client.bank_authorisations.get('BAU123', params={...})
# Create a Bank Authorisation
client.bank_authorisations.create(params={...})
# Get a Bank Authorisation
client.bank_authorisations.get('BAU123', params={...})
Bank details lookups
''''''''''''''''''''''''''''''''''''''''''

Expand All @@ -92,42 +92,42 @@ Billing requests

.. code:: python
# List Billing Requests
client.billing_requests.list(params={...})
# Iterate through all billing_requests
client.billing_requests.all(params={...})
# Create a Billing Request
client.billing_requests.create(params={...})
# Get a single Billing Request
client.billing_requests.get('BRQ123', params={...})
# Collect customer details for a Billing Request
# Collect customer details
client.billing_requests.collect_customer_details('BRQ123', params={...})
# Collect bank account details for a Billing Request
# Collect bank account details
client.billing_requests.collect_bank_account('BRQ123', params={...})
# Confirm the payer details
client.billing_requests.confirm_payer_details('BRQ123', params={...})
# Fulfil a Billing Request
client.billing_requests.fulfil('BRQ123', params={...})
# Change currency for a Billing Request
client.billing_requests.choose_currency('BRQ123', params={...})
# Confirm the customer and bank account details
client.billing_requests.confirm_payer_details('BRQ123', params={...})
# Cancel a Billing Request
client.billing_requests.cancel('BRQ123', params={...})
# Notify the customer of a Billing Request
# List Billing Requests
client.billing_requests.list(params={...})
# Iterate through all billing_requests
client.billing_requests.all(params={...})
# Get a single Billing Request
client.billing_requests.get('BRQ123', params={...})
# Notify the customer
client.billing_requests.notify('BRQ123', params={...})
# Trigger fallback for a Billing Request
# Trigger fallback
client.billing_requests.fallback('BRQ123', params={...})
# Change currency
client.billing_requests.choose_currency('BRQ123', params={...})
Billing request flows
''''''''''''''''''''''''''''''''''''''''''

Expand Down Expand Up @@ -590,6 +590,12 @@ Verification details

.. code:: python
# List verification details
client.verification_details.list(params={...})
# Iterate through all verification_details
client.verification_details.all(params={...})
# Create a verification detail
client.verification_details.create(params={...})
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__ = '1.38.0'
__version__ = '1.39.0'

4 changes: 2 additions & 2 deletions gocardless_pro/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,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': '1.38.0',
'GoCardless-Client-Version': '1.39.0',
'User-Agent': self._user_agent(),
'GoCardless-Version': '2015-07-06',
}
Expand All @@ -150,7 +150,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/1.38.0',
'gocardless-pro-python/1.39.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/billing_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def payment_request(self):
return self.PaymentRequest(self.attributes.get('payment_request'))


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


@property
def resources(self):
return self.Resources(self.attributes.get('resources'))
Expand Down Expand Up @@ -205,6 +210,8 @@ def scheme(self):





class Resources(object):
"""Wrapper for the response's 'resources' attribute."""

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


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


@property
def postal_code(self):
return self.attributes.get('postal_code')
Expand Down Expand Up @@ -91,3 +96,5 @@ def creditor(self):





46 changes: 23 additions & 23 deletions gocardless_pro/services/bank_authorisations_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,6 @@ class BankAuthorisationsService(base_service.BaseService):
RESOURCE_NAME = 'bank_authorisations'


def get(self,identity,params=None, headers=None):
"""Get a Bank Authorisation..
Fetches a bank authorisation
Args:
identity (string): Unique identifier, beginning with "BAU".
params (dict, optional): Query string parameters.
Returns:
BankAuthorisation
"""
path = self._sub_url_params('/bank_authorisations/:identity', {

'identity': identity,
})


response = self._perform_request('GET', path, params, headers,
retry_failures=True)
return self._resource_for(response)


def create(self,params=None, headers=None):
"""Create a Bank Authorisation.
Expand Down Expand Up @@ -67,3 +44,26 @@ def create(self,params=None, headers=None):
headers=headers)
return self._resource_for(response)


def get(self,identity,params=None, headers=None):
"""Get a Bank Authorisation.
Get a single bank authorisation.
Args:
identity (string): Unique identifier, beginning with "BAU".
params (dict, optional): Query string parameters.
Returns:
BankAuthorisation
"""
path = self._sub_url_params('/bank_authorisations/:identity', {

'identity': identity,
})


response = self._perform_request('GET', path, params, headers,
retry_failures=True)
return self._resource_for(response)

Loading

0 comments on commit 5d8bef3

Please sign in to comment.