Skip to content

Commit

Permalink
Crankshaft[BU000003J5K73J] Client - Python @ 2017-02-22 09:55:14 +0000
Browse files Browse the repository at this point in the history
5490860 Jacob Pargin <jacobpgn@users.noreply.github.com>
Merge pull request #18 from gocardless/fix-build

Prepare for 0.3.0 release

----------------

6373e48 Jacob Pargin <jacob@gocardless.com>
Bump version to 0.3.0

----------------

d436b6f Jacob Pargin <jacob@gocardless.com>
Install dependencies on Circle before tests

----------------
  • Loading branch information
Crankshaft Robot committed Feb 22, 2017
1 parent e822ee8 commit e6bfa49
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 40 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.3.0 / 2017-02-22

* Add `scheme_identifiers` and `logo_url` to `creditor` resource
* Updates documentation
* Add `new_mandate` to `event` `Links`
* Add `new_mandate` and `customer` to `mandate` `Links`
* Remove unused `count` from `subscription` response

# 0.2.5 / 2017-02-21

* Add `six` dependency
Expand Down
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
checkout:
post:
- pip install -U six packaging appdirs
- pip install -U setuptools
- pip install -r requirements-dev.txt
machine:
Expand Down
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.5'
__version__ = '0.3.0'

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.5',
'gocardless_pro/0.3.0',
'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 @@ -6,7 +6,7 @@

setup(
name = 'gocardless_pro',
version = '0.2.5',
version = '0.3.0',
packages = find_packages(exclude=['tests']),
install_requires = ['requests>=2.6', 'six'],
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":"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":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 7940","before":"example before 9107"},"limit":50}}
"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 1515","before":"example before 9757"},"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":"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":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":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":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":"Islington","address_line3":"example address_line3 3300","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":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":"user@example.com","minimum_advance_notice":3,"name":"example name 1445","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1211","region":"Greater London","scheme":"autogiro"}]}}
"body": {"creditors":{"address_line1":null,"address_line2":"Islington","address_line3":"example address_line3 1211","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"},"logo_url":null,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 3237","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":"user@example.com","minimum_advance_notice":3,"name":"example name 1318","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3300","region":"Greater London","scheme":"autogiro"}]}}
},
"list": {
"method": "GET",
"path_template": "/creditors",
"url_params": [],
"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":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":null,"can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"GBP","email":"user@example.com","minimum_advance_notice":3,"name":"example name 408","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5429","region":"Greater London","scheme":"autogiro"}]},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","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":null,"default_sek_payout_account":null},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 6159","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":"user@example.com","minimum_advance_notice":3,"name":"example name 1485","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 5026","region":null,"scheme":"bacs"}]}],"meta":{"cursors":{"after":"example after 2888","before":"example before 8705"},"limit":50}}
"body": {"creditors":[{"address_line1":null,"address_line2":null,"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":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 6831","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":"user@example.com","minimum_advance_notice":3,"name":"example name 5541","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 2888","region":"Greater London","scheme":"sepa_core"}]},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 1957","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},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 4538","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":"user@example.com","minimum_advance_notice":3,"name":"example name 2433","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 563","region":null,"scheme":"sepa_core"}]}],"meta":{"cursors":{"after":"example after 2451","before":"example before 9355"},"limit":50}}
},
"get": {
"method": "GET",
"path_template": "/creditors/:identity",
"url_params": ["CR123"],
"body": {"creditors":{"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":null,"default_gbp_payout_account":"BA123","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":"user@example.com","minimum_advance_notice":3,"name":"example name 2605","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9828","region":"Greater London","scheme":"bacs"}]}}
"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":null,"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":"user@example.com","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":"autogiro"}]}}
},
"update": {
"method": "PUT",
"path_template": "/creditors/:identity",
"url_params": ["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":null,"default_gbp_payout_account":null,"default_sek_payout_account":null},"logo_url":null,"name":"Nude Wines","postal_code":null,"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":"user@example.com","minimum_advance_notice":3,"name":"example name 3033","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9241","region":null,"scheme":"sepa_core"}]}}
"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":"BA789"},"logo_url":"https://uploads.gocardless.com/logo.png","name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 3133","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":"user@example.com","minimum_advance_notice":3,"name":"example name 8643","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 8878","region":null,"scheme":"autogiro"}]}}
}
}
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 1166"},"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 3162"},"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 4904"},"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 440","before":"example before 4535"},"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 3430"},"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 9513"},"metadata":{}}],"meta":{"cursors":{"after":"example after 9371","before":"example before 4415"},"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 9371"},"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 6720"},"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 9513"},"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 870"},"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":"GBP","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 2984"},"metadata":{}}}
}
}
Loading

0 comments on commit e6bfa49

Please sign in to comment.