Skip to content

Commit

Permalink
Crankshaft[BU000003F8WSH3] Client - PHP @ 2017-02-17 12:33:06 +0000
Browse files Browse the repository at this point in the history
  • Loading branch information
Crankshaft Robot committed Feb 17, 2017
1 parent e181457 commit a87e13d
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 39 deletions.
9 changes: 5 additions & 4 deletions lib/Resources/Creditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ class Creditor extends BaseResource
protected $region;

/**
* The scheme identifiers this creditor can create mandates against.
* An array of the scheme identifiers this creditor can create mandates
* against.
*
* The support address, `phone_number` and `email` fields are for
* customers to contact the merchant for support purposes. They must be
* displayed on the payment page, please see our [compliance
* The support address, `phone_number` and `email`
* fields are for customers to contact the merchant for support purposes.
* They must be displayed on the payment page, please see our [compliance
* requirements](#appendix-compliance-requirements) for more details.
*/
protected $scheme_identifiers;
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/creditor_bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -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":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","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":null,"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":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"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":{}}],"meta":{"cursors":{"after":"example after 9843","before":"example before 552"},"limit":50}}
"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":"GBP","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"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":{}}],"meta":{"cursors":{"after":"example after 7425","before":"example before 1598"},"limit":50}}
},
"get": {
"method": "GET",
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/creditors.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"method": "POST",
"path_template": "/creditors",
"url_params": {},
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 495","city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"logo_url":null,"name":"Nude Wines","postal_code":null,"region":"example region 5089","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 4425","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4059","region":null,"scheme":"sepa_core"}]}}
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":null,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"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 3237","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":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 4728","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 8162","region":null,"scheme":"autogiro"}]}}
},
"list": {
"method": "GET",
"path_template": "/creditors",
"url_params": {},
"body": {"creditors":[{"address_line1":null,"address_line2":"Islington","address_line3":null,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_eur_payout_account":"BA456","default_gbp_payout_account":null,"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":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 6831","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5541","region":"Greater London","scheme":"bacs"}]},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3090","city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"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 7189","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 8705","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2888","region":"Greater London","scheme":"bacs"}]}],"meta":{"cursors":{"after":"example after 1528","before":"example before 5466"},"limit":50}}
"body": {"creditors":[{"address_line1":null,"address_line2":"Islington","address_line3":null,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_eur_payout_account":null,"default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":null,"region":"example region 1528","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":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 3015","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7387","region":null,"scheme":"sepa_core"}]},{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":null,"city":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"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":null,"region":"example region 3000","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":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 563","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 4147","region":null,"scheme":"sepa_core"}]}],"meta":{"cursors":{"after":"example after 2888","before":"example before 4538"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/creditors/:identity",
"url_params": {"identity": "CR123"},
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":null,"city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_eur_payout_account":"BA456","default_gbp_payout_account":null,"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":"Marylebone","address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 5561","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9828","region":null,"scheme":"bacs"}]}}
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":null,"city":"London","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"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":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":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 5746","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7202","region":"Greater London","scheme":"sepa_core"}]}}
},
"update": {
"method": "PUT",
"path_template": "/creditors/:identity",
"url_params": {"identity": "CR123"},
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 2546","city":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"default_eur_payout_account":"BA456","default_gbp_payout_account":null,"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":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 7996","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 6420","region":"Greater London","scheme":"sepa_core"}]}}
"body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":null,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","id":"CR123","links":{"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":"example region 2546","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"GBP","email":"[email protected]","minimum_advance_notice":3,"name":"example name 59","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 8643","region":null,"scheme":"autogiro"}]}}
}
}

8 changes: 4 additions & 4 deletions tests/fixtures/customer_bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
"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":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 4657"},"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 4415"},"metadata":{}}],"meta":{"cursors":{"after":"example after 3430","before":"example before 3039"},"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":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 4657"},"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 3039"},"metadata":{}}],"meta":{"cursors":{"after":"example after 3162","before":"example before 4904"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/customer_bank_accounts/:identity",
"url_params": {"identity": "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 9700"},"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 3430"},"metadata":{}}}
},
"update": {
"method": "PUT",
"path_template": "/customer_bank_accounts/:identity",
"url_params": {"identity": "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 1359"},"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":{}}}
},
"disable": {
"method": "POST",
"path_template": "/customer_bank_accounts/:identity/actions/disable",
"url_params": {"identity": "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 783"},"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 783"},"metadata":{}}}
}
}

8 changes: 4 additions & 4 deletions tests/fixtures/customers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"method": "POST",
"path_template": "/customers",
"url_params": {},
"body": {"customers":{"address_line1":null,"address_line2":null,"address_line3":"City of Westminster","city":null,"company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":"Osborne","given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":null}}
"body": {"customers":{"address_line1":"221B Baker Street","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","email":null,"family_name":"Osborne","given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":null,"region":null,"swedish_identity_number":null}}
},
"list": {
"method": "GET",
"path_template": "/customers",
"url_params": {},
"body": {"customers":[{"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","email":null,"family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":null},{"address_line1":null,"address_line2":null,"address_line3":null,"city":null,"company_name":"Hamilton Trading Ltd.","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":"[email protected]","family_name":"Osborne","given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 540","before":"example before 7839"},"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","email":null,"family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"},{"address_line1":null,"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","email":"[email protected]","family_name":"Osborne","given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 7839","before":"example before 3616"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/customers/:identity",
"url_params": {"identity": "CU123"},
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"city":"London","company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":null,"given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}}
"body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":null,"city":null,"company_name":"Hamilton Trading Ltd.","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":"[email protected]","family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":null}}
},
"update": {
"method": "PUT",
"path_template": "/customers/:identity",
"url_params": {"identity": "CU123"},
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":"[email protected]","family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}}
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","city":"London","company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":"[email protected]","family_name":"Osborne","given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}}
}
}

Loading

0 comments on commit a87e13d

Please sign in to comment.