diff --git a/CHANGELOG.md b/CHANGELOG.md index 677adb18..6d69baa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 1.6.0 + +* Add new [Mandate Imports API](https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports) + +# 1.5.0 / 2018-04-11 + +* Add `mandate` to `Refund` links +* Add `mandate` to `PayoutItem` links +* Add `default_aud_payout_account` to `Creditor` links + # 1.4.0 / 2018-03-16 * Add `default_dkk_payout_account` to Creditor @@ -75,13 +85,11 @@ Add `payout_items` API. * Fix support for endpoints that use "data" as the request envelope * Make exception string representations more detailed - # 0.1.1 / 2015-07-08 * Update to api version 2015-07-06 * Add more detailed user agent header - # 0.1.0 / 2015-07-08 Initial public release. This library is in beta until it hits 1.0, so backwards diff --git a/gocardless_pro/__init__.py b/gocardless_pro/__init__.py index c0271cb5..fbbefaf7 100644 --- a/gocardless_pro/__init__.py +++ b/gocardless_pro/__init__.py @@ -2,5 +2,5 @@ from .client import Client -__version__ = '1.5.0' +__version__ = '1.6.0' diff --git a/gocardless_pro/api_client.py b/gocardless_pro/api_client.py index 97491793..acf366db 100644 --- a/gocardless_pro/api_client.py +++ b/gocardless_pro/api_client.py @@ -120,7 +120,7 @@ def _default_headers(self): 'Authorization': 'Bearer {0}'.format(self.access_token), 'Content-Type': 'application/json', 'GoCardless-Client-Library': 'gocardless-pro-python', - 'GoCardless-Client-Version': '1.5.0', + 'GoCardless-Client-Version': '1.6.0', 'User-Agent': self._user_agent(), 'GoCardless-Version': '2015-07-06', } @@ -129,7 +129,7 @@ def _user_agent(self): python_version = '.'.join(platform.python_version_tuple()[0:2]) vm_version = '{}.{}.{}-{}{}'.format(*sys.version_info) return ' '.join([ - 'gocardless-pro-python/1.5.0', + 'gocardless-pro-python/1.6.0', 'python/{0}'.format(python_version), '{0}/{1}'.format(platform.python_implementation(), vm_version), '{0}/{1}'.format(platform.system(), platform.release()), diff --git a/setup.py b/setup.py index 08f91a4e..f4156d58 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = 'gocardless_pro', - version = '1.5.0', + version = '1.6.0', packages = find_packages(exclude=['tests']), install_requires = ['requests>=2.6', 'six'], author = 'GoCardless', diff --git a/tests/fixtures/creditor_bank_accounts.json b/tests/fixtures/creditor_bank_accounts.json index 73e634fc..4a69a7ee 100644 --- a/tests/fixtures/creditor_bank_accounts.json +++ b/tests/fixtures/creditor_bank_accounts.json @@ -3,13 +3,13 @@ "method": "POST", "path_template": "/creditor_bank_accounts", "url_params": [], - "body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}} + "body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}} }, "list": { "method": "GET", "path_template": "/creditor_bank_accounts", "url_params": [], - "body": {"creditor_bank_accounts":[{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 8590","before":"example before 5285"},"limit":50}} + "body": {"creditor_bank_accounts":[{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 3687","before":"example before 8010"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/creditors.json b/tests/fixtures/creditors.json index ee663e00..c10ad0a2 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":null,"address_line2":"Islington","address_line3":"example address_line3 3274","can_create_refunds":false,"city":"London","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":"BA234","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_sek_payout_account":null},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 1318","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 495","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9106","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 5089","can_create_refunds":false,"city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 3300","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4425","region":null,"scheme":"bacs"}],"verification_status":"action_required"}} }, "list": { "method": "GET", "path_template": "/creditors", "url_params": [], - "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 6831","can_create_refunds":false,"city":"London","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":null,"region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 8287","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9947","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 3000","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":"BA234","default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 2451","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 3721","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6159","region":null,"scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 2605","before":"example before 8510"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":null,"can_create_refunds":false,"city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":null,"region":"example region 6831","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 9947","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 8287","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":null,"can_create_refunds":false,"city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":"BA234","default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_sek_payout_account":null},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":null,"region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 4078","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6159","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 9355","before":"example before 9703"},"limit":50}} }, "get": { "method": "GET", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 9828","can_create_refunds":false,"city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":null,"default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":null,"region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 5447","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9718","region":null,"scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 9002","can_create_refunds":false,"city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":"BA234","default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":null,"default_sek_payout_account":null},"logo_url":null,"name":"Nude Wines","postal_code":null,"region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 9828","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2605","region":null,"scheme":"bacs"}],"verification_status":"action_required"}} }, "update": { "method": "PUT", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 2002","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":"BA234","default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":null,"default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 6503","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7940","region":null,"scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 3133","can_create_refunds":false,"city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_aud_payout_account":"BA234","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":null,"default_sek_payout_account":"BA789"},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":null,"scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 3891","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 59","region":null,"scheme":"bacs"}],"verification_status":"action_required"}} } } diff --git a/tests/fixtures/customer_bank_accounts.json b/tests/fixtures/customer_bank_accounts.json index 4c992895..79670f56 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":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 870"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 1359"},"metadata":{}}} }, "list": { "method": "GET", "path_template": "/customer_bank_accounts", "url_params": [], - "body": {"customer_bank_accounts":[{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 8247"},"metadata":{}},{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 565"},"metadata":{}}],"meta":{"cursors":{"after":"example after 6829","before":"example before 4162"},"limit":50}} + "body": {"customer_bank_accounts":[{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 6720"},"metadata":{}},{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 2984"},"metadata":{}}],"meta":{"cursors":{"after":"example after 8010","before":"example before 8247"},"limit":50}} }, "get": { "method": "GET", "path_template": "/customer_bank_accounts/:identity", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 2048"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 4162"},"metadata":{}}} }, "update": { "method": "PUT", "path_template": "/customer_bank_accounts/:identity", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 6756"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 7920"},"metadata":{}}} }, "disable": { "method": "POST", "path_template": "/customer_bank_accounts/:identity/actions/disable", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 6200"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 6756"},"metadata":{}}} } } diff --git a/tests/fixtures/customers.json b/tests/fixtures/customers.json index c3e3066b..09106be9 100644 --- a/tests/fixtures/customers.json +++ b/tests/fixtures/customers.json @@ -3,24 +3,24 @@ "method": "POST", "path_template": "/customers", "url_params": [], - "body": {"customers":{"address_line1":null,"address_line2":null,"address_line3":"City of Westminster","city":"London","company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":null,"family_name":"Osborne","given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}} + "body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":"City of Westminster","city":null,"company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":"user@example.com","family_name":null,"given_name":"Frank","id":"CU123","language":"en","metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":null}} }, "list": { "method": "GET", "path_template": "/customers", "url_params": [], - "body": {"customers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","city":null,"company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":null,"family_name":null,"given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"},{"address_line1":null,"address_line2":null,"address_line3":null,"city":null,"company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":null,"family_name":null,"given_name":"Frank","id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":null}],"meta":{"cursors":{"after":"example after 9819","before":"example before 3086"},"limit":50}} + "body": {"customers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"city":"London","company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":"user@example.com","family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":null},{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"city":null,"company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":null,"family_name":"Osborne","given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 364","before":"example before 8844"},"limit":50}} }, "get": { "method": "GET", "path_template": "/customers/:identity", "url_params": ["CU123"], - "body": {"customers":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"city":"London","company_name":null,"country_code":null,"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":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}} + "body": {"customers":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":null,"family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}} }, "update": { "method": "PUT", "path_template": "/customers/:identity", "url_params": ["CU123"], - "body": {"customers":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"city":null,"company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":null,"family_name":null,"given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}} + "body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":"City of Westminster","city":null,"company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":null,"email":"user@example.com","family_name":null,"given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index 8756657f..65d7394a 100644 --- a/tests/fixtures/events.json +++ b/tests/fixtures/events.json @@ -3,7 +3,7 @@ "method": "GET", "path_template": "/events", "url_params": [], - "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 9456","before":"example before 6629"},"limit":50}} + "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 5695","before":"example before 8666"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/mandate_import_entries.json b/tests/fixtures/mandate_import_entries.json index e9c8facf..fccacbab 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":null},{"created_at":"2014-01-01T12:00:00.000Z","links":{"customer":"CU123","customer_bank_account":"BA123","mandate":"MD123","mandate_import":"IM0000AAAAAAA"},"record_identifier":null}],"meta":{"cursors":{"after":"example after 2520","before":"example before 2632"},"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":null}],"meta":{"cursors":{"after":"example after 2632","before":"example before 9386"},"limit":50}} } } diff --git a/tests/fixtures/mandate_imports.json b/tests/fixtures/mandate_imports.json index de49b0fc..87ee418f 100644 --- a/tests/fixtures/mandate_imports.json +++ b/tests/fixtures/mandate_imports.json @@ -3,24 +3,24 @@ "method": "POST", "path_template": "/mandate_imports", "url_params": [], - "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 417","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 2181","status":"created"}} }, "get": { "method": "GET", "path_template": "/mandate_imports/:identity", "url_params": ["IM000010790WX1"], - "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 1393","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 1853","status":"created"}} }, "submit": { "method": "POST", "path_template": "/mandate_imports/:identity/actions/submit", "url_params": ["IM000010790WX1"], - "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 8470","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 8795","status":"created"}} }, "cancel": { "method": "POST", "path_template": "/mandate_imports/:identity/actions/cancel", "url_params": ["IM000010790WX1"], - "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 8996","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 417","status":"created"}} } } diff --git a/tests/fixtures/mandates.json b/tests/fixtures/mandates.json index 68c2f4c3..54a59c15 100644 --- a/tests/fixtures/mandates.json +++ b/tests/fixtures/mandates.json @@ -3,36 +3,36 @@ "method": "POST", "path_template": "/mandates", "url_params": [], - "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":null,"payments_require_approval":"false","reference":"REF-123","scheme":"bacs","status":"pending_submission"}} + "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":"bacs","status":"pending_submission"}} }, "list": { "method": "GET", "path_template": "/mandates", "url_params": [], - "body": {"mandates":[{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":"bacs","status":"pending_submission"},{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":null,"status":"pending_submission"}],"meta":{"cursors":{"after":"example after 5320","before":"example before 7886"},"limit":50}} + "body": {"mandates":[{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":null,"payments_require_approval":"false","reference":"REF-123","scheme":"bacs","status":"pending_submission"},{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":null,"status":"pending_submission"}],"meta":{"cursors":{"after":"example after 3447","before":"example before 1162"},"limit":50}} }, "get": { "method": "GET", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":"REF-123","scheme":"bacs","status":"pending_submission"}} + "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":null,"status":"pending_submission"}} }, "update": { "method": "PUT", "path_template": "/mandates/:identity", "url_params": ["MD123"], - "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":"bacs","status":"pending_submission"}} + "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":"REF-123","scheme":"bacs","status":"pending_submission"}} }, "cancel": { "method": "POST", "path_template": "/mandates/:identity/actions/cancel", "url_params": ["MD123"], - "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":null,"status":"pending_submission"}} + "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":"bacs","status":"pending_submission"}} }, "reinstate": { "method": "POST", "path_template": "/mandates/:identity/actions/reinstate", "url_params": ["MD123"], - "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":"REF-123","scheme":"bacs","status":"pending_submission"}} + "body": {"mandates":{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","new_mandate":"MD123"},"metadata":{},"next_possible_charge_date":"2014-10-27","payments_require_approval":"false","reference":null,"scheme":null,"status":"pending_submission"}} } } diff --git a/tests/fixtures/payments.json b/tests/fixtures/payments.json index af9f854e..8f9e50ad 100644 --- a/tests/fixtures/payments.json +++ b/tests/fixtures/payments.json @@ -3,31 +3,31 @@ "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":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}} + "body": {"payments":{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}} }, "list": { "method": "GET", "path_template": "/payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 1757","before":"example before 1181"},"limit":50},"payments":[{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"},{"amount":"1000","amount_refunded":"150","charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}]} + "body": {"meta":{"cursors":{"after":"example after 1464","before":"example before 2060"},"limit":50},"payments":[{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"},{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}]} }, "get": { "method": "GET", "path_template": "/payments/:identity", "url_params": ["PM123"], - "body": {"payments":{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"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":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}} }, "update": { "method": "PUT", "path_template": "/payments/:identity", "url_params": ["PM123"], - "body": {"payments":{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}} + "body": {"payments":{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}} }, "cancel": { "method": "POST", "path_template": "/payments/:identity/actions/cancel", "url_params": ["PM123"], - "body": {"payments":{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","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":null,"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}} }, "retry": { "method": "POST", diff --git a/tests/fixtures/payout_items.json b/tests/fixtures/payout_items.json index befe52c0..4bebbf12 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 235","before":"example before 3173"},"limit":10},"payout_items":[{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123"},"type":"payment_paid_out"},{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123"},"type":"payment_paid_out"}]} + "body": {"meta":{"cursors":{"after":"example after 6000","before":"example before 5740"},"limit":10},"payout_items":[{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123"},"type":"payment_paid_out"},{"amount":"45.0","links":{"mandate":"MD123","payment":"PM123"},"type":"payment_paid_out"}]} } } diff --git a/tests/fixtures/payouts.json b/tests/fixtures/payouts.json index 671bc611..481b768b 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 6000","before":"example before 5740"},"limit":50},"payouts":[{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"},{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"}]} + "body": {"meta":{"cursors":{"after":"example after 1040","before":"example before 5014"},"limit":50},"payouts":[{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"},{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/refunds.json b/tests/fixtures/refunds.json index 0ea01baf..e121942e 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 2390","before":"example before 421"},"limit":50},"refunds":[{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"Nude Wines refund"},{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null}]} + "body": {"meta":{"cursors":{"after":"example after 421","before":"example before 6443"},"limit":50},"refunds":[{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null},{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"Nude Wines refund"}]} }, "get": { "method": "GET", diff --git a/tests/fixtures/subscriptions.json b/tests/fixtures/subscriptions.json index 7292d9e3..1b83e8ea 100644 --- a/tests/fixtures/subscriptions.json +++ b/tests/fixtures/subscriptions.json @@ -3,30 +3,30 @@ "method": "POST", "path_template": "/subscriptions", "url_params": [], - "body": {"subscriptions":{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":null,"id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":null,"end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":null,"start_date":null,"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 5265","before":"example before 8151"},"limit":50},"subscriptions":[{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":null,"start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":null,"id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":null,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} + "body": {"meta":{"cursors":{"after":"example after 2395","before":"example before 1544"},"limit":50},"subscriptions":[{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":null,"end_date":null,"id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":"GOLDPLAN","start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":null,"end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","start_date":null,"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":null,"end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":null,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":null,"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","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":null,"id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":null,"end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "cancel": { "method": "POST", "path_template": "/subscriptions/:identity/actions/cancel", "url_params": ["SB123"], - "body": {"subscriptions":{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":null,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":"28","end_date":"2015-10-21","id":"SB123","interval":"1","interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":null,"payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} } }