diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e66bec9..2b6b1622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ +# 2.1.0 + +- Added `mandate_request[consent_type]` parameter to Billing Request creation. +- Added `constraints[payment_method]` parameter to Billing Request creation. +- Added `subscription_request` parameter to Billing Request creation. +- Added `instalment_schedule_request` parameter to Billing Request creation. + # 1.53.0 - Added `/exports` APIs and added `exports` as a new event type available for Embed merchants diff --git a/gocardless_pro/__init__.py b/gocardless_pro/__init__.py index d58977a3..4cc54de1 100644 --- a/gocardless_pro/__init__.py +++ b/gocardless_pro/__init__.py @@ -2,5 +2,5 @@ from .client import Client -__version__ = '2.0.0' +__version__ = '2.1.0' diff --git a/gocardless_pro/api_client.py b/gocardless_pro/api_client.py index 26de8ebc..da219bb5 100644 --- a/gocardless_pro/api_client.py +++ b/gocardless_pro/api_client.py @@ -150,7 +150,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': '2.0.0', + 'GoCardless-Client-Version': '2.1.0', 'User-Agent': self._user_agent(), 'GoCardless-Version': '2015-07-06', } @@ -159,7 +159,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/2.0.0', + 'gocardless-pro-python/2.1.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.py b/gocardless_pro/resources/billing_request.py index f345e92c..a893adbe 100644 --- a/gocardless_pro/resources/billing_request.py +++ b/gocardless_pro/resources/billing_request.py @@ -41,6 +41,11 @@ def id(self): return self.attributes.get('id') + @property + def instalment_schedule_request(self): + return self.InstalmentScheduleRequest(self.attributes.get('instalment_schedule_request')) + + @property def links(self): return self.Links(self.attributes.get('links')) @@ -76,6 +81,11 @@ def status(self): return self.attributes.get('status') + @property + def subscription_request(self): + return self.SubscriptionRequest(self.attributes.get('subscription_request')) + + @@ -88,6 +98,51 @@ def status(self): + class InstalmentScheduleRequest(object): + """Wrapper for the response's 'instalment_schedule_request' attribute.""" + + def __init__(self, attributes): + self.attributes = attributes + + @property + def app_fee(self): + return self.attributes.get('app_fee') + + @property + def currency(self): + return self.attributes.get('currency') + + @property + def instalments(self): + return self.attributes.get('instalments') + + @property + def links(self): + return self.attributes.get('links') + + @property + def metadata(self): + return self.attributes.get('metadata') + + @property + def name(self): + return self.attributes.get('name') + + @property + def payment_reference(self): + return self.attributes.get('payment_reference') + + @property + def retry_if_possible(self): + return self.attributes.get('retry_if_possible') + + @property + def total_amount(self): + return self.attributes.get('total_amount') + + + + class Links(object): """Wrapper for the response's 'links' attribute.""" @@ -114,6 +169,14 @@ def customer_bank_account(self): def customer_billing_detail(self): return self.attributes.get('customer_billing_detail') + @property + def instalment_schedule_request(self): + return self.attributes.get('instalment_schedule_request') + + @property + def instalment_schedule_request_instalment_schedule(self): + return self.attributes.get('instalment_schedule_request_instalment_schedule') + @property def mandate_request(self): return self.attributes.get('mandate_request') @@ -138,6 +201,14 @@ def payment_request(self): def payment_request_payment(self): return self.attributes.get('payment_request_payment') + @property + def subscription_request(self): + return self.attributes.get('subscription_request') + + @property + def subscription_request_subscription(self): + return self.attributes.get('subscription_request_subscription') + @@ -261,3 +332,68 @@ def customer_billing_detail(self): + + class SubscriptionRequest(object): + """Wrapper for the response's 'subscription_request' attribute.""" + + def __init__(self, attributes): + self.attributes = attributes + + @property + def amount(self): + return self.attributes.get('amount') + + @property + def app_fee(self): + return self.attributes.get('app_fee') + + @property + def count(self): + return self.attributes.get('count') + + @property + def currency(self): + return self.attributes.get('currency') + + @property + def day_of_month(self): + return self.attributes.get('day_of_month') + + @property + def interval(self): + return self.attributes.get('interval') + + @property + def interval_unit(self): + return self.attributes.get('interval_unit') + + @property + def links(self): + return self.attributes.get('links') + + @property + def metadata(self): + return self.attributes.get('metadata') + + @property + def month(self): + return self.attributes.get('month') + + @property + def name(self): + return self.attributes.get('name') + + @property + def payment_reference(self): + return self.attributes.get('payment_reference') + + @property + def retry_if_possible(self): + return self.attributes.get('retry_if_possible') + + @property + def start_date(self): + return self.attributes.get('start_date') + + + diff --git a/gocardless_pro/services/billing_requests_service.py b/gocardless_pro/services/billing_requests_service.py index 58230863..40481455 100644 --- a/gocardless_pro/services/billing_requests_service.py +++ b/gocardless_pro/services/billing_requests_service.py @@ -20,7 +20,9 @@ class BillingRequestsService(base_service.BaseService): def create(self,params=None, headers=None): """Create a Billing Request. - +

Important: All properties associated + with `subscription_request` and `instalment_schedule_request` are only + supported for ACH and PAD schemes.

