diff --git a/CHANGELOG.md b/CHANGELOG.md index a21f3db2..236390e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +# 1.32.0 + +- Added support for `prefilled_customer` and `prefilled_bank_account` in Billing Request Flow + # 1.31.0 - Added `reference` field to Mandate Request in Billing Request diff --git a/gocardless_pro/__init__.py b/gocardless_pro/__init__.py index 2833d29c..70da6198 100644 --- a/gocardless_pro/__init__.py +++ b/gocardless_pro/__init__.py @@ -2,5 +2,5 @@ from .client import Client -__version__ = '1.31.0' +__version__ = '1.32.0' diff --git a/gocardless_pro/api_client.py b/gocardless_pro/api_client.py index 46f1e2bb..1861a996 100644 --- a/gocardless_pro/api_client.py +++ b/gocardless_pro/api_client.py @@ -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.31.0', + 'GoCardless-Client-Version': '1.32.0', 'User-Agent': self._user_agent(), 'GoCardless-Version': '2015-07-06', } @@ -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.31.0', + 'gocardless-pro-python/1.32.0', 'python/{0}'.format(python_version), '{0}/{1}'.format(platform.python_implementation(), vm_version), '{0}/{1}'.format(platform.system(), platform.release()), diff --git a/gocardless_pro/resources/billing_request_flow.py b/gocardless_pro/resources/billing_request_flow.py index 2a5fb26c..f3dee723 100644 --- a/gocardless_pro/resources/billing_request_flow.py +++ b/gocardless_pro/resources/billing_request_flow.py @@ -187,10 +187,6 @@ def given_name(self): def language(self): return self.attributes.get('language') - @property - def phone_number(self): - return self.attributes.get('phone_number') - @property def postal_code(self): return self.attributes.get('postal_code') diff --git a/setup.py b/setup.py index 4a584297..47fb1f52 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = 'gocardless_pro', - version = '1.31.0', + version = '1.32.0', packages = find_packages(exclude=['tests']), install_requires = ['requests>=2.6', 'six'], author = 'GoCardless', diff --git a/tests/fixtures/bank_authorisations.json b/tests/fixtures/bank_authorisations.json index c9af68b4..6c3aae60 100644 --- a/tests/fixtures/bank_authorisations.json +++ b/tests/fixtures/bank_authorisations.json @@ -3,12 +3,12 @@ "method": "GET", "path_template": "/bank_authorisations/:identity", "url_params": ["BAU123"], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-07-13T14:57:24.218Z","expires_at":"2022-07-13T14:57:24.218Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-07-22T14:11:31.377Z","expires_at":"2022-07-22T14:11:31.377Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} }, "create": { "method": "POST", "path_template": "/bank_authorisations", "url_params": [], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-07-13T14:57:24.218Z","expires_at":"2022-07-13T14:57:24.218Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-07-22T14:11:31.377Z","expires_at":"2022-07-22T14:11:31.377Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} } } diff --git a/tests/fixtures/billing_request_flows.json b/tests/fixtures/billing_request_flows.json index 2a0a65fa..caf7b024 100644 --- a/tests/fixtures/billing_request_flows.json +++ b/tests/fixtures/billing_request_flows.json @@ -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":"2022-07-13T14:57:24.221Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-07-13T14:57:24.221Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":true,"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":"user@example.com","family_name":"Osborne","given_name":"Frank","language":"en","phone_number":"+64 4 817 9999","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}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2022-07-22T14:11:31.381Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-07-22T14:11:31.381Z","id":"BRF123","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":"user@example.com","family_name":"Osborne","given_name":"Frank","language":"en","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}} }, "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":"2022-07-13T14:57:24.221Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-07-13T14:57:24.221Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"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":"user@example.com","family_name":"Osborne","given_name":"Frank","language":"en","phone_number":"+64 4 817 9999","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}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2022-07-22T14:11:31.381Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-07-22T14:11:31.381Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"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":"user@example.com","family_name":"Osborne","given_name":"Frank","language":"en","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}} } } diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 82f774e4..4ebf8818 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -3,66 +3,66 @@ "method": "GET", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 2540","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 456","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1318"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4425"},"metadata":{},"scheme":"faster_payments"},"status":"pending"},{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5089","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8162","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 694"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 8511"},"metadata":{},"scheme":"faster_payments"},"status":"pending"}],"meta":{"cursors":{"after":"example after 4059","before":"example before 1847"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 4425","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1318","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 4059"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 2081"},"metadata":{},"scheme":"faster_payments"},"status":"pending"},{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 694","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8511","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 456"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 3300"},"metadata":{},"scheme":"faster_payments"},"status":"pending"}],"meta":{"cursors":{"after":"example after 8162","before":"example before 5089"},"limit":50}} }, "create": { "method": "POST", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 9947"],"bank_authorisation":{"adapter":"example adapter 5466","authorisation_type":"example authorisation_type 1528","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 8047"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9106","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3237","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3274"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 495"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 1211"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 1445"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 495"],"bank_authorisation":{"adapter":"example adapter 1211","authorisation_type":"example authorisation_type 1445","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 9106"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1528","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6258","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9947"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 5466"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3274"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 4728"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "get": { "method": "GET", "path_template": "/billing_requests/:identity", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 631"],"bank_authorisation":{"adapter":"example adapter 5356","authorisation_type":"example authorisation_type 6831","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 1737"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 7387","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 408","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 2790"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 5026"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5541"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 3015"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 408"],"bank_authorisation":{"adapter":"example adapter 3015","authorisation_type":"example authorisation_type 2888","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 5541"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 631","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1737","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 6831"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 5026"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5356"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 5429"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "collect_customer_details": { "method": "POST", "path_template": "/billing_requests/:identity/actions/collect_customer_details", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 2433"],"bank_authorisation":{"adapter":"example adapter 6413","authorisation_type":"example authorisation_type 3090","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 563"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3721","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7189","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1957"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4324"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 4078"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 4147"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1353"],"bank_authorisation":{"adapter":"example adapter 1957","authorisation_type":"example authorisation_type 3721","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 6159"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 563","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2433","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 4078"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 6413"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5194"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 3090"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "collect_bank_account": { "method": "POST", "path_template": "/billing_requests/:identity/actions/collect_bank_account", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 2605"],"bank_authorisation":{"adapter":"example adapter 9703","authorisation_type":"example authorisation_type 9355","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 8510"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9828","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8266","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3000"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4538"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 2888"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8705"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 2888"],"bank_authorisation":{"adapter":"example adapter 9355","authorisation_type":"example authorisation_type 4538","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 2451"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 2605","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8510","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9828"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 2199"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8705"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 3000"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "fulfil": { "method": "POST", "path_template": "/billing_requests/:identity/actions/fulfil", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 4376"],"bank_authorisation":{"adapter":"example adapter 7202","authorisation_type":"example authorisation_type 4783","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 1563"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5094","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1577","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 7996"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 5561"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5447"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 9718"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 7996"],"bank_authorisation":{"adapter":"example adapter 5447","authorisation_type":"example authorisation_type 5094","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 7463"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5746","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 4783","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 4376"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 9718"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5561"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 7202"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "choose_currency": { "method": "POST", "path_template": "/billing_requests/:identity/actions/choose_currency", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 9241"],"bank_authorisation":{"adapter":"example adapter 8623","authorisation_type":"example authorisation_type 953","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 3133"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3891","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8643","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9336"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 2002"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 59"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 3033"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 3133"],"bank_authorisation":{"adapter":"example adapter 953","authorisation_type":"example authorisation_type 6420","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 1137"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 8643","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3891","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9336"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 9241"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3033"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 59"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "confirm_payer_details": { "method": "POST", "path_template": "/billing_requests/:identity/actions/confirm_payer_details", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1598"],"bank_authorisation":{"adapter":"example adapter 9843","authorisation_type":"example authorisation_type 6503","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 2205"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 7940","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9107","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1351"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 7425"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3687"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 9757"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1598"],"bank_authorisation":{"adapter":"example adapter 552","authorisation_type":"example authorisation_type 9843","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 2205"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 7425","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1351","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9757"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 3687"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 2546"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 9107"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "cancel": { "method": "POST", "path_template": "/billing_requests/:identity/actions/cancel", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 6137"],"bank_authorisation":{"adapter":"example adapter 5384","authorisation_type":"example authorisation_type 1297","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 9267"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3098","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3632","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3410"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 8591"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5285"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8590"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1297"],"bank_authorisation":{"adapter":"example adapter 8591","authorisation_type":"example authorisation_type 8582","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 5384"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5285","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8590","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3098"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 9267"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3410"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8010"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "notify": { "method": "POST", "path_template": "/billing_requests/:identity/actions/notify", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 3086"],"bank_authorisation":{"adapter":"example adapter 9819","authorisation_type":"example authorisation_type 8981","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 493"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1270","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2066","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3981"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 7726"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5894"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 9271"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 493"],"bank_authorisation":{"adapter":"example adapter 9819","authorisation_type":"example authorisation_type 8981","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 6052"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5802","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3981","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 2066"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 1270"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9271"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 5894"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "fallback": { "method": "POST", "path_template": "/billing_requests/:identity/actions/fallback", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 3749"],"bank_authorisation":{"adapter":"example adapter 4885","authorisation_type":"example authorisation_type 5710","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 1387"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 7903","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1224","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1532"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4547"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 4384"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 2818"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1224"],"bank_authorisation":{"adapter":"example adapter 4384","authorisation_type":"example authorisation_type 1528","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 7903"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3612","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 4547","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 4885"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 1532"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 1387"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 5710"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} } } diff --git a/tests/fixtures/blocks.json b/tests/fixtures/blocks.json index ee84b725..afa0aba5 100644 --- a/tests/fixtures/blocks.json +++ b/tests/fixtures/blocks.json @@ -9,13 +9,13 @@ "method": "GET", "path_template": "/blocks/:identity", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 3231","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3767","reason_type":"example reason_type 2258","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 2258","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3231","reason_type":"example reason_type 3767","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "list": { "method": "GET", "path_template": "/blocks", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 8154","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7578","reason_type":"example reason_type 7822","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 1223","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 4208","reason_type":"example reason_type 7342","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 1968","before":"example before 7743"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 7822","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 8154","reason_type":"example reason_type 7578","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 1223","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 4208","reason_type":"example reason_type 7342","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 1968","before":"example before 7743"},"limit":50}} }, "disable": { "method": "POST", @@ -33,6 +33,6 @@ "method": "POST", "path_template": "/block_by_ref", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 4657","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 9371","reason_type":"example reason_type 4415","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 9513","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3430","reason_type":"example reason_type 3039","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 1359","before":"example before 9700"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 9371","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3430","reason_type":"example reason_type 3039","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 9513","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 1359","reason_type":"example reason_type 9700","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 4415","before":"example before 4657"},"limit":50}} } } diff --git a/tests/fixtures/creditor_bank_accounts.json b/tests/fixtures/creditor_bank_accounts.json index 237ef4e3..63556ae3 100644 --- a/tests/fixtures/creditor_bank_accounts.json +++ b/tests/fixtures/creditor_bank_accounts.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/creditor_bank_accounts", "url_params": [], - "body": {"creditor_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 5399","before":"example before 1162"},"limit":50}} + "body": {"creditor_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 1162","before":"example before 5399"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/creditors.json b/tests/fixtures/creditors.json index 3eafcc1e..6ae0495f 100644 --- a/tests/fixtures/creditors.json +++ b/tests/fixtures/creditors.json @@ -3,19 +3,19 @@ "method": "POST", "path_template": "/creditors", "url_params": [], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 6720","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 783","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 870","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2984","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 6720","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 783","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 2984","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 870","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} }, "list": { "method": "GET", "path_template": "/creditors", "url_params": [], - "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 8010","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 8247","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 4162","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 565","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 2048","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 6756","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 7920","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6829","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 8666","before":"example before 5695"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 8010","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 8247","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 4162","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 565","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 6829","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 6756","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 7920","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2048","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 8666","before":"example before 5695"},"limit":50}} }, "get": { "method": "GET", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 6200","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 9456","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 1092","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6629","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 6629","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 1092","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 9456","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6200","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} }, "update": { "method": "PUT", diff --git a/tests/fixtures/currency_exchange_rates.json b/tests/fixtures/currency_exchange_rates.json index d84c10f8..fb2368ac 100644 --- a/tests/fixtures/currency_exchange_rates.json +++ b/tests/fixtures/currency_exchange_rates.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/currency_exchange_rates", "url_params": [], - "body": {"currency_exchange_rates":[{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"},{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"}],"meta":{"cursors":{"after":"example after 292","before":"example before 3447"},"limit":50}} + "body": {"currency_exchange_rates":[{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"},{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"}],"meta":{"cursors":{"after":"example after 3447","before":"example before 292"},"limit":50}} } } diff --git a/tests/fixtures/customer_bank_accounts.json b/tests/fixtures/customer_bank_accounts.json index 2fc34e4a..09133f1e 100644 --- a/tests/fixtures/customer_bank_accounts.json +++ b/tests/fixtures/customer_bank_accounts.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/customer_bank_accounts", "url_params": [], - "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9888"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8318"},"metadata":{}}],"meta":{"cursors":{"after":"example after 2019","before":"example before 3756"},"limit":50}} + "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9888"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8318"},"metadata":{}}],"meta":{"cursors":{"after":"example after 3756","before":"example before 2019"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/customer_notifications.json b/tests/fixtures/customer_notifications.json index 325d0b18..f7f84516 100644 --- a/tests/fixtures/customer_notifications.json +++ b/tests/fixtures/customer_notifications.json @@ -3,6 +3,6 @@ "method": "POST", "path_template": "/customer_notifications/:identity/actions/handle", "url_params": ["PCN123"], - "body": {"customer_notifications":{"action_taken":"example action_taken 8675","action_taken_at":"2022-07-13T14:57:24.227Z","action_taken_by":"example action_taken_by 2181","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} + "body": {"customer_notifications":{"action_taken":"example action_taken 8675","action_taken_at":"2022-07-22T14:11:31.389Z","action_taken_by":"example action_taken_by 2181","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 4d900538..9697c4fe 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -3,12 +3,12 @@ "method": "GET", "path_template": "/events", "url_params": [], - "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-07-13T14:57:24.228Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-07-13T14:57:24.228Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 417","before":"example before 1393"},"limit":50}} + "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-07-22T14:11:31.389Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-07-22T14:11:31.389Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 1393","before":"example before 417"},"limit":50}} }, "get": { "method": "GET", "path_template": "/events/:identity", "url_params": ["EV123"], - "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-07-13T14:57:24.228Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}} + "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-07-22T14:11:31.390Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}} } } diff --git a/tests/fixtures/mandates.json b/tests/fixtures/mandates.json index f499a5d2..84822be0 100644 --- a/tests/fixtures/mandates.json +++ b/tests/fixtures/mandates.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/mandates", "url_params": [], - "body": {"mandates":[{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission"},{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission"}],"meta":{"cursors":{"after":"example after 260","before":"example before 3922"},"limit":50}} + "body": {"mandates":[{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission"},{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission"}],"meta":{"cursors":{"after":"example after 3922","before":"example before 260"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/payer_authorisations.json b/tests/fixtures/payer_authorisations.json index bd4a8485..6ce1faeb 100644 --- a/tests/fixtures/payer_authorisations.json +++ b/tests/fixtures/payer_authorisations.json @@ -3,13 +3,13 @@ "method": "GET", "path_template": "/payer_authorisations/:identity", "url_params": ["PA123"], - "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 60","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","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":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 2420","message":"example message 1079","request_pointer":"example request_pointer 2954"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 2954","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","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":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 1079","message":"example message 60","request_pointer":"example request_pointer 2420"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "create": { "method": "POST", "path_template": "/payer_authorisations", "url_params": [], - "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 1181","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","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":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 2060","message":"example message 9551","request_pointer":"example request_pointer 1464"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 1464","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","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":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 2060","message":"example message 9551","request_pointer":"example request_pointer 1181"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "update": { "method": "PUT", @@ -27,6 +27,6 @@ "method": "POST", "path_template": "/payer_authorisations/:identity/actions/confirm", "url_params": ["PA123"], - "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 6685","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","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":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 1509","message":"example message 1215","request_pointer":"example request_pointer 1719"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 6685","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","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":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 1719","message":"example message 1509","request_pointer":"example request_pointer 1215"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} } } diff --git a/tests/fixtures/payments.json b/tests/fixtures/payments.json index 018688df..985bd99d 100644 --- a/tests/fixtures/payments.json +++ b/tests/fixtures/payments.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 5740","before":"example before 6000"},"limit":50},"payments":[{"amount":1000,"amount_refunded":150,"charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","instalment_schedule":"IS123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","retry_if_possible":true,"status":"submitted"},{"amount":1000,"amount_refunded":150,"charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","instalment_schedule":"IS123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","retry_if_possible":true,"status":"submitted"}]} + "body": {"meta":{"cursors":{"after":"example after 6000","before":"example before 5740"},"limit":50},"payments":[{"amount":1000,"amount_refunded":150,"charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","instalment_schedule":"IS123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","retry_if_possible":true,"status":"submitted"},{"amount":1000,"amount_refunded":150,"charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","instalment_schedule":"IS123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","retry_if_possible":true,"status":"submitted"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/payout_items.json b/tests/fixtures/payout_items.json index 5c9fb054..d51f3008 100644 --- a/tests/fixtures/payout_items.json +++ b/tests/fixtures/payout_items.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/payout_items", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 2869","before":"example before 574"},"limit":10},"payout_items":[{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"},{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"}]} + "body": {"meta":{"cursors":{"after":"example after 574","before":"example before 2869"},"limit":10},"payout_items":[{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"},{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123","refund":"RF123"},"taxes":[{"amount":"1.1","currency":"EUR","destination_amount":"1.1","destination_currency":"EUR","exchange_rate":"1.11205","tax_rate_id":"GB_VAT_1"}],"type":"payment_paid_out"}]} } } diff --git a/tests/fixtures/payouts.json b/tests/fixtures/payouts.json index 751dd0a9..52835514 100644 --- a/tests/fixtures/payouts.json +++ b/tests/fixtures/payouts.json @@ -3,7 +3,7 @@ "method": "GET", "path_template": "/payouts", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 2390","before":"example before 421"},"limit":50},"payouts":[{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"},{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}]} + "body": {"meta":{"cursors":{"after":"example after 421","before":"example before 2390"},"limit":50},"payouts":[{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"},{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/refunds.json b/tests/fixtures/refunds.json index 9683dd1e..140d17e1 100644 --- a/tests/fixtures/refunds.json +++ b/tests/fixtures/refunds.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/refunds", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 1544","before":"example before 3472"},"limit":50},"refunds":[{"amount":150,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"},{"amount":150,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}]} + "body": {"meta":{"cursors":{"after":"example after 3472","before":"example before 1544"},"limit":50},"refunds":[{"amount":150,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"},{"amount":150,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/subscriptions.json b/tests/fixtures/subscriptions.json index 99a2de42..aaa6976e 100644 --- a/tests/fixtures/subscriptions.json +++ b/tests/fixtures/subscriptions.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/subscriptions", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3524","before":"example before 7293"},"limit":50},"subscriptions":[{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} + "body": {"meta":{"cursors":{"after":"example after 7293","before":"example before 3524"},"limit":50},"subscriptions":[{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/webhooks.json b/tests/fixtures/webhooks.json index 0fc11fdd..86fd3034 100644 --- a/tests/fixtures/webhooks.json +++ b/tests/fixtures/webhooks.json @@ -3,18 +3,18 @@ "method": "GET", "path_template": "/webhooks", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 5528","before":"example before 7008"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 8151","request_headers":{},"response_body":"example response_body 8682","response_body_truncated":true,"response_code":5265,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 9859","request_headers":{},"response_body":"example response_body 855","response_body_truncated":false,"response_code":9867,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"}]} + "body": {"meta":{"cursors":{"after":"example after 5265","before":"example before 8151"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 4231","request_headers":{},"response_body":"example response_body 8721","response_body_truncated":false,"response_code":8682,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 5343","request_headers":{},"response_body":"example response_body 7008","response_body_truncated":true,"response_code":9859,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}]} }, "get": { "method": "GET", "path_template": "/webhooks/:identity", "url_params": ["WB123"], - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 2286","request_headers":{},"response_body":"example response_body 2375","response_body_truncated":true,"response_code":106,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 6774","request_headers":{},"response_body":"example response_body 8284","response_body_truncated":false,"response_code":1874,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}} }, "retry": { "method": "POST", "path_template": "/webhooks/:identity/actions/retry", "url_params": ["WB123"], - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 6114","request_headers":{},"response_body":"example response_body 9723","response_body_truncated":false,"response_code":3546,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 4658","request_headers":{},"response_body":"example response_body 9723","response_body_truncated":true,"response_code":3546,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}} } } diff --git a/tests/integration/billing_request_flows_integration_test.py b/tests/integration/billing_request_flows_integration_test.py index ce3560fd..01258ff3 100644 --- a/tests/integration/billing_request_flows_integration_test.py +++ b/tests/integration/billing_request_flows_integration_test.py @@ -70,8 +70,6 @@ def test_billing_request_flows_create(): body.get('prefilled_customer')['given_name']) assert_equal(response.prefilled_customer.language, body.get('prefilled_customer')['language']) - assert_equal(response.prefilled_customer.phone_number, - body.get('prefilled_customer')['phone_number']) assert_equal(response.prefilled_customer.postal_code, body.get('prefilled_customer')['postal_code']) assert_equal(response.prefilled_customer.region, @@ -150,8 +148,6 @@ def test_billing_request_flows_initialise(): body.get('prefilled_customer')['given_name']) assert_equal(response.prefilled_customer.language, body.get('prefilled_customer')['language']) - assert_equal(response.prefilled_customer.phone_number, - body.get('prefilled_customer')['phone_number']) assert_equal(response.prefilled_customer.postal_code, body.get('prefilled_customer')['postal_code']) assert_equal(response.prefilled_customer.region,