diff --git a/CHANGELOG.md b/CHANGELOG.md index aa3195c2..1dd79342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.11.0 + +* Add fx_payout_currency to creditor +* Add fx to payment, payout and refund + # 1.10.0 * Addition of the customer removal API diff --git a/tests/fixtures/creditor_bank_accounts.json b/tests/fixtures/creditor_bank_accounts.json index 0284a8d6..855f3d7d 100644 --- a/tests/fixtures/creditor_bank_accounts.json +++ b/tests/fixtures/creditor_bank_accounts.json @@ -9,13 +9,13 @@ "method": "GET", "path_template": "/creditor_bank_accounts", "url_params": [], - "body": {"creditor_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 6137","before":"example before 9267"},"limit":50}} + "body": {"creditor_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"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 8582","before":"example before 8591"},"limit":50}} }, "get": { "method": "GET", "path_template": "/creditor_bank_accounts/:identity", "url_params": ["BA123"], - "body": {"creditor_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"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":{}}} + "body": {"creditor_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}} }, "disable": { "method": "POST", diff --git a/tests/fixtures/creditors.json b/tests/fixtures/creditors.json index e4830b88..649562b0 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":null,"can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":null},"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":"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 9106","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1211","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 495","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","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":null,"default_nzd_payout_account":"BA791","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":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 2081","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4059","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} }, "list": { "method": "GET", "path_template": "/creditors", "url_params": [], - "body": {"creditors":[{"address_line1":null,"address_line2":null,"address_line3":null,"can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":null,"default_cad_payout_account":null,"default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 3090","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 8287","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2888","region":null,"scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","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","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":null,"default_cad_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_nzd_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":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 6159","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1353","region":null,"scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 9828","before":"example before 8266"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":null,"can_create_refunds":false,"city":"London","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":null,"default_cad_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":null,"default_nzd_payout_account":"BA791","default_sek_payout_account":null},"logo_url":null,"name":"Nude Wines","postal_code":null,"region":"example region 2433","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 7387","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6831","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 4324","can_create_refunds":false,"city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":null,"default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":null,"default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789"},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":null,"region":"example region 9828","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 4538","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2888","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 8047","before":"example before 6258"},"limit":50}} }, "get": { "method": "GET", "path_template": "/creditors/:identity", "url_params": ["CR123"], - "body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":null,"can_create_refunds":false,"city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":null,"default_cad_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":null,"default_nzd_payout_account":"BA791","default_sek_payout_account":null},"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 5447","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1577","region":null,"scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":null,"can_create_refunds":false,"city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":null,"default_nzd_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":"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 1563","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5746","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":null,"address_line3":"example address_line3 6503","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":null,"default_eur_payout_account":null,"default_gbp_payout_account":null,"default_nzd_payout_account":"BA791","default_sek_payout_account":null},"logo_url":null,"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 8878","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9336","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} + "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","fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":null,"default_dkk_payout_account":"BA790","default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789"},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 5285","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 1515","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9757","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} } } diff --git a/tests/fixtures/customer_bank_accounts.json b/tests/fixtures/customer_bank_accounts.json index 56e901a0..724e6a8c 100644 --- a/tests/fixtures/customer_bank_accounts.json +++ b/tests/fixtures/customer_bank_accounts.json @@ -3,13 +3,13 @@ "method": "POST", "path_template": "/customer_bank_accounts", "url_params": [], - "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 7807"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","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 6157"},"metadata":{}}} }, "list": { "method": "GET", "path_template": "/customer_bank_accounts", "url_params": [], - "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8795"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 8470"},"metadata":{}}],"meta":{"cursors":{"after":"example after 2632","before":"example before 9386"},"limit":50}} + "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"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 1393"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 2520"},"metadata":{}}],"meta":{"cursors":{"after":"example after 8795","before":"example before 1853"},"limit":50}} }, "get": { "method": "GET", @@ -21,12 +21,12 @@ "method": "PUT", "path_template": "/customer_bank_accounts/:identity", "url_params": ["BA123"], - "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"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 2420"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":null,"bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 2420"},"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":"11","account_type":null,"bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 2954"},"metadata":{}}} + "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"11","account_type":"savings","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 1757"},"metadata":{}}} } } diff --git a/tests/fixtures/customer_notifications.json b/tests/fixtures/customer_notifications.json index 6058e032..12f08d2c 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 9516","action_taken_at":"2019-10-16T14:05:07.942Z","action_taken_by":null,"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 7039","action_taken_at":null,"action_taken_by":null,"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 684e9378..22c7ad2d 100644 --- a/tests/fixtures/customers.json +++ b/tests/fixtures/customers.json @@ -3,30 +3,30 @@ "method": "POST", "path_template": "/customers", "url_params": [], - "body": {"customers":{"address_line1":null,"address_line2":null,"address_line3":null,"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":{},"phone_number":"+64 4 817 9999","postal_code":null,"region":"Greater London","swedish_identity_number":null}} + "body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":null,"city":"London","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":{},"phone_number":null,"postal_code":"NW1 6XE","region":null,"swedish_identity_number":null}} }, "list": { "method": "GET", "path_template": "/customers", "url_params": [], - "body": {"customers":[{"address_line1":null,"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":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"},{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"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":null,"region":null,"swedish_identity_number":null}],"meta":{"cursors":{"after":"example after 1166","before":"example before 1968"},"limit":50}} + "body": {"customers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","city":null,"company_name":"Hamilton Trading Ltd.","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":{},"phone_number":null,"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"},{"address_line1":null,"address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":null,"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":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 4535","before":"example before 3710"},"limit":50}} }, "get": { "method": "GET", "path_template": "/customers/:identity", "url_params": ["CU123"], - "body": {"customers":{"address_line1":null,"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":null,"family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"phone_number":"+64 4 817 9999","postal_code":null,"region":"Greater London","swedish_identity_number":null}} + "body": {"customers":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"city":null,"company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","email":null,"family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"phone_number":null,"postal_code":"NW1 6XE","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":null,"address_line3":"City of Westminster","city":null,"company_name":null,"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":null,"postal_code":"NW1 6XE","region":null,"swedish_identity_number":null}} + "body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":"City of Westminster","city":null,"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":null,"given_name":null,"id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999","postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}} }, "remove": { "method": "DELETE", "path_template": "/customers/:identity", "url_params": ["CU123"], - "body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"city":"London","company_name":"Hamilton Trading Ltd.","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":{},"phone_number":"+64 4 817 9999","postal_code":null,"region":"Greater London","swedish_identity_number":null}} + "body": {"customers":{"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":"user@example.com","family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"phone_number":"+64 4 817 9999","postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}} } } diff --git a/tests/fixtures/events.json b/tests/fixtures/events.json index a42b144e..8bcda80a 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","customer_notifications":null,"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","customer_notifications":null,"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 4637","before":"example before 1533"},"limit":50}} + "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2019-10-16T14:21:52.066Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"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","customer_notifications":null,"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 2804","before":"example before 6685"},"limit":50}} }, "get": { "method": "GET", diff --git a/tests/fixtures/mandate_import_entries.json b/tests/fixtures/mandate_import_entries.json index 453cf240..ce698d5d 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":"bank-file.xml/line-1"}],"meta":{"cursors":{"after":"example after 1606","before":"example before 9648"},"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 6117","before":"example before 371"},"limit":50}} } } diff --git a/tests/fixtures/mandate_imports.json b/tests/fixtures/mandate_imports.json index 1bb89c16..0fdc78db 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 2395","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 3524","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 2174","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 7293","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 1237","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 1606","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 3524","status":"created"}} + "body": {"mandate_imports":{"created_at":"2014-01-01T12:00:00.000Z","id":"IM000010790WX1","scheme":"example scheme 9648","status":"created"}} } } diff --git a/tests/fixtures/mandates.json b/tests/fixtures/mandates.json index 721677c5..10f45e91 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":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":null,"scheme":null,"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":null,"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":null,"payments_require_approval":"false","reference":"REF-123","scheme":null,"status":"pending_submission"}],"meta":{"cursors":{"after":"example after 9284","before":"example before 6000"},"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":null,"payments_require_approval":"false","reference":"REF-123","scheme":null,"status":"pending_submission"}],"meta":{"cursors":{"after":"example after 8662","before":"example before 1040"},"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":null,"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":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":"REF-123","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":null,"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":null,"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":null,"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":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":null,"payments_require_approval":"false","reference":"REF-123","scheme":null,"status":"pending_submission"}} } } diff --git a/tests/fixtures/payments.json b/tests/fixtures/payments.json index fc661f96..6b5846ae 100644 --- a/tests/fixtures/payments.json +++ b/tests/fixtures/payments.json @@ -9,30 +9,30 @@ "method": "GET", "path_template": "/payments", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 7008","before":"example before 8408"},"limit":50},"payments":[{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"fx":{"estimated_exchange_rate":1.316,"exchange_rate":1.153,"fx_amount":null,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"},{"amount":"1000","amount_refunded":"150","charge_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}]} + "body": {"meta":{"cursors":{"after":"example after 6774","before":"example before 3653"},"limit":50},"payments":[{"amount":"1000","amount_refunded":"150","charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":null,"fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"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,"fx":{"estimated_exchange_rate":null,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","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":null,"fx":{"estimated_exchange_rate":1.316,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"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,"fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","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","fx":{"estimated_exchange_rate":null,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"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,"fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","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,"fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":null,"fx_currency":"EUR"},"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":null,"fx":{"estimated_exchange_rate":null,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}} }, "retry": { "method": "POST", "path_template": "/payments/:identity/actions/retry", "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","fx":{"estimated_exchange_rate":null,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"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":"One-off upgrade fee","fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}} } } diff --git a/tests/fixtures/payout_items.json b/tests/fixtures/payout_items.json index f0345615..96e56722 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 6861","before":"example before 9159"},"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 8345","before":"example before 7418"},"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 e675a106..05abd081 100644 --- a/tests/fixtures/payouts.json +++ b/tests/fixtures/payouts.json @@ -3,12 +3,12 @@ "method": "GET", "path_template": "/payouts", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 6789","before":"example before 4698"},"limit":50},"payouts":[{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","fx":{"estimated_exchange_rate":1.316,"exchange_rate":1.153,"fx_amount":null,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"},{"amount":"1000","arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"}]} + "body": {"meta":{"cursors":{"after":"example after 2409","before":"example before 9430"},"limit":50},"payouts":[{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"},{"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.316,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"}]} }, "get": { "method": "GET", "path_template": "/payouts/:identity", "url_params": ["PO123"], - "body": {"payouts":{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","fx":{"estimated_exchange_rate":null,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"}} + "body": {"payouts":{"amount":"1000","arrival_date":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":"20","fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"payout_type":"merchant","reference":"ref-1","status":"pending"}} } } diff --git a/tests/fixtures/refunds.json b/tests/fixtures/refunds.json index 8c2d5a9c..7ad54770 100644 --- a/tests/fixtures/refunds.json +++ b/tests/fixtures/refunds.json @@ -3,24 +3,24 @@ "method": "POST", "path_template": "/refunds", "url_params": [], - "body": {"refunds":{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":null,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null}} + "body": {"refunds":{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":null,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001"}} }, "list": { "method": "GET", "path_template": "/refunds", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 556","before":"example before 7695"},"limit":50},"refunds":[{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":"1150","fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null},{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001"}]} + "body": {"meta":{"cursors":{"after":"example after 4834","before":"example before 8477"},"limit":50},"refunds":[{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":1.316,"exchange_rate":1.153,"fx_amount":null,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001"},{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":1.316,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null}]} }, "get": { "method": "GET", "path_template": "/refunds/:identity", "url_params": ["RF123"], - "body": {"refunds":{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":1.316,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null}} + "body": {"refunds":{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":"WINEBOX001"}} }, "update": { "method": "PUT", "path_template": "/refunds/:identity", "url_params": ["RF123"], - "body": {"refunds":{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":1.316,"exchange_rate":null,"fx_amount":null,"fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null}} + "body": {"refunds":{"amount":"150","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","fx":{"estimated_exchange_rate":null,"exchange_rate":1.153,"fx_amount":"1150","fx_currency":"EUR"},"id":"RF123","links":{"mandate":"MD123","payment":"PM123"},"metadata":{},"reference":null}} } } diff --git a/tests/fixtures/subscriptions.json b/tests/fixtures/subscriptions.json index 00c12817..cef5d630 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","app_fee":"100","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":null,"payment_reference":null,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","app_fee":"100","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"}]}} }, "list": { "method": "GET", "path_template": "/subscriptions", "url_params": [], - "body": {"meta":{"cursors":{"after":"example after 3740","before":"example before 1306"},"limit":50},"subscriptions":[{"amount":"1000","app_fee":null,"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":"12 month subscription","payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":"1000","app_fee":"100","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"}]}]} + "body": {"meta":{"cursors":{"after":"example after 6972","before":"example before 9253"},"limit":50},"subscriptions":[{"amount":"1000","app_fee":null,"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":"12 month subscription","payment_reference":null,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":"1000","app_fee":"100","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":"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","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":"12 month subscription","payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","app_fee":"100","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":null,"payment_reference":null,"start_date":null,"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","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":null,"start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","app_fee":"100","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":"2014-10-21","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","app_fee":"100","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":"12 month subscription","payment_reference":"GOLDPLAN","start_date":null,"status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} + "body": {"subscriptions":{"amount":"1000","app_fee":"100","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":null,"payment_reference":null,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} } }