Skip to content

Commit

Permalink
Crankshaft[BU000002W9FWQ3] Client - Python @ 2016-08-03 14:25:14 +0000
Browse files Browse the repository at this point in the history
8c218f2 Philip Harrison <philip@mailharrison.com>
Bump version to v0.2.3

----------------
  • Loading branch information
Crankshaft Robot committed Aug 3, 2016
1 parent c8b5350 commit cb6f059
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 39 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.2.3 / 2016-08-03

* Allow passing in custom headers (e.g. Accept-Language)
* Add `payments_require_approval` to Mandates
* Add `deducted_fees` to Payouts

# 0.2.2 / 2016-03-16

* Fix duplicate bank account error string representation (#4)
Expand Down Expand Up @@ -33,4 +39,3 @@

Initial public release. This library is in beta until it hits 1.0, so backwards
incompatible changes may be made in minor version releases.

2 changes: 1 addition & 1 deletion gocardless_pro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from .client import Client

__version__ = '0.2.2'
__version__ = '0.2.3'

2 changes: 1 addition & 1 deletion gocardless_pro/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _user_agent(self):
python_version = '.'.join(platform.python_version_tuple()[0:2])
vm_version = '{}.{}.{}-{}{}'.format(*sys.version_info)
return ' '.join([
'gocardless_pro/0.2.2',
'gocardless_pro/0.2.3',
'python/{0}'.format(python_version),
'{0}/{1}'.format(platform.python_implementation(), vm_version),
'{0}/{1}'.format(platform.system(), platform.release()),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name = 'gocardless_pro',
version = '0.2.2',
version = '0.2.3',
packages = find_packages(exclude=['tests']),
install_requires = ['requests>=2.6'],
author = 'GoCardless',
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/creditor_bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
"method": "POST",
"path_template": "/creditor_bank_accounts",
"url_params": [],
"body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}}
"body": {"creditor_bank_accounts":{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}}
},
"list": {
"method": "GET",
"path_template": "/creditor_bank_accounts",
"url_params": [],
"body": {"creditor_bank_accounts":[{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":"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 7202","before":"example before 4783"},"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":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}},{"account_holder_name":"Nude Wines","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":null,"created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"creditor":"CR123"},"metadata":{}}],"meta":{"cursors":{"after":"example after 9828","before":"example before 8266"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/creditor_bank_accounts/:identity",
"url_params": ["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",
"path_template": "/creditor_bank_accounts/:identity/actions/disable",
"url_params": ["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":{}}}
}
}
8 changes: 4 additions & 4 deletions tests/fixtures/creditors.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
"method": "POST",
"path_template": "/creditors",
"url_params": [],
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 2081","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","default_sek_payout_account":"BA789"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}}
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 2081","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":null},"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 1528","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":"BA789"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null},{"address_line1":"338-346 Goswell Road","address_line2":null,"address_line3":"example address_line3 6831","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","default_sek_payout_account":null},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}],"meta":{"cursors":{"after":"example after 1737","before":"example before 5356"},"limit":50}}
"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":"BA123","default_sek_payout_account":"BA789"},"name":"Nude Wines","postal_code":null,"region":"example region 495"},{"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":"BA456","default_gbp_payout_account":null,"default_sek_payout_account":"BA789"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":null}],"meta":{"cursors":{"after":"example after 5356","before":"example before 5429"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/creditors/:identity",
"url_params": ["CR123"],
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 4324","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 1485"}}
"body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 4147","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":"BA789"},"name":"Nude Wines","postal_code":null,"region":null}}
},
"update": {
"method": "PUT",
"path_template": "/creditors/:identity",
"url_params": ["CR123"],
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 1957","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":null,"default_sek_payout_account":"BA789"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 2451"}}
"body": {"creditors":{"address_line1":"338-346 Goswell Road","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":null,"default_gbp_payout_account":"BA123","default_sek_payout_account":"BA789"},"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 1957"}}
}
}
10 changes: 5 additions & 5 deletions tests/fixtures/customer_bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
"method": "POST",
"path_template": "/customer_bank_accounts",
"url_params": [],
"body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 1224"},"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 2818"},"metadata":{}}}
},
"list": {
"method": "GET",
"path_template": "/customer_bank_accounts",
"url_params": [],
"body": {"customer_bank_accounts":[{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 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":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 3616"},"metadata":{}}],"meta":{"cursors":{"after":"example after 540","before":"example before 5786"},"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 3612"},"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 3616"},"metadata":{}}],"meta":{"cursors":{"after":"example after 1224","before":"example before 7903"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/customer_bank_accounts/:identity",
"url_params": ["BA123"],
"body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 7051"},"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 540"},"metadata":{}}}
},
"update": {
"method": "PUT",
"path_template": "/customer_bank_accounts/:identity",
"url_params": ["BA123"],
"body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"GBP","enabled":true,"id":"BA123","links":{"customer":"example customer 7351"},"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 7051"},"metadata":{}}}
},
"disable": {
"method": "POST",
"path_template": "/customer_bank_accounts/:identity/actions/disable",
"url_params": ["BA123"],
"body": {"customer_bank_accounts":{"account_holder_name":"Billy Jean","account_number_ending":"11","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":null,"enabled":true,"id":"BA123","links":{"customer":"example customer 8844"},"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 3640"},"metadata":{}}}
}
}
8 changes: 4 additions & 4 deletions tests/fixtures/customers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
"method": "POST",
"path_template": "/customers",
"url_params": [],
"body": {"customers":{"address_line1":null,"address_line2":null,"address_line3":"City of Westminster","city":null,"company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":null,"given_name":null,"id":"CU123","language":null,"metadata":{},"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","email":null,"family_name":"Osborne","given_name":"Frank","id":"CU123","language":null,"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":null,"company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":null,"id":"CU123","language":"en","metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":null},{"address_line1":null,"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":"user@example.com","family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":null}],"meta":{"cursors":{"after":"example after 8582","before":"example before 8591"},"limit":50}}
"body": {"customers":[{"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","email":"user@example.com","family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":"Greater London","swedish_identity_number":null},{"address_line1":null,"address_line2":"Marylebone","address_line3":null,"city":null,"company_name":null,"country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":null}],"meta":{"cursors":{"after":"example after 9241","before":"example before 3133"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/customers/:identity",
"url_params": ["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":"user@example.com","family_name":"Osborne","given_name":null,"id":"CU123","language":null,"metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"}}
"body": {"customers":{"address_line1":null,"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","language":"en","metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}}
},
"update": {
"method": "PUT",
"path_template": "/customers/:identity",
"url_params": ["CU123"],
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":null,"city":"London","company_name":"Hamilton Trading Ltd.","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"}}
"body": {"customers":{"address_line1":"221B Baker Street","address_line2":null,"address_line3":null,"city":"London","company_name":null,"country_code":null,"created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":null,"given_name":"Frank","id":"CU123","language":null,"metadata":{},"postal_code":null,"region":null,"swedish_identity_number":"556564-5404"}}
}
}
2 changes: 1 addition & 1 deletion tests/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","organisation":"OR123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","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 9183","before":"example before 2305"},"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","organisation":"OR123","parent_event":"EV123","payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","details":{"cause":"bank_account_disabled","description":"Customer's bank account closed","origin":"bank","reason_code":"ADDACS-B","scheme":"bacs"},"id":"EV123","links":{"mandate":"MD123","new_customer_bank_account":"BA123","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 8844","before":"example before 7351"},"limit":50}}
},
"get": {
"method": "GET",
Expand Down
Loading

0 comments on commit cb6f059

Please sign in to comment.