-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes generated by 853e5c24f4ab548791a4d6781c22927dff469260
- Loading branch information
1 parent
cf79683
commit 77a72f3
Showing
30 changed files
with
229 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# WARNING: Do not edit by hand, this file was generated by Crank: | ||
# | ||
# https://github.com/gocardless/crank | ||
# | ||
|
||
class TransferredMandate(object): | ||
"""A thin wrapper around a transferred_mandate, providing easy access to its | ||
attributes. | ||
Example: | ||
transferred_mandate = client.transferred_mandates.get() | ||
transferred_mandate.id | ||
""" | ||
|
||
def __init__(self, attributes, api_response): | ||
self.attributes = attributes | ||
self.api_response = api_response | ||
|
||
@property | ||
def encrypted_customer_bank_details(self): | ||
return self.attributes.get('encrypted_customer_bank_details') | ||
|
||
|
||
@property | ||
def encrypted_decryption_key(self): | ||
return self.attributes.get('encrypted_decryption_key') | ||
|
||
|
||
@property | ||
def links(self): | ||
return self.Links(self.attributes.get('links')) | ||
|
||
|
||
@property | ||
def public_key_id(self): | ||
return self.attributes.get('public_key_id') | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class Links(object): | ||
"""Wrapper for the response's 'links' attribute.""" | ||
|
||
def __init__(self, attributes): | ||
self.attributes = attributes | ||
|
||
@property | ||
def customer_bank_account(self): | ||
return self.attributes.get('customer_bank_account') | ||
|
||
@property | ||
def mandate(self): | ||
return self.attributes.get('mandate') | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# WARNING: Do not edit by hand, this file was generated by Crank: | ||
# | ||
# https://github.com/gocardless/crank | ||
# | ||
|
||
from . import base_service | ||
from .. import resources | ||
from ..paginator import Paginator | ||
from .. import errors | ||
|
||
class TransferredMandatesService(base_service.BaseService): | ||
"""Service class that provides access to the transferred_mandates | ||
endpoints of the GoCardless Pro API. | ||
""" | ||
|
||
RESOURCE_CLASS = resources.TransferredMandate | ||
RESOURCE_NAME = 'transferred_mandates' | ||
|
||
|
||
def transferred_mandates(self,identity,params=None, headers=None): | ||
"""Get updated customer bank details. | ||
Returns new customer bank details for a mandate that's been recently | ||
transferred | ||
Args: | ||
identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016. | ||
params (dict, optional): Query string parameters. | ||
Returns: | ||
TransferredMandate | ||
""" | ||
path = self._sub_url_params('/transferred_mandates/:identity', { | ||
|
||
'identity': identity, | ||
}) | ||
|
||
response = self._perform_request('GET', path, params, headers, | ||
retry_failures=False) | ||
return self._resource_for(response) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
"method": "POST", | ||
"path_template": "/billing_request_flows", | ||
"url_params": [], | ||
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2023-11-13T13:40:04.997Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2023-11-13T13:40:04.997Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":false}} | ||
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2023-11-24T08:50:03.675Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2023-11-24T08:50:03.675Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true}} | ||
}, | ||
"initialise": { | ||
"method": "POST", | ||
"path_template": "/billing_request_flows/:identity/actions/initialise", | ||
"url_params": ["BRF123"], | ||
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2023-11-13T13:40:04.997Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2023-11-13T13:40:04.997Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":false}} | ||
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2023-11-24T08:50:03.675Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2023-11-24T08:50:03.675Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":false}} | ||
} | ||
} |
Oops, something went wrong.