Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 4805503

Browse files
author
Crankshaft Robot
committed
Crankshaft[BU000002F7NNZG] Client - PHP @ 2016-01-12 12:08:10 +0000
1 parent 6bf001d commit 4805503

File tree

9 files changed

+27
-23
lines changed

9 files changed

+27
-23
lines changed

lib/Resources/Payment.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ class Payment extends BaseResource
8383
* An optional payment reference that will appear on your customer's bank
8484
* statement. For Bacs payments this can be up to 10 characters, for SEPA
8585
* payments the limit is 140 characters, and for Autogiro payments the limit
86-
* is 11 characters.
86+
* is 11 characters. <p
87+
* class='restricted-notice'><strong>Restricted</strong>: You need your own
88+
* Service User Number to specify a payment reference for Bacs payments.</p>
8789
*/
8890
protected $reference;
8991

lib/Resources/Subscription.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ class Subscription extends BaseResource
114114
* An optional payment reference. This will be set as the reference on each
115115
* payment created and will appear on your customer's bank statement. See
116116
* the documentation for the [create payment
117-
* endpoint](#payments-create-a-payment) for more details.
117+
* endpoint](#payments-create-a-payment) for more details. <p
118+
* class='restricted-notice'><strong>Restricted</strong>: You need your own
119+
* Service User Number to specify a payment reference for Bacs payments.</p>
118120
*/
119121
protected $payment_reference;
120122

tests/fixtures/creditor_bank_accounts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"method": "GET",
1010
"path_template": "/creditor_bank_accounts",
1111
"url_params": {},
12-
"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":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 4783","before":"example before 5746"},"limit":50}}
12+
"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":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 5746","before":"example before 4783"},"limit":50}}
1313
},
1414
"get": {
1515
"method": "GET",

tests/fixtures/creditors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"method": "POST",
44
"path_template": "/creditors",
55
"url_params": {},
6-
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 694","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":"BA789"},"name":"Nude Wines","postal_code":null,"region":null}}
6+
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","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":"BA123","default_sek_payout_account":null},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 2540"}}
77
},
88
"list": {
99
"method": "GET",
1010
"path_template": "/creditors",
1111
"url_params": {},
12-
"body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 1445","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":"BA789"},"name":"Nude Wines","postal_code":null,"region":"example region 1528"},{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 8287","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},"name":"Nude Wines","postal_code":null,"region":null}],"meta":{"cursors":{"after":"example after 1737","before":"example before 631"},"limit":50}}
12+
"body": {"creditors":[{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 1528","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"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 495"},{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 1737","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":null},"name":"Nude Wines","postal_code":null,"region":"example region 2790"}],"meta":{"cursors":{"after":"example after 631","before":"example before 1485"},"limit":50}}
1313
},
1414
"get": {
1515
"method": "GET",
1616
"path_template": "/creditors/:identity",
1717
"url_params": {"identity": "CR123"},
18-
"body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 6413","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"},"name":"Nude Wines","postal_code":null,"region":"example region 2433"}}
18+
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":null,"city":"London","country_code":null,"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"},"name":"Nude Wines","postal_code":null,"region":"example region 6413"}}
1919
},
2020
"update": {
2121
"method": "PUT",
2222
"path_template": "/creditors/:identity",
2323
"url_params": {"identity": "CR123"},
24-
"body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 9355","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"},"name":"Nude Wines","postal_code":null,"region":"example region 7189"}}
24+
"body": {"creditors":{"address_line1":null,"address_line2":null,"address_line3":"example address_line3 2888","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},"name":"Nude Wines","postal_code":null,"region":"example region 3000"}}
2525
}
2626
}
2727

