Skip to content

Commit

Permalink
Merge pull request #290 from recurly/api_version_2_20
Browse files Browse the repository at this point in the history
Release version 2.9.7
  • Loading branch information
bhelx authored May 21, 2019
2 parents 25849b6 + ab3c811 commit a3374d6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
38 changes: 36 additions & 2 deletions recurly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"""

__version__ = '2.9.6'
__version__ = '2.9.7'
__python_version__ = '.'.join(map(str, sys.version_info[:3]))

cached_rate_limits = {
Expand All @@ -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
Expand Down Expand Up @@ -968,6 +968,7 @@ class Purchase(Resource):
'terms_and_conditions',
'vat_reverse_charge_notes',
'shipping_address_id',
'shipping_fees',
'gateway_code',
'collection_method',
)
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit a3374d6

Please sign in to comment.