From 21a75c5c443485b47d8b65a7423e8fce4acfb1a9 Mon Sep 17 00:00:00 2001 From: Aaron Suarez Date: Fri, 10 May 2019 12:22:02 -0500 Subject: [PATCH 1/3] Bump to API version 2.20 --- recurly/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recurly/__init__.py b/recurly/__init__.py index 38760f36..ddc70f29 100644 --- a/recurly/__init__.py +++ b/recurly/__init__.py @@ -46,7 +46,7 @@ API_KEY = None """The API key to use when authenticating API requests.""" -API_VERSION = '2.19' +API_VERSION = '2.20' """The API version to use when making API requests.""" CA_CERTS_FILE = None From da69369a7e8272762a0e193aa0a1f935ad3424ed Mon Sep 17 00:00:00 2001 From: Aaron Suarez Date: Fri, 10 May 2019 17:12:25 -0500 Subject: [PATCH 2/3] Add support for shipping fees --- recurly/__init__.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/recurly/__init__.py b/recurly/__init__.py index ddc70f29..9f4b1c7d 100644 --- a/recurly/__init__.py +++ b/recurly/__init__.py @@ -968,6 +968,7 @@ class Purchase(Resource): 'terms_and_conditions', 'vat_reverse_charge_notes', 'shipping_address_id', + 'shipping_fees', 'gateway_code', 'collection_method', ) @@ -1040,6 +1041,37 @@ def filter_currency(resources): invoice_collection = InvoiceCollection.from_element(elem) return invoice_collection +class ShippingFee(Resource): + + """A one time shipping fee on a Purchase""" + + nodename = 'shipping_fee' + + attributes = ( + 'shipping_method_code', + 'shipping_amount_in_cents', + 'shipping_address', + 'shipping_address_id', + ) + +class ShippingMethod(Resource): + + """A shipping method available on the site""" + + member_path = 'shipping_methods/%s' + collection_path = 'shipping_methods' + + nodename = 'shipping_method' + + attributes = ( + 'code', + 'name', + 'accounting_code', + 'tax_code', + 'created_at', + 'updated_at', + ) + class Subscription(Resource): """A customer account's subscription to your service.""" @@ -1090,6 +1122,8 @@ class Subscription(Resource): 'gift_card', 'shipping_address', 'shipping_address_id', + 'shipping_method_code', + 'shipping_amount_in_cents', 'started_with_gift', 'converted_at', 'no_billing_info_reason', From ab3c81148bc99370bf851f0608b030b204d59dce Mon Sep 17 00:00:00 2001 From: Aaron Suarez Date: Tue, 21 May 2019 14:03:45 -0500 Subject: [PATCH 3/3] Release version 2.9.7 --- CHANGELOG | 7 +++++++ recurly/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3cca552f..fb9969e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,12 @@ ## Unreleased +## Version 2.9.7 – May 21st, 2019 ## + +This version brings us up to API version 2.20, but has no breaking changes + +- Add Export Dates [PR](https://github.com/recurly/recurly-client-python/pull/288) +- Add Shipping Fees [PR](https://github.com/recurly/recurly-client-python/pull/289) + ## Version 2.9.6 – April 30th, 2019 ## - Add product code to Adjustments [PR](https://github.com/recurly/recurly-client-python/pull/286) diff --git a/recurly/__init__.py b/recurly/__init__.py index 9f4b1c7d..4a420a22 100644 --- a/recurly/__init__.py +++ b/recurly/__init__.py @@ -22,7 +22,7 @@ """ -__version__ = '2.9.6' +__version__ = '2.9.7' __python_version__ = '.'.join(map(str, sys.version_info[:3])) cached_rate_limits = {