Skip to content

Commit

Permalink
Crankshaft[BU000001AD6DNJ] Client - PHP @ 2015-07-02 10:47:56 +0000
Browse files Browse the repository at this point in the history
  • Loading branch information
Crankshaft Robot committed Jul 2, 2015
1 parent dea3c89 commit c31e91a
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add this repository to the contents of your `composer.json`:
```javascript
{
"require": {
"gocardless/gocardless-pro-php": "0.1.1"
"gocardless/gocardless-pro-php": "0.2.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"squizlabs/php_codesniffer": "~2.0",
"phpdocumentor/phpdocumentor": "2.*"
},
"version": "0.1.1",
"version": "0.2.0",
"autoload": {
"psr-4": {
"GoCardlessPro\\" : "lib/GoCardlessPro"
Expand Down
2 changes: 1 addition & 1 deletion lib/GoCardlessPro/Core/CurlWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private function getUserAgent()
{
$curlinfo = curl_version();
$uagent = array();
$uagent[] = 'gocardless-pro-php/0.1.1';
$uagent[] = 'gocardless-pro-php/0.2.0';
$uagent[] = 'php/' . phpversion();
$uagent[] = 'curl/' . $curlinfo['version'];
$uagent[] = 'os/' . $curlinfo['host'];
Expand Down
6 changes: 3 additions & 3 deletions tests/GoCardlessPro/fixtures/creditor_bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"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":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}}
"body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":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":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 9703","before":"example before 4538"},"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":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 9355","before":"example before 9703"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/creditor_bank_accounts/:identity",
"url_params": {"identity": "BA123"},
"body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}}
"body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}}
},
"disable": {
"method": "POST",
Expand Down
8 changes: 4 additions & 4 deletions tests/GoCardlessPro/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":null,"address_line2":null,"address_line3":"example address_line3 2540","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":"BA123"},"name":"Nude Wines","postal_code":null,"region":"example region 3300"}}
"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"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}}
},
"list": {
"method": "GET",
"path_template": "/creditors",
"url_params": {},
"body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3274","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},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null},{"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":null},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}],"meta":{"cursors":{"after":"example after 5541","before":"example before 408"},"limit":50}}
"body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 3237","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"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 495"},{"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},"name":"Nude Wines","postal_code":null,"region":"example region 9947"}],"meta":{"cursors":{"after":"example after 3300","before":"example before 694"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/creditors/:identity",
"url_params": {"identity": "CR123"},
"body": {"creditors":{"address_line1":"338-346 Goswell Road","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":"BA456","default_gbp_payout_account":null},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}}
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 6831","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"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}}
},
"update": {
"method": "PUT",
"path_template": "/creditors/:identity",
"url_params": {"identity": "CR123"},
"body": {"creditors":{"address_line1":null,"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":"BA123"},"name":"Nude Wines","postal_code":null,"region":"example region 2433"}}
"body": {"creditors":{"address_line1":"338-346 Goswell Road","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":"BA456","default_gbp_payout_account":null},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 1957"}}
}
}

8 changes: 4 additions & 4 deletions tests/GoCardlessPro/fixtures/customer_bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"method": "POST",
"path_template": "/customer_bank_accounts",
"url_params": {},
"body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 7726"},"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 5802"},"metadata":{}}}
},
"list": {
"method": "GET",
"path_template": "/customer_bank_accounts",
"url_params": {},
"body": {"customer_bank_accounts":[{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 3981"},"metadata":{}},{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 1270"},"metadata":{}}],"meta":{"cursors":{"after":"example after 493","before":"example before 3086"},"limit":50}}
"body": {"customer_bank_accounts":[{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 1270"},"metadata":{}},{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 9819"},"metadata":{}}],"meta":{"cursors":{"after":"example after 2066","before":"example before 2079"},"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":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 9819"},"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 6052"},"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 7175"},"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 4885"},"metadata":{}}}
},
"disable": {
"method": "POST",
Expand Down
8 changes: 4 additions & 4 deletions tests/GoCardlessPro/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":"Marylebone","address_line3":null,"city":"London","company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":"Osborne","given_name":null,"id":"CU123","metadata":{},"postal_code":"NW1 6XE","region":null}}
"body": {"customers":{"address_line1":null,"address_line2":"Marylebone","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":"Frank","id":"CU123","metadata":{},"postal_code":"NW1 6XE","region":null}}
},
"list": {
"method": "GET",
"path_template": "/customers",
"url_params": {},
"body": {"customers":[{"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":null,"given_name":"Frank","id":"CU123","metadata":{},"postal_code":null,"region":null},{"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","email":null,"family_name":null,"given_name":"Frank","id":"CU123","metadata":{},"postal_code":null,"region":"Greater London"}],"meta":{"cursors":{"after":"example after 9843","before":"example before 552"},"limit":50}}
"body": {"customers":[{"address_line1":null,"address_line2":null,"address_line3":null,"city":null,"company_name":"Hamilton Trading Ltd.","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":null,"given_name":"Frank","id":"CU123","metadata":{},"postal_code":null,"region":null},{"address_line1":"221B Baker Street","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","email":null,"family_name":null,"given_name":"Frank","id":"CU123","metadata":{},"postal_code":"NW1 6XE","region":null}],"meta":{"cursors":{"after":"example after 1577","before":"example before 5094"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/customers/:identity",
"url_params": {"identity": "CU123"},
"body": {"customers":{"address_line1":null,"address_line2":null,"address_line3":null,"city":null,"company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":"[email protected]","family_name":"Osborne","given_name":"Frank","id":"CU123","metadata":{},"postal_code":"NW1 6XE","region":"Greater London"}}
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"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","metadata":{},"postal_code":null,"region":null}}
},
"update": {
"method": "PUT",
"path_template": "/customers/:identity",
"url_params": {"identity": "CU123"},
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"city":null,"company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":null,"family_name":"Osborne","given_name":"Frank","id":"CU123","metadata":{},"postal_code":"NW1 6XE","region":"Greater London"}}
"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":null,"given_name":null,"id":"CU123","metadata":{},"postal_code":"NW1 6XE","region":"Greater London"}}
}
}

2 changes: 1 addition & 1 deletion tests/GoCardlessPro/fixtures/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"method": "GET",
"path_template": "/events",
"url_params": {},
"body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","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 3749","before":"example before 1387"},"limit":50}}
"body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","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 1528","before":"example before 3749"},"limit":50}}
},
"get": {
"method": "GET",
Expand Down
Loading

0 comments on commit c31e91a

Please sign in to comment.