tests/fixtures/customer_bank_accounts.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"method": "POST",
44
"path_template": "/customer_bank_accounts",
55
"url_params": {},
6-
"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 4547"},"metadata":{}}}
6+
"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 3612"},"metadata":{}}}
77
},
88
"list": {
99
"method": "GET",
1010
"path_template": "/customer_bank_accounts",
1111
"url_params": {},
12-
"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 1532"},"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 7839"},"metadata":{}}],"meta":{"cursors":{"after":"example after 5786","before":"example before 7051"},"limit":50}}
12+
"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 7839"},"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 7051"},"metadata":{}}],"meta":{"cursors":{"after":"example after 1532","before":"example before 3616"},"limit":50}}
1313
},
1414
"get": {
1515
"method": "GET",
1616
"path_template": "/customer_bank_accounts/:identity",
1717
"url_params": {"identity": "BA123"},
18-
"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 3640"},"metadata":{}}}
18+
"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 8076"},"metadata":{}}}
1919
},
2020
"update": {
2121
"method": "PUT",
2222
"path_template": "/customer_bank_accounts/:identity",
2323
"url_params": {"identity": "BA123"},
24-
"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 7351"},"metadata":{}}}
24+
"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 8844"},"metadata":{}}}
2525
},
2626
"disable": {
2727
"method": "POST",

tests/fixtures/customers.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"method": "POST",
44
"path_template": "/customers",
55
"url_params": {},
6-
"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","email":null,"family_name":null,"given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"}}
6+
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":"City of Westminster","city":"London","company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":null,"given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}}
77
},
88
"list": {
99
"method": "GET",
1010
"path_template": "/customers",
1111
"url_params": {},
12-
"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","email":null,"family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"postal_code":"NW1 6XE","region":null,"swedish_identity_number":"556564-5404"},{"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":null,"family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 3891","before":"example before 8643"},"limit":50}}
12+
"body": {"customers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"city":"London","company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},{"address_line1":null,"address_line2":null,"address_line3":"City of Westminster","city":null,"company_name":null,"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":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}],"meta":{"cursors":{"after":"example after 5384","before":"example before 8582"},"limit":50}}
1313
},
1414
"get": {
1515
"method": "GET",
1616
"path_template": "/customers/:identity",
1717
"url_params": {"identity": "CU123"},
18-
"body": {"customers":{"address_line1":null,"address_line2":null,"address_line3":"City of Westminster","city":"London","company_name":null,"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":null,"region":null,"swedish_identity_number":"556564-5404"}}
18+
"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","email":"[email protected]","family_name":"Osborne","given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":null,"region":null,"swedish_identity_number":null}}
1919
},
2020
"update": {
2121
"method": "PUT",
2222
"path_template": "/customers/:identity",
2323
"url_params": {"identity": "CU123"},
24-
"body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":"City of Westminster","city":null,"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":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":"556564-5404"}}
24+
"body": {"customers":{"address_line1":null,"address_line2":"Marylebone","address_line3":"City of Westminster","city":null,"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":null,"metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":null}}
2525
}
2626
}
2727

tests/fixtures/mandates.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"method": "GET",
1010
"path_template": "/mandates",
1111
"url_params": {},
12-
"body": {"mandates":[{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer_bank_account":"BA123"},"metadata":{},"next_possible_charge_date":"2014-10-27","reference":"REF-123","scheme":null,"status":"pending_submission"},{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer_bank_account":"BA123"},"metadata":{},"next_possible_charge_date":"2014-10-27","reference":"REF-123","scheme":"bacs","status":"pending_submission"}],"meta":{"cursors":{"after":"example after 3231","before":"example before 3767"},"limit":50}}
12+
"body": {"mandates":[{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer_bank_account":"BA123"},"metadata":{},"next_possible_charge_date":"2014-10-27","reference":null,"scheme":null,"status":"pending_submission"},{"created_at":"2014-01-01T12:00:00.000Z","id":"MD123","links":{"creditor":"CR123","customer_bank_account":"BA123"},"metadata":{},"next_possible_charge_date":"2014-10-27","reference":null,"scheme":"bacs","status":"pending_submission"}],"meta":{"cursors":{"after":"example after 4208","before":"example before 7342"},"limit":50}}
1313
},
1414
"get": {
1515
"method": "GET",

tests/fixtures/payments.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"method": "GET",
1010
"path_template": "/payments",
1111
"url_params": {},
12-
"body": {"meta":{"cursors":{"after":"example after 565","before":"example before 8010"},"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":"WINEBOX001","status":"submitted"},{"amount":"1000","amount_refunded":"150","charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}]}
12+
"body": {"meta":{"cursors":{"after":"example after 8010","before":"example before 565"},"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":"WINEBOX001","status":"submitted"},{"amount":"1000","amount_refunded":"150","charge_date":"2014-05-21","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","description":"One-off upgrade fee","id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":"WINEBOX001","status":"submitted"}]}
1313
},
1414
"get": {
1515
"method": "GET",
@@ -33,7 +33,7 @@
3333
"method": "POST",
3434
"path_template": "/payments/:identity/actions/retry",
3535
"url_params": {"identity": "PM123"},
36-
"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"}}
36+
"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","id":"PM123","links":{"creditor":"CR123","mandate":"MD123","payout":"PO123","subscription":"SU123"},"metadata":{},"reference":null,"status":"submitted"}}
3737
}
3838
}
3939

0 commit comments

Comments
 (0)