Args: params (dict, optional): Request body. diff --git a/setup.py b/setup.py index edfdb574..dde62600 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = 'gocardless_pro', - version = '2.0.0', + version = '2.1.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 29eb31cc..c8eaaa7f 100644 --- a/tests/fixtures/bank_authorisations.json +++ b/tests/fixtures/bank_authorisations.json @@ -3,12 +3,12 @@ "method": "POST", "path_template": "/bank_authorisations", "url_params": [], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-11-05T10:03:56.275Z","expires_at":"2024-11-05T10:03:56.275Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","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":"2024-12-03T12:55:13.866Z","expires_at":"2024-12-03T12:55:13.866Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} }, "get": { "method": "GET", "path_template": "/bank_authorisations/:identity", "url_params": ["BAU123"], - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-11-05T10:03:56.275Z","expires_at":"2024-11-05T10:03:56.275Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","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":"2024-12-03T12:55:13.866Z","expires_at":"2024-12-03T12:55:13.866Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","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 dba2460d..9fc1a9d2 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":"2024-11-05T10:03:56.278Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-11-05T10:03:56.278Z","id":"BRF123","language":"en","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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":false,"skip_success_screen":false}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-12-03T12:55:13.871Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-12-03T12:55:13.871Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":false,"skip_success_screen":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":"2024-11-05T10:03:56.279Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-11-05T10:03:56.279Z","id":"BRF123","language":"en","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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":false,"skip_success_screen":true}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-12-03T12:55:13.871Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-12-03T12:55:13.871Z","id":"BRF123","language":"en","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","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":true,"skip_success_screen":false}} } } diff --git a/tests/fixtures/billing_request_templates.json b/tests/fixtures/billing_request_templates.json index b69df7bc..b23de28c 100644 --- a/tests/fixtures/billing_request_templates.json +++ b/tests/fixtures/billing_request_templates.json @@ -3,7 +3,7 @@ "method": "GET", "path_template": "/billing_request_templates", "url_params": [], - "body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 4405","before":"example before 9081"},"limit":50}} + "body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 5740","before":"example before 8475"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/billing_requests.json b/tests/fixtures/billing_requests.json index 4b530da4..fbbc4997 100644 --- a/tests/fixtures/billing_requests.json +++ b/tests/fixtures/billing_requests.json @@ -3,72 +3,72 @@ "method": "POST", "path_template": "/billing_requests", "url_params": [], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 9947"],"bank_authorisation":{"adapter":"example adapter 495","authorisation_type":"example authorisation_type 5466"},"collect_customer_details":{"default_country_code":"example default_country_code 1528","incomplete_fields":{"customer":["example customer 6258"],"customer_billing_detail":["example customer_billing_detail 8047"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 2888","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8287","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 4425","constraints":{"end_date":"example end_date 5089","max_amount_per_payment":2540,"periodic_limits":[{"alignment":"creation_date","max_payments":694,"max_total_amount":3300,"period":"week"}],"start_date":"example start_date 8162"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 1211"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 1445"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"loan","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 4059"},"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 1847"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 5541"],"bank_authorisation":{"adapter":"example adapter 8287","authorisation_type":"example authorisation_type 9947"},"collect_customer_details":{"default_country_code":"example default_country_code 2888","incomplete_fields":{"customer":["example customer 2790"],"customer_billing_detail":["example customer_billing_detail 3015"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 6258"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 5466","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 495","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 2081","constraints":{"end_date":"example end_date 5089","max_amount_per_payment":4728,"payment_method":"example payment_method 2540","periodic_limits":[{"alignment":"creation_date","max_payments":694,"max_total_amount":3300,"period":"week"}],"start_date":"example start_date 8162"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 3274"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 4059"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"government","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 9106"},"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 3237"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 7387"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}} }, "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 3000"],"bank_authorisation":{"adapter":"example adapter 7189","authorisation_type":"example authorisation_type 2199"},"collect_customer_details":{"default_country_code":"example default_country_code 3721","incomplete_fields":{"customer":["example customer 1353"],"customer_billing_detail":["example customer_billing_detail 1957"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5541","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3015","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 5356","constraints":{"end_date":"example end_date 6413","max_amount_per_payment":3090,"periodic_limits":[{"alignment":"creation_date","max_payments":2433,"max_total_amount":563,"period":"flexible"}],"start_date":"example start_date 5026"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 631"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 408"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"personal","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 6831"},"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"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 2888"],"bank_authorisation":{"adapter":"example adapter 3721","authorisation_type":"example authorisation_type 7189"},"collect_customer_details":{"default_country_code":"example default_country_code 2199","incomplete_fields":{"customer":["example customer 3000"],"customer_billing_detail":["example customer_billing_detail 8705"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 9828"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 4324","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6159","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 5429","constraints":{"end_date":"example end_date 6413","max_amount_per_payment":3090,"payment_method":"example payment_method 5194","periodic_limits":[{"alignment":"creation_date","max_payments":2433,"max_total_amount":563,"period":"year"}],"start_date":"example start_date 5026"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 1737"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 1353"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"salary","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 156"},"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 2605"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 9703"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "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 7202"],"bank_authorisation":{"adapter":"example adapter 4783","authorisation_type":"example authorisation_type 5746"},"collect_customer_details":{"default_country_code":"example default_country_code 8266","incomplete_fields":{"customer":["example customer 9828"],"customer_billing_detail":["example customer_billing_detail 5561"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 8510","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2605","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 1137","constraints":{"end_date":"example end_date 9002","max_amount_per_payment":9718,"periodic_limits":[{"alignment":"creation_date","max_payments":5094,"max_total_amount":5447,"period":"year"}],"start_date":"example start_date 4376"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 8623"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 2888"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"mortgage","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 9355"},"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 9703"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 8643"],"bank_authorisation":{"adapter":"example adapter 3033","authorisation_type":"example authorisation_type 59"},"collect_customer_details":{"default_country_code":"example default_country_code 3891","incomplete_fields":{"customer":["example customer 8878"],"customer_billing_detail":["example customer_billing_detail 2002"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 4783"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 9843","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 552","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 1563","constraints":{"end_date":"example end_date 8623","max_amount_per_payment":953,"payment_method":"example payment_method 5447","periodic_limits":[{"alignment":"creation_date","max_payments":5094,"max_total_amount":7996,"period":"year"}],"start_date":"example start_date 6420"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 9718"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 9241"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"gambling","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 6503"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "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 8643"],"bank_authorisation":{"adapter":"example adapter 3891","authorisation_type":"example authorisation_type 2002"},"collect_customer_details":{"default_country_code":"example default_country_code 8878","incomplete_fields":{"customer":["example customer 9336"],"customer_billing_detail":["example customer_billing_detail 2546"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9241","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 59","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 552","constraints":{"end_date":"example end_date 2205","max_amount_per_payment":1598,"periodic_limits":[{"alignment":"creation_date","max_payments":9757,"max_total_amount":1515,"period":"week"}],"start_date":"example start_date 9843"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 7940"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 5285"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 3632"},"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 8981"],"bank_authorisation":{"adapter":"example adapter 3086","authorisation_type":"example authorisation_type 9819"},"collect_customer_details":{"default_country_code":"example default_country_code 2066","incomplete_fields":{"customer":["example customer 1270"],"customer_billing_detail":["example customer_billing_detail 493"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 7726"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 2205","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1598","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 8591","constraints":{"end_date":"example end_date 1351","max_amount_per_payment":1515,"payment_method":"example payment_method 9757","periodic_limits":[{"alignment":"calendar","max_payments":8010,"max_total_amount":3687,"period":"day"}],"start_date":"example start_date 8590"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 3632"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 2079"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"other","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 1297"},"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 5384"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 9271"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}} }, "fulfil": { "method": "POST", "path_template": "/billing_requests/:identity/actions/fulfil", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 9819"],"bank_authorisation":{"adapter":"example adapter 6052","authorisation_type":"example authorisation_type 8981"},"collect_customer_details":{"default_country_code":"example default_country_code 7175","incomplete_fields":{"customer":["example customer 4885"],"customer_billing_detail":["example customer_billing_detail 5710"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3749","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1387","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 9267","constraints":{"end_date":"example end_date 7726","max_amount_per_payment":5802,"periodic_limits":[{"alignment":"creation_date","max_payments":3981,"max_total_amount":1270,"period":"week"}],"start_date":"example start_date 5894"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 5384"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 493"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"salary","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 8582"},"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 8591"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1224"],"bank_authorisation":{"adapter":"example adapter 1528","authorisation_type":"example authorisation_type 3749"},"collect_customer_details":{"default_country_code":"example default_country_code 2818","incomplete_fields":{"customer":["example customer 4384"],"customer_billing_detail":["example customer_billing_detail 7903"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 1387"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 3767","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2258","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 3616","constraints":{"end_date":"example end_date 364","max_amount_per_payment":540,"payment_method":"example payment_method 5786","periodic_limits":[{"alignment":"creation_date","max_payments":7351,"max_total_amount":3640,"period":"week"}],"start_date":"example start_date 8844"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 4801"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 6052"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 1532"},"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 3612"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 1602"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "cancel": { "method": "POST", "path_template": "/billing_requests/:identity/actions/cancel", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1224"],"bank_authorisation":{"adapter":"example adapter 3612","authorisation_type":"example authorisation_type 4547"},"collect_customer_details":{"default_country_code":"example default_country_code 2818","incomplete_fields":{"customer":["example customer 4384"],"customer_billing_detail":["example customer_billing_detail 7903"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3231","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7578","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 2305","constraints":{"end_date":"example end_date 7839","max_amount_per_payment":540,"periodic_limits":[{"alignment":"calendar","max_payments":8076,"max_total_amount":7051,"period":"week"}],"start_date":"example start_date 3616"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 1532"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 90"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"personal","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 2258"},"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 1602"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 7342"],"bank_authorisation":{"adapter":"example adapter 7822","authorisation_type":"example authorisation_type 1223"},"collect_customer_details":{"default_country_code":"example default_country_code 4208","incomplete_fields":{"customer":["example customer 7743"],"customer_billing_detail":["example customer_billing_detail 1968"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 6829"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 3162","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 4904","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 3430","constraints":{"end_date":"example end_date 9700","max_amount_per_payment":1359,"payment_method":"example payment_method 6720","periodic_limits":[{"alignment":"creation_date","max_payments":2984,"max_total_amount":870,"period":"year"}],"start_date":"example start_date 8010"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 9371"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 3710"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"tax","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 440"},"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 4535"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 4162"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "list": { "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 9371","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3039","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 7743","constraints":{"end_date":"example end_date 1166","max_amount_per_payment":3710,"periodic_limits":[{"alignment":"calendar","max_payments":4535,"max_total_amount":3162,"period":"flexible"}],"start_date":"example start_date 1968"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 1223"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 4415"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"status":"pending"},{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 6756","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2048","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 4162","constraints":{"end_date":"example end_date 870","max_amount_per_payment":3430,"periodic_limits":[{"alignment":"calendar","max_payments":9513,"max_total_amount":6720,"period":"flexible"}],"start_date":"example start_date 783"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 8010"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 6829"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"status":"pending"}],"meta":{"cursors":{"after":"example after 8666","before":"example before 5695"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 9103"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 9888","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8318","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 8666","constraints":{"end_date":"example end_date 5399","max_amount_per_payment":9456,"payment_method":"example payment_method 6629","periodic_limits":[{"alignment":"calendar","max_payments":7577,"max_total_amount":8831,"period":"month"}],"start_date":"example start_date 5320"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 5695"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 3447"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 292"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}},{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 60"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 2632","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9386","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 6157","constraints":{"end_date":"example end_date 8652","max_amount_per_payment":8675,"payment_method":"example payment_method 2181","periodic_limits":[{"alignment":"creation_date","max_payments":1393,"max_total_amount":417,"period":"day"}],"start_date":"example start_date 8470"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 7807"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 260"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 7029"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}],"meta":{"cursors":{"after":"example after 1079","before":"example before 2420"},"limit":50}} }, "get": { "method": "GET", "path_template": "/billing_requests/:identity", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 6157"],"bank_authorisation":{"adapter":"example adapter 8652","authorisation_type":"example authorisation_type 8675"},"collect_customer_details":{"default_country_code":"example default_country_code 2181","incomplete_fields":{"customer":["example customer 1853"],"customer_billing_detail":["example customer_billing_detail 8795"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1092","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 6629","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 9888","constraints":{"end_date":"example end_date 3447","max_amount_per_payment":292,"periodic_limits":[{"alignment":"creation_date","max_payments":5320,"max_total_amount":7886,"period":"month"}],"start_date":"example start_date 1162"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 9103"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3756"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"other","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 9456"},"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 6200"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1215"],"bank_authorisation":{"adapter":"example adapter 1719","authorisation_type":"example authorisation_type 5014"},"collect_customer_details":{"default_country_code":"example default_country_code 1040","incomplete_fields":{"customer":["example customer 5740"],"customer_billing_detail":["example customer_billing_detail 8662"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 2390"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6000","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9284","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 9551","constraints":{"end_date":"example end_date 4637","max_amount_per_payment":1533,"payment_method":"example payment_method 5561","periodic_limits":[{"alignment":"creation_date","max_payments":1181,"max_total_amount":600,"period":"week"}],"start_date":"example start_date 7039"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 2060"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3173"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"loan","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 1464"},"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 2954"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 6443"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "notify": { "method": "POST", "path_template": "/billing_requests/:identity/actions/notify", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 260"],"bank_authorisation":{"adapter":"example adapter 3922","authorisation_type":"example authorisation_type 7029"},"collect_customer_details":{"default_country_code":"example default_country_code 9386","incomplete_fields":{"customer":["example customer 2632"],"customer_billing_detail":["example customer_billing_detail 2520"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 60","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1661","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 5561","constraints":{"end_date":"example end_date 600","max_amount_per_payment":7039,"periodic_limits":[{"alignment":"creation_date","max_payments":1181,"max_total_amount":9551,"period":"day"}],"start_date":"example start_date 9516"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 1464"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 2420"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 8470"},"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 1393"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 1606"],"bank_authorisation":{"adapter":"example adapter 3352","authorisation_type":"example authorisation_type 9648"},"collect_customer_details":{"default_country_code":"example default_country_code 1237","incomplete_fields":{"customer":["example customer 3524"],"customer_billing_detail":["example customer_billing_detail 7293"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":true,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 5343"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 5166","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9859","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 8622","constraints":{"end_date":"example end_date 3479","max_amount_per_payment":6592,"payment_method":"example payment_method 129","periodic_limits":[{"alignment":"creation_date","max_payments":855,"max_total_amount":8721,"period":"week"}],"start_date":"example start_date 8682"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 8151"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 2395"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"salary","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 7008"},"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 8408"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 3338"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} }, "fallback": { "method": "POST", "path_template": "/billing_requests/:identity/actions/fallback", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 3173"],"bank_authorisation":{"adapter":"example adapter 1040","authorisation_type":"example authorisation_type 8662"},"collect_customer_details":{"default_country_code":"example default_country_code 5740","incomplete_fields":{"customer":["example customer 6000"],"customer_billing_detail":["example customer_billing_detail 9284"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 6443","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 235","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 3338","constraints":{"end_date":"example end_date 3524","max_amount_per_payment":7293,"periodic_limits":[{"alignment":"calendar","max_payments":2174,"max_total_amount":2395,"period":"flexible"}],"start_date":"example start_date 1237"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 8070"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 1509"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"loan","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 2390"},"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 421"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 5036"],"bank_authorisation":{"adapter":"example adapter 5516","authorisation_type":"example authorisation_type 928"},"collect_customer_details":{"default_country_code":"example default_country_code 4926","incomplete_fields":{"customer":["example customer 7477"],"customer_billing_detail":["example customer_billing_detail 7412"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 8284"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 1874","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2375","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 6039","constraints":{"end_date":"example end_date 3374","max_amount_per_payment":4658,"payment_method":"example payment_method 259","periodic_limits":[{"alignment":"calendar","max_payments":7587,"max_total_amount":6724,"period":"year"}],"start_date":"example start_date 1657"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 6537"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 9105"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"personal","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 8146"},"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 6531"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 3653"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}} }, "choose_currency": { "method": "POST", "path_template": "/billing_requests/:identity/actions/choose_currency", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 5265"],"bank_authorisation":{"adapter":"example adapter 7420","authorisation_type":"example authorisation_type 8622"},"collect_customer_details":{"default_country_code":"example default_country_code 371","incomplete_fields":{"customer":["example customer 6117"],"customer_billing_detail":["example customer_billing_detail 8151"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9648","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 3352","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 5343","constraints":{"end_date":"example end_date 5528","max_amount_per_payment":1053,"periodic_limits":[{"alignment":"calendar","max_payments":9867,"max_total_amount":9859,"period":"week"}],"start_date":"example start_date 7008"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 855"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 8284"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"dependant_support","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 3479"},"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 8682"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 4405"],"bank_authorisation":{"adapter":"example adapter 1509","authorisation_type":"example authorisation_type 7276"},"collect_customer_details":{"default_country_code":"example default_country_code 8240","incomplete_fields":{"customer":["example customer 9081"],"customer_billing_detail":["example customer_billing_detail 2120"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 1478"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":false,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 556","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7695","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"telephone","consent_type":"example consent_type 9430","constraints":{"end_date":"example end_date 7871","max_amount_per_payment":7653,"payment_method":"example payment_method 1128","periodic_limits":[{"alignment":"calendar","max_payments":8602,"max_total_amount":6861,"period":"flexible"}],"start_date":"example start_date 8345"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 4698"},"metadata":{},"payer_requested_dual_signature":true,"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3808"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"other","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 4834"},"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 580"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 3380"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21"}}} }, "select_institution": { "method": "POST", "path_template": "/billing_requests/:identity/actions/select_institution", "url_params": ["BRQ123"], - "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 6039"],"bank_authorisation":{"adapter":"example adapter 1657","authorisation_type":"example authorisation_type 3374"},"collect_customer_details":{"default_country_code":"example default_country_code 6531","incomplete_fields":{"customer":["example customer 8146"],"customer_billing_detail":["example customer_billing_detail 4983"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"fallback_occurred":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5516","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 928","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"authorisation_source":"paper","consent_type":"example consent_type 2286","constraints":{"end_date":"example end_date 4467","max_amount_per_payment":6114,"periodic_limits":[{"alignment":"creation_date","max_payments":4658,"max_total_amount":9723,"period":"week"}],"start_date":"example start_date 6724"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 6537"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"managed","links":{"payment":"example payment 7477"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"other","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 6051"},"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 9105"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"available_currencies":["example available_currencies 442"],"bank_authorisation":{"adapter":"example adapter 9023","authorisation_type":"example authorisation_type 3162"},"collect_customer_details":{"default_country_code":"example default_country_code 8265","incomplete_fields":{"customer":["example customer 8558"],"customer_billing_detail":["example customer_billing_detail 2884"]}},"completes_actions":["collect_bank_account"],"institution_guess_status":"pending","required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"fallback_occurred":false,"id":"BRQ123","instalment_schedule_request":{"app_fee":100,"currency":"EUR","instalments":{},"links":{"instalment_schedule":"example instalment_schedule 1462"},"metadata":{},"name":"Invoice 4404","payment_reference":"GOLDPLAN","retry_if_possible":true,"total_amount":1000},"links":{"bank_authorisation":"example bank_authorisation 6972","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9673","instalment_schedule_request":"ISR123","instalment_schedule_request_instalment_schedule":"IS123","mandate_request":"MRQ123","mandate_request_mandate":"MD123","organisation":"OR123","payment_provider":"PP123","payment_request":"PRQ123","payment_request_payment":"PM123","subscription_request":"SBR123","subscription_request_subscription":"SB123"},"mandate_request":{"authorisation_source":"web","consent_type":"example consent_type 2677","constraints":{"end_date":"example end_date 496","max_amount_per_payment":5048,"payment_method":"example payment_method 5513","periodic_limits":[{"alignment":"calendar","max_payments":1306,"max_total_amount":2574,"period":"week"}],"start_date":"example start_date 5527"},"currency":"GBP","description":"Top-up Payment","links":{"mandate":"example mandate 8531"},"metadata":{},"payer_requested_dual_signature":false,"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","funds_settlement":"direct","links":{"payment":"example payment 3654"},"metadata":{},"reference":"some-custom-ref","scheme":"faster_payments"},"purpose_code":"utility","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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 2686"},"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 4330"],"swedish_identity_number":"556564-5404"}},"status":"pending","subscription_request":{"amount":1000,"app_fee":100,"count":5,"currency":"EUR","day_of_month":28,"interval":1,"interval_unit":"monthly","links":{"subscription":"example subscription 8398"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21"}}} } } diff --git a/tests/fixtures/blocks.json b/tests/fixtures/blocks.json index a9d82c6d..48461c7e 100644 --- a/tests/fixtures/blocks.json +++ b/tests/fixtures/blocks.json @@ -3,36 +3,36 @@ "method": "POST", "path_template": "/blocks", "url_params": [], - "body": {"blocks":{"active":true,"block_type":"example block_type 1509","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7276","reason_type":"example reason_type 1466","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 545","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 5814","reason_type":"example reason_type 8089","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "get": { "method": "GET", "path_template": "/blocks/:identity", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 580","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7695","reason_type":"example reason_type 556","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 8339","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3131","reason_type":"example reason_type 1581","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 4834","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 4267","reason_type":"example reason_type 8477","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 4993","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 2175","reason_type":"example reason_type 1478","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 3808","before":"example before 3380"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 6985","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7051","reason_type":"example reason_type 5629","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 4203","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7092","reason_type":"example reason_type 1695","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 5275","before":"example before 8372"},"limit":50}} }, "disable": { "method": "POST", "path_template": "/blocks/:identity/actions/disable", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 8558","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 8265","reason_type":"example reason_type 2631","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 4377","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 973","reason_type":"example reason_type 1262","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "enable": { "method": "POST", "path_template": "/blocks/:identity/actions/enable", "url_params": ["BLC123"], - "body": {"blocks":{"active":true,"block_type":"example block_type 2884","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 9023","reason_type":"example reason_type 442","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 3017","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7807","reason_type":"example reason_type 9759","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "block_by_ref": { "method": "POST", "path_template": "/blocks/block_by_ref", "url_params": [], - "body": {"blocks":[{"active":true,"block_type":"example block_type 3162","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 6972","reason_type":"example reason_type 9673","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 9253","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 5527","reason_type":"example reason_type 9158","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 5048","before":"example before 496"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 1406","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3544","reason_type":"example reason_type 2474","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 1723","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3922","reason_type":"example reason_type 894","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 2205","before":"example before 3780"},"limit":50}} } } diff --git a/tests/fixtures/creditor_bank_accounts.json b/tests/fixtures/creditor_bank_accounts.json index 446bb923..45d2ced8 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":{},"verification_status":"successful"},{"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":{},"verification_status":"successful"}],"meta":{"cursors":{"after":"example after 6494","before":"example before 45"},"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":{},"verification_status":"successful"},{"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":{},"verification_status":"successful"}],"meta":{"cursors":{"after":"example after 9301","before":"example before 1267"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/creditors.json b/tests/fixtures/creditors.json index dd5d9a33..1cc5d8c5 100644 --- a/tests/fixtures/creditors.json +++ b/tests/fixtures/creditors.json @@ -3,24 +3,24 @@ "method": "POST", "path_template": "/creditors", "url_params": [], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5513","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 1306","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 9731","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2574","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 30","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 8610","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 7574","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 8033","region":"Greater London","scheme":"bacs","status":"pending"}],"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 2332","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 2677","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 3740","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 8531","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3654","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 5402","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 4330","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3483","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 4187","before":"example before 2686"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 5395","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 7650","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 9914","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2523","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 909","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 9277","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 5645","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 671","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 7208","before":"example before 8198"},"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 1462","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 604","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 8193","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3421","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 2734","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 4721","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 8879","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3354","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} }, "update": { "method": "PUT", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 8398","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 8956","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 6765","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 922","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 10","bank_reference_prefix":"ACME","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","creditor_type":"company","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":"Acme","postal_code":"EC1V 7LQ","region":"example region 3921","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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 7587","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9326","region":"Greater London","scheme":"bacs","status":"pending"}],"verification_status":"action_required"}} } } diff --git a/tests/fixtures/currency_exchange_rates.json b/tests/fixtures/currency_exchange_rates.json index c495da2d..29df90b8 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 8999","before":"example before 4806"},"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 9488","before":"example before 8849"},"limit":50}} } } diff --git a/tests/fixtures/customer_bank_accounts.json b/tests/fixtures/customer_bank_accounts.json index d425ec66..11affa4a 100644 --- a/tests/fixtures/customer_bank_accounts.json +++ b/tests/fixtures/customer_bank_accounts.json @@ -3,30 +3,30 @@ "method": "POST", "path_template": "/customer_bank_accounts", "url_params": [], - "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 2044"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 4401"},"metadata":{}}} }, "list": { "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_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 7124"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 3357"},"metadata":{}}],"meta":{"cursors":{"after":"example after 4007","before":"example before 7759"},"limit":50}} + "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 8140"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 3973"},"metadata":{}}],"meta":{"cursors":{"after":"example after 5596","before":"example before 9466"},"limit":50}} }, "get": { "method": "GET", "path_template": "/customer_bank_accounts/:identity", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 8853"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 75"},"metadata":{}}} }, "update": { "method": "PUT", "path_template": "/customer_bank_accounts/:identity", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 7774"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 6110"},"metadata":{}}} }, "disable": { "method": "POST", "path_template": "/customer_bank_accounts/:identity/actions/disable", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 8475"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_account_token":"bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113","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 6872"},"metadata":{}}} } } diff --git a/tests/fixtures/customer_notifications.json b/tests/fixtures/customer_notifications.json index 4ac3766d..dbc7c47d 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 8089","action_taken_at":"2024-11-05T10:03:56.286Z","action_taken_by":"example action_taken_by 5740","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 7913","action_taken_at":"2024-12-03T12:55:13.878Z","action_taken_by":"example action_taken_by 5214","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} } } diff --git a/tests/fixtures/customers.json b/tests/fixtures/customers.json index 0dcb0268..55100261 100644 --- a/tests/fixtures/customers.json +++ b/tests/fixtures/customers.json @@ -9,7 +9,7 @@ "method": "GET", "path_template": "/customers", "url_params": [], - "body": {"customers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 1420","before":"example before 4024"},"limit":50}} + "body": {"customers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 8374","before":"example before 3920"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index f6daff0e..2697f8df 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":"2024-11-05T10:03:56.287Z","id":"PCN123","mandatory":true,"type":"example type 1581"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"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","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-11-05T10:03:56.287Z","id":"PCN123","mandatory":false,"type":"example type 3131"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"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","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 545","before":"example before 5814"},"limit":50}} + "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-12-03T12:55:13.878Z","id":"PCN123","mandatory":false,"type":"example type 9959"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"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","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-12-03T12:55:13.878Z","id":"PCN123","mandatory":true,"type":"example type 9921"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"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","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 6244","before":"example before 7063"},"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":"2024-11-05T10:03:56.287Z","id":"PCN123","mandatory":true,"type":"example type 5629"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"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","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates"}} + "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2024-12-03T12:55:13.878Z","id":"PCN123","mandatory":true,"type":"example type 1436"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","item_count":10,"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","scheme_identifier":"SU123","subscription":"SB123"},"metadata":{},"resource_metadata":{},"resource_type":"mandates"}} } } diff --git a/tests/fixtures/exports.json b/tests/fixtures/exports.json index a32fc7ea..e0c4444b 100644 --- a/tests/fixtures/exports.json +++ b/tests/fixtures/exports.json @@ -3,12 +3,12 @@ "method": "GET", "path_template": "/exports/:identity", "url_params": ["EX123"], - "body": {"exports":{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","download_url":"example download_url 4203","export_type":"payments_index","id":"EX123"}} + "body": {"exports":{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","download_url":"example download_url 1488","export_type":"payments_index","id":"EX123"}} }, "list": { "method": "GET", "path_template": "/exports", "url_params": [], - "body": {"exports":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"},{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"}],"meta":{"cursors":{"after":"example after 7092","before":"example before 1695"},"limit":50}} + "body": {"exports":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"},{"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","export_type":"payments_index","id":"EX123"}],"meta":{"cursors":{"after":"example after 1925","before":"example before 8223"},"limit":50}} } } diff --git a/tests/fixtures/instalment_schedules.json b/tests/fixtures/instalment_schedules.json index 9bcb8d0d..386fa94e 100644 --- a/tests/fixtures/instalment_schedules.json +++ b/tests/fixtures/instalment_schedules.json @@ -15,7 +15,7 @@ "method": "GET", "path_template": "/instalment_schedules", "url_params": [], - "body": {"instalment_schedules":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000},{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000}],"meta":{"cursors":{"after":"example after 8372","before":"example before 5275"},"limit":50}} + "body": {"instalment_schedules":[{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000},{"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"IS123","links":{"customer":"CU123","mandate":"MD123","payments":["PM123","PM456"]},"metadata":{},"name":"Invoice 4404","payment_errors":{"0":[{"field":"charge_date","message":"must be on or after mandate's next_possible_customer_charge_date"}]},"status":"active","total_amount":1000}],"meta":{"cursors":{"after":"example after 9219","before":"example before 9026"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/institutions.json b/tests/fixtures/institutions.json index 908d00a7..0a4a1d94 100644 --- a/tests/fixtures/institutions.json +++ b/tests/fixtures/institutions.json @@ -3,12 +3,12 @@ "method": "GET", "path_template": "/institutions", "url_params": [], - "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"}],"meta":{"cursors":{"after":"example after 1262","before":"example before 4377"},"limit":50}} + "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"}],"meta":{"cursors":{"after":"example after 9200","before":"example before 3114"},"limit":50}} }, "list_for_billing_request": { "method": "GET", "path_template": "/billing_requests/:identity/institutions", "url_params": ["BRQ123"], - "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"}],"meta":{"cursors":{"after":"example after 3017","before":"example before 973"},"limit":50}} + "body": {"institutions":[{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"},{"autocompletes_collect_bank_account":true,"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"}],"meta":{"cursors":{"after":"example after 3176","before":"example before 8730"},"limit":50}} } } diff --git a/tests/fixtures/mandate_import_entries.json b/tests/fixtures/mandate_import_entries.json index e41c95ca..3ba99cb4 100644 --- a/tests/fixtures/mandate_import_entries.json +++ b/tests/fixtures/mandate_import_entries.json @@ -9,6 +9,6 @@ "method": "GET", "path_template": "/mandate_import_entries", "url_params": [], - "body": {"mandate_import_entries":[{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"record_identifier":"bank-file.xml/line-1"},{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"record_identifier":"bank-file.xml/line-1"}],"meta":{"cursors":{"after":"example after 8051","before":"example before 1300"},"limit":50}} + "body": {"mandate_import_entries":[{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"record_identifier":"bank-file.xml/line-1"},{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"record_identifier":"bank-file.xml/line-1"}],"meta":{"cursors":{"after":"example after 6184","before":"example before 1757"},"limit":50}} } } diff --git a/tests/fixtures/mandates.json b/tests/fixtures/mandates.json index 2cf2e848..78dce2a5 100644 --- a/tests/fixtures/mandates.json +++ b/tests/fixtures/mandates.json @@ -3,36 +3,36 @@ "method": "POST", "path_template": "/mandates", "url_params": [], - "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 3544","max_amount_per_payment":1723,"periods":[{"max_amount_per_period":1406,"max_payments_per_period":3780,"period":"day"}],"start_date":"example start_date 2474"},"consent_type":"example consent_type 9759","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} + "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 541","max_amount_per_payment":9434,"periods":[{"max_amount_per_period":913,"max_payments_per_period":8619,"period":"week"}],"start_date":"example start_date 7045"},"consent_type":"example consent_type 8051","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} }, "list": { "method": "GET", "path_template": "/mandates", "url_params": [], - "body": {"mandates":[{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 5395","max_amount_per_payment":9914,"periods":[{"max_amount_per_period":8610,"max_payments_per_period":8033,"period":"flexible"}],"start_date":"example start_date 30"},"consent_type":"example consent_type 2523","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"},{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 7208","max_amount_per_payment":8198,"periods":[{"max_amount_per_period":9277,"max_payments_per_period":5645,"period":"flexible"}],"start_date":"example start_date 671"},"consent_type":"example consent_type 3354","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 7587","before":"example before 4721"},"limit":50}} + "body": {"mandates":[{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 9485","max_amount_per_payment":7694,"periods":[{"max_amount_per_period":7221,"max_payments_per_period":6574,"period":"week"}],"start_date":"example start_date 9750"},"consent_type":"example consent_type 2239","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"},{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 6216","max_amount_per_payment":9719,"periods":[{"max_amount_per_period":6316,"max_payments_per_period":6813,"period":"month"}],"start_date":"example start_date 2516"},"consent_type":"example consent_type 4560","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 9277","before":"example before 9555"},"limit":50}} }, "get": { "method": "GET", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 9301","max_amount_per_payment":8849,"periods":[{"max_amount_per_period":3921,"max_payments_per_period":9326,"period":"day"}],"start_date":"example start_date 1267"},"consent_type":"example consent_type 9488","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} + "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 2232","max_amount_per_payment":7179,"periods":[{"max_amount_per_period":3333,"max_payments_per_period":3740,"period":"day"}],"start_date":"example start_date 7627"},"consent_type":"example consent_type 758","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} }, "update": { "method": "PUT", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 5596","max_amount_per_payment":9466,"periods":[{"max_amount_per_period":6110,"max_payments_per_period":6872,"period":"day"}],"start_date":"example start_date 3973"},"consent_type":"example consent_type 7913","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} + "body": {"mandates":{"authorisation_source":"web","consent_parameters":{"end_date":"example end_date 7037","max_amount_per_payment":4647,"periods":[{"max_amount_per_period":712,"max_payments_per_period":6346,"period":"flexible"}],"start_date":"example start_date 1009"},"consent_type":"example consent_type 4534","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} }, "cancel": { "method": "POST", "path_template": "/mandates/:identity/actions/cancel", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 6487","max_amount_per_payment":1446,"periods":[{"max_amount_per_period":6244,"max_payments_per_period":7063,"period":"week"}],"start_date":"example start_date 1436"},"consent_type":"example consent_type 325","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} + "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 9356","max_amount_per_payment":6314,"periods":[{"max_amount_per_period":7223,"max_payments_per_period":2442,"period":"flexible"}],"start_date":"example start_date 104"},"consent_type":"example consent_type 1730","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} }, "reinstate": { "method": "POST", "path_template": "/mandates/:identity/actions/reinstate", "url_params": ["MD123"], - "body": {"mandates":{"authorisation_source":"telephone","consent_parameters":{"end_date":"example end_date 8730","max_amount_per_payment":1925,"periods":[{"max_amount_per_period":9219,"max_payments_per_period":9200,"period":"week"}],"start_date":"example start_date 3114"},"consent_type":"example consent_type 8223","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"managed","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} + "body": {"mandates":{"authorisation_source":"paper","consent_parameters":{"end_date":"example end_date 3360","max_amount_per_payment":894,"periods":[{"max_amount_per_period":5721,"max_payments_per_period":6213,"period":"day"}],"start_date":"example start_date 9953"},"consent_type":"example consent_type 5619","created_at":"2014-01-01T12:00:00.000Z","funds_settlement":"direct","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","next_possible_standard_ach_charge_date":"2014-10-27","payments_require_approval":false,"reference":"REF-123","scheme":"bacs","status":"pending_submission","verified_at":"2021-01-01T12:00:00.000Z"}} } } diff --git a/tests/fixtures/negative_balance_limits.json b/tests/fixtures/negative_balance_limits.json index 1fbc0995..52947081 100644 --- a/tests/fixtures/negative_balance_limits.json +++ b/tests/fixtures/negative_balance_limits.json @@ -3,7 +3,7 @@ "method": "GET", "path_template": "/negative_balance_limits", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 8619","before":"example before 9434"},"limit":50},"negative_balance_limits":[{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}},{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}}]} + "body": {"meta":{"cursors":{"after":"example after 4283","before":"example before 6262"},"limit":50},"negative_balance_limits":[{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}},{"balance_limit":10000,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"NBL123","links":{"creator_user":"US123","creditor":"CR123"}}]} }, "create": { "method": "POST", diff --git a/tests/fixtures/payer_authorisations.json b/tests/fixtures/payer_authorisations.json index b4b37a5f..a1b25dc2 100644 --- a/tests/fixtures/payer_authorisations.json +++ b/tests/fixtures/payer_authorisations.json @@ -3,30 +3,30 @@ "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 5666","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 913","message":"example message 7045","request_pointer":"example request_pointer 541"}],"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 5540","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 1315","message":"example message 4721","request_pointer":"example request_pointer 1350"}],"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 5642","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 2239","message":"example message 7694","request_pointer":"example request_pointer 7221"}],"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 4492","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 342","message":"example message 6591","request_pointer":"example request_pointer 1898"}],"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", "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 6574","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 9485","message":"example message 701","request_pointer":"example request_pointer 9750"}],"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 3401","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 5707","message":"example message 7912","request_pointer":"example request_pointer 9695"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "submit": { "method": "POST", "path_template": "/payer_authorisations/:identity/actions/submit", "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 2088","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 864","message":"example message 4560","request_pointer":"example request_pointer 6216"}],"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 6516","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 6452","message":"example message 2283","request_pointer":"example request_pointer 3755"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "confirm": { "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 9719","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 1582","message":"example message 6316","request_pointer":"example request_pointer 6813"}],"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 4769","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 4740","message":"example message 7694","request_pointer":"example request_pointer 8098"}],"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 42b3a184..00db040c 100644 --- a/tests/fixtures/payments.json +++ b/tests/fixtures/payments.json @@ -3,36 +3,36 @@ "method": "POST", "path_template": "/payments", "url_params": [], - "body": {"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","faster_ach":false,"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": {"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","faster_ach":true,"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":false,"status":"submitted"}} }, "list": { "method": "GET", "path_template": "/payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 6217","before":"example before 758"},"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","faster_ach":true,"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":false,"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","faster_ach":true,"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":false,"status":"submitted"}]} + "body": {"meta":{"cursors":{"after":"example after 8268","before":"example before 4476"},"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","faster_ach":false,"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","faster_ach":false,"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":false,"status":"submitted"}]} }, "get": { "method": "GET", "path_template": "/payments/:identity", "url_params": ["PM123"], - "body": {"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","faster_ach":false,"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":false,"status":"submitted"}} + "body": {"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","faster_ach":true,"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"}} }, "update": { "method": "PUT", "path_template": "/payments/:identity", "url_params": ["PM123"], - "body": {"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","faster_ach":false,"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":false,"status":"submitted"}} + "body": {"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","faster_ach":true,"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":false,"status":"submitted"}} }, "cancel": { "method": "POST", "path_template": "/payments/:identity/actions/cancel", "url_params": ["PM123"], - "body": {"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","faster_ach":true,"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":false,"status":"submitted"}} + "body": {"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","faster_ach":false,"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":false,"status":"submitted"}} }, "retry": { "method": "POST", "path_template": "/payments/:identity/actions/retry", "url_params": ["PM123"], - "body": {"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","faster_ach":false,"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": {"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","faster_ach":true,"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"}} } } diff --git a/tests/fixtures/payout_items.json b/tests/fixtures/payout_items.json index 068fa1e9..5f39c372 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 4647","before":"example before 9969"},"limit":50},"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 4870","before":"example before 7093"},"limit":50},"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 7b0150e5..d9c5e9f2 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 3928","before":"example before 7037"},"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 2713","before":"example before 3709"},"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/redirect_flows.json b/tests/fixtures/redirect_flows.json index 34dae363..1e0f65af 100644 --- a/tests/fixtures/redirect_flows.json +++ b/tests/fixtures/redirect_flows.json @@ -3,18 +3,18 @@ "method": "POST", "path_template": "/redirect_flows", "url_params": [], - "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 712","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} + "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 8937","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} }, "get": { "method": "GET", "path_template": "/redirect_flows/:identity", "url_params": ["RE123456"], - "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 6346","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} + "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 1086","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} }, "complete": { "method": "POST", "path_template": "/redirect_flows/:identity/actions/complete", "url_params": ["RE123456"], - "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 1009","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} + "body": {"redirect_flows":{"confirmation_url":"https://pay.gocardless.com/flow/RE123/success","created_at":"2014-01-01T12:00:00.000Z","description":"Standard subscription","id":"RE123456","links":{"billing_request":"BR123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","mandate":"MD123"},"mandate_reference":"example mandate_reference 9841","metadata":{"salesforce_id":"ABCD1234"},"redirect_url":"http://pay.gocardless.com/flow/RE123","scheme":"bacs","session_token":"SESS_wSs0uGYMISxzqOBq","success_redirect_url":"https://example.com/pay/confirm"}} } } diff --git a/tests/fixtures/refunds.json b/tests/fixtures/refunds.json index 54b092a4..579af4f8 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 9356","before":"example before 104"},"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 8798","before":"example before 4490"},"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/scheme_identifiers.json b/tests/fixtures/scheme_identifiers.json index fee8b5d9..b775ae86 100644 --- a/tests/fixtures/scheme_identifiers.json +++ b/tests/fixtures/scheme_identifiers.json @@ -3,18 +3,18 @@ "method": "POST", "path_template": "/scheme_identifiers", "url_params": [], - "body": {"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 6314","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3589","region":"Greater London","scheme":"bacs","status":"pending"}} + "body": {"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 3585","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9401","region":"Greater London","scheme":"bacs","status":"pending"}} }, "list": { "method": "GET", "path_template": "/scheme_identifiers", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 5619","before":"example before 1730"},"limit":50},"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 2442","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7223","region":"Greater London","scheme":"bacs","status":"pending"},{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 7764","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5339","region":"Greater London","scheme":"bacs","status":"pending"}]} + "body": {"meta":{"cursors":{"after":"example after 718","before":"example before 9058"},"limit":50},"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 5392","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2735","region":"Greater London","scheme":"bacs","status":"pending"},{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 5815","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9681","region":"Greater London","scheme":"bacs","status":"pending"}]} }, "get": { "method": "GET", "path_template": "/scheme_identifiers/:identity", "url_params": ["SU123"], - "body": {"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 3360","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9953","region":"Greater London","scheme":"bacs","status":"pending"}} + "body": {"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","email":"user@example.com","id":"SU123","minimum_advance_notice":3,"name":"example name 2356","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6848","region":"Greater London","scheme":"bacs","status":"pending"}} } } diff --git a/tests/fixtures/subscriptions.json b/tests/fixtures/subscriptions.json index 30e46115..2eec6a99 100644 --- a/tests/fixtures/subscriptions.json +++ b/tests/fixtures/subscriptions.json @@ -3,31 +3,31 @@ "method": "POST", "path_template": "/subscriptions", "url_params": [], - "body": {"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "list": { "method": "GET", "path_template": "/subscriptions", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 6184","before":"example before 1757"},"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":false,"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","parent_plan_paused":true,"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 1092","before":"example before 8460"},"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","parent_plan_paused":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"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","parent_plan_paused":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} }, "get": { "method": "GET", "path_template": "/subscriptions/:identity", "url_params": ["SB123"], - "body": {"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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","parent_plan_paused":true,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "update": { "method": "PUT", "path_template": "/subscriptions/:identity", "url_params": ["SB123"], - "body": {"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "pause": { "method": "POST", "path_template": "/subscriptions/:identity/actions/pause", "url_params": ["SB123"], - "body": {"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","parent_plan_paused":false,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"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","parent_plan_paused":true,"payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "resume": { "method": "POST", diff --git a/tests/fixtures/tax_rates.json b/tests/fixtures/tax_rates.json index d067c5c8..e46e308f 100644 --- a/tests/fixtures/tax_rates.json +++ b/tests/fixtures/tax_rates.json @@ -3,7 +3,7 @@ "method": "GET", "path_template": "/tax_rates", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3401","before":"example before 5707"},"limit":50},"tax_rates":[{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"},{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}]} + "body": {"meta":{"cursors":{"after":"example after 5799","before":"example before 4666"},"limit":50},"tax_rates":[{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"},{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/transferred_mandates.json b/tests/fixtures/transferred_mandates.json index d1a30158..e30b6b17 100644 --- a/tests/fixtures/transferred_mandates.json +++ b/tests/fixtures/transferred_mandates.json @@ -3,6 +3,6 @@ "method": "GET", "path_template": "/transferred_mandates/:identity", "url_params": ["MD123"], - "body": {"transferred_mandates":{"encrypted_customer_bank_details":"example encrypted_customer_bank_details 9695","encrypted_decryption_key":"example encrypted_decryption_key 6516","links":{"customer_bank_account":"BA123","mandate":"MD123"},"public_key_id":"example public_key_id 7912"}} + "body": {"transferred_mandates":{"encrypted_customer_bank_details":"example encrypted_customer_bank_details 760","encrypted_decryption_key":"example encrypted_decryption_key 3794","links":{"customer_bank_account":"BA123","mandate":"MD123"},"public_key_id":"example public_key_id 7510"}} } } diff --git a/tests/fixtures/verification_details.json b/tests/fixtures/verification_details.json index a57d29d6..103d0e87 100644 --- a/tests/fixtures/verification_details.json +++ b/tests/fixtures/verification_details.json @@ -3,12 +3,12 @@ "method": "POST", "path_template": "/verification_details", "url_params": [], - "body": {"verification_details":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 2283","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 6452"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}} + "body": {"verification_details":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 8351","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 5666"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}} }, "list": { "method": "GET", "path_template": "/verification_details", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 1590","before":"example before 8098"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 4769","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 3755"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 4740","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 7694"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}]} + "body": {"meta":{"cursors":{"after":"example after 162","before":"example before 6013"},"limit":50},"verification_details":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 8601","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 722"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3834","city":"London","company_number":"07495895","description":"Wine and cheese seller","directors":[{"city":"London","country_code":"GB","date_of_birth":"1986-02-19","family_name":"Jones","given_name":"Tom","postal_code":"EC1V 7LQ","street":"example street 1060"}],"links":{"creditor":"CR123"},"name":"Acme Limited","postal_code":"EC1V 7LQ"}]} } } diff --git a/tests/fixtures/webhooks.json b/tests/fixtures/webhooks.json index 986e4f83..285638ab 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 7093","before":"example before 3709"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 3882","request_headers":{},"response_body":"example response_body 7417","response_body_truncated":false,"response_code":3414,"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":true,"request_body":"example request_body 4121","request_headers":{},"response_body":"example response_body 2713","response_body_truncated":false,"response_code":7251,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}]} + "body": {"meta":{"cursors":{"after":"example after 4907","before":"example before 7222"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 6053","request_headers":{},"response_body":"example response_body 7601","response_body_truncated":true,"response_code":3817,"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 3577","request_headers":{},"response_body":"example response_body 242","response_body_truncated":true,"response_code":8284,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":true,"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 9401","request_headers":{},"response_body":"example response_body 8798","response_body_truncated":true,"response_code":4490,"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":false,"request_body":"example request_body 6775","request_headers":{},"response_body":"example response_body 6904","response_body_truncated":true,"response_code":7630,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"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 9681","request_headers":{},"response_body":"example response_body 9058","response_body_truncated":false,"response_code":2356,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"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 3450","request_headers":{},"response_body":"example response_body 3201","response_body_truncated":true,"response_code":7173,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"successful":true,"url":"https://example.com/webhooks"}} } } diff --git a/tests/integration/billing_requests_integration_test.py b/tests/integration/billing_requests_integration_test.py index 10c9814d..5a159ed1 100644 --- a/tests/integration/billing_requests_integration_test.py +++ b/tests/integration/billing_requests_integration_test.py @@ -33,17 +33,30 @@ def test_billing_requests_create(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -66,6 +79,20 @@ def test_billing_requests_create(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] @responses.activate def test_billing_requests_create_new_idempotency_key_for_each_call(): @@ -123,17 +150,30 @@ def test_billing_requests_collect_customer_details(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -156,6 +196,20 @@ def test_billing_requests_collect_customer_details(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_collect_customer_details_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['collect_customer_details'] @@ -189,17 +243,30 @@ def test_billing_requests_collect_bank_account(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -222,6 +289,20 @@ def test_billing_requests_collect_bank_account(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_collect_bank_account_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['collect_bank_account'] @@ -255,17 +336,30 @@ def test_billing_requests_confirm_payer_details(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -288,6 +382,20 @@ def test_billing_requests_confirm_payer_details(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_confirm_payer_details_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['confirm_payer_details'] @@ -321,17 +429,30 @@ def test_billing_requests_fulfil(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -354,6 +475,20 @@ def test_billing_requests_fulfil(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_fulfil_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['fulfil'] @@ -387,17 +522,30 @@ def test_billing_requests_cancel(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -420,6 +568,20 @@ def test_billing_requests_cancel(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_cancel_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['cancel'] @@ -525,17 +687,30 @@ def test_billing_requests_get(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -558,6 +733,20 @@ def test_billing_requests_get(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] @responses.activate def test_timeout_billing_requests_get_retries(): @@ -598,17 +787,30 @@ def test_billing_requests_notify(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -631,6 +833,20 @@ def test_billing_requests_notify(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_notify_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['notify'] @@ -664,17 +880,30 @@ def test_billing_requests_fallback(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -697,6 +926,20 @@ def test_billing_requests_fallback(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_fallback_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['fallback'] @@ -730,17 +973,30 @@ def test_billing_requests_choose_currency(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -763,6 +1019,20 @@ def test_billing_requests_choose_currency(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_choose_currency_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['choose_currency'] @@ -796,17 +1066,30 @@ def test_billing_requests_select_institution(): assert response.metadata == body.get('metadata') assert response.purpose_code == body.get('purpose_code') assert response.status == body.get('status') + assert response.instalment_schedule_request.app_fee == body.get('instalment_schedule_request')['app_fee'] + assert response.instalment_schedule_request.currency == body.get('instalment_schedule_request')['currency'] + assert response.instalment_schedule_request.instalments == body.get('instalment_schedule_request')['instalments'] + assert response.instalment_schedule_request.links == body.get('instalment_schedule_request')['links'] + assert response.instalment_schedule_request.metadata == body.get('instalment_schedule_request')['metadata'] + assert response.instalment_schedule_request.name == body.get('instalment_schedule_request')['name'] + assert response.instalment_schedule_request.payment_reference == body.get('instalment_schedule_request')['payment_reference'] + assert response.instalment_schedule_request.retry_if_possible == body.get('instalment_schedule_request')['retry_if_possible'] + assert response.instalment_schedule_request.total_amount == body.get('instalment_schedule_request')['total_amount'] assert response.links.bank_authorisation == body.get('links')['bank_authorisation'] assert response.links.creditor == body.get('links')['creditor'] assert response.links.customer == body.get('links')['customer'] assert response.links.customer_bank_account == body.get('links')['customer_bank_account'] assert response.links.customer_billing_detail == body.get('links')['customer_billing_detail'] + assert response.links.instalment_schedule_request == body.get('links')['instalment_schedule_request'] + assert response.links.instalment_schedule_request_instalment_schedule == body.get('links')['instalment_schedule_request_instalment_schedule'] assert response.links.mandate_request == body.get('links')['mandate_request'] assert response.links.mandate_request_mandate == body.get('links')['mandate_request_mandate'] assert response.links.organisation == body.get('links')['organisation'] assert response.links.payment_provider == body.get('links')['payment_provider'] assert response.links.payment_request == body.get('links')['payment_request'] assert response.links.payment_request_payment == body.get('links')['payment_request_payment'] + assert response.links.subscription_request == body.get('links')['subscription_request'] + assert response.links.subscription_request_subscription == body.get('links')['subscription_request_subscription'] assert response.mandate_request.authorisation_source == body.get('mandate_request')['authorisation_source'] assert response.mandate_request.consent_type == body.get('mandate_request')['consent_type'] assert response.mandate_request.constraints == body.get('mandate_request')['constraints'] @@ -829,6 +1112,20 @@ def test_billing_requests_select_institution(): assert response.resources.customer == body.get('resources')['customer'] assert response.resources.customer_bank_account == body.get('resources')['customer_bank_account'] assert response.resources.customer_billing_detail == body.get('resources')['customer_billing_detail'] + assert response.subscription_request.amount == body.get('subscription_request')['amount'] + assert response.subscription_request.app_fee == body.get('subscription_request')['app_fee'] + assert response.subscription_request.count == body.get('subscription_request')['count'] + assert response.subscription_request.currency == body.get('subscription_request')['currency'] + assert response.subscription_request.day_of_month == body.get('subscription_request')['day_of_month'] + assert response.subscription_request.interval == body.get('subscription_request')['interval'] + assert response.subscription_request.interval_unit == body.get('subscription_request')['interval_unit'] + assert response.subscription_request.links == body.get('subscription_request')['links'] + assert response.subscription_request.metadata == body.get('subscription_request')['metadata'] + assert response.subscription_request.month == body.get('subscription_request')['month'] + assert response.subscription_request.name == body.get('subscription_request')['name'] + assert response.subscription_request.payment_reference == body.get('subscription_request')['payment_reference'] + assert response.subscription_request.retry_if_possible == body.get('subscription_request')['retry_if_possible'] + assert response.subscription_request.start_date == body.get('subscription_request')['start_date'] def test_timeout_billing_requests_select_institution_doesnt_retry(): fixture = helpers.load_fixture('billing_requests')['select_institution']