Skip to content

Releases: recurly/recurly-client-python

Version 2.9.1 October 30th, 2018

30 Oct 18:10
d3ca3a6
Compare
Choose a tag to compare

Version 2.9.1 – October 30th, 2018

This version brings us up to API version 2.16, but has no breaking changes

  • Add a GatewayTimeoutError class PR

Version 2.9.0 September 26th, 2018

26 Sep 16:45
Compare
Choose a tag to compare

This version brings us up to API version 2.15.

  • Use defusedxml package for reading incoming XML 3db82c8
  • Prevent empty input from making an API call eea8696
  • Remove JS module PR
  • Removes improper use of StopIteration PR
  • Removes support for Python 3.3 and add support for Python 3.7 PR

Upgrade Notes

This release contains two breaking changes.

  1. Older Recurly.js token signing is not longer supported. You should upgrade to version 4 of Recurly.js: https://dev.recurly.com/docs/recurlyjs
  2. Removes support for Python 3.3. You should upgrade to a supported version of Python.

Version 2.8.8 August 29th, 2018

29 Aug 17:38
bc657cf
Compare
Choose a tag to compare
  • Added scripts folder PR
  • Added Coupon.deleted_at PR

Version 2.8.7 August 21st, 2018

21 Aug 21:56
81acf6b
Compare
Choose a tag to compare

This version brings us up API version 2.14 but has no breaking changes.

  • Support updating an invoice PR
  • Support updating custom fields through Subscription#update_notes PR

Version 2.8.6 July 20th, 2018

20 Jul 16:43
e2ab480
Compare
Choose a tag to compare
  • Add gateway_token and gateway_code fields to BillingInfo class #253
  • Add RECURLY_INSECURE_DEBUG=true callout for running tests #252
  • Add more pythons to CI #251
  • Update url in setup.py #250
  • Support offline payments #249
  • Support Purchase#collection_method #248

Version 2.8.5 July 11th, 2018

11 Jul 17:46
22e7e30
Compare
Choose a tag to compare
  • Add Custom Fields to Account and Subscription #246

Version 2.8.4 June 26th, 2018

26 Jun 20:53
e9a661c
Compare
Choose a tag to compare

This version brings us up API version 2.13 but has no breaking changes.

  • Allows programmer to set the gateway for a purchase
  • Subscription Terms

Version 2.8.2 May 16th, 2018

16 May 20:16
6a556f0
Compare
Choose a tag to compare

This bumps us to API version 2.12 and has no breaking changes that need to be addressed.

  • Implement API version 2.12 changes #240

Version 2.8.1 April 5th, 2018

05 Apr 21:39
dd664dd
Compare
Choose a tag to compare

This brings us up to API version 2.11. It has no breaking changes.

  • Implement API version 2.11 changes #233

Version 2.8.0 March 26, 2018

26 Mar 22:03
92773bb
Compare
Choose a tag to compare
  • Implement API v2.10 Changes #231

Upgrade Notes

1. InvoiceCollection

When creating invoices or using mark_failed(), we now return an InvoiceCollection object rather than an Invoice. If you wish to upgrade your application without changing functionality, we recommend that you use the charge_invoice on the InvoiceCollection. Example:

# Change This:
invoice = account.invoice()

# To this
collection = account.invoice()
invoice = collection.charge_invoice

Calls that now return InvoiceCollection instead of Invoice:

  • Purchase#invoice()
  • Purchase#preview()
  • Purchase#authorize()
  • Account#invoice()
  • Account#build_invoice()

Furthermore, Invoice#mark_failed() no longer updates the invoice but rather returns a new InvoiceCollection object:

# Change This:
invoice.mark_failed()

# To this
collection = invoice.mark_failed()
failed_invoice = collection.charge_invoice

2. Invoice#original_invoice removed

Invoice#original_invoice was removed in favor of Invoice#original_invoices. If you want to maintain functionality, change your code grab the first invoice from that endpoint:

# Change this
original_invoice = invoice.original_invoice()

# To this
original_invoice = invoice.original_invoices()[0]

3. Invoice subtotal_* changes

We have renamed two of the invoice subtotal fields to more clearly reflect their values:

  • Renamed subtotal_in_cents to subtotal_before_discount_in_cents
  • Renamed subtotal_after_discount_in_cents to subtotal_in_cents

4. Invoice Refund -- refund_apply_order changed to refund_method

If you were using Invoice#refund or Invoice#refund_amount and explicitly setting the second refund_apply_order parameter, then you may need to change value to fit the new refund_method format. The values for this have changed from (credit, transaction) to (credit_first, transaction_first)

If you don't explicitly set the refund_apply_order like in these two calls, no change is needed:

invoice.refund(line_items);
invoice.refund_amount(1000);

If you do set the second param, you'll need to change:

  • credit to credit_first
  • transaction to transaction_first

Examples:

# Change `credit`:
invoice.refund(line_items, 'credit');
invoice.refund_amount(1000, 'credit');

# To `credit_first`
invoice.refund(line_items, 'credit_first');
invoice.refund_amount(1000, 'credit_first');

# Change `transaction`
invoice.refund(line_items, 'transaction');
invoice.refund_amount(1000, 'transaction');

# To `transaction_first`
invoice.refund(line_items, 'transaction_first');
invoice.refund_amount(1000, 'transaction_first');

5. Invoice States

If you are checking Invoice#state anywhere, you will want to check that you have the new correct values. collected has changed to paid and open has changed to pending. Example:

# Change this
if invoice.state == 'collected':
#To this
if invoice.state == 'paid':
# Change this
if invoice.state == 'open':
# To this
if invoice.state == 'pending':

This also affects the Invoice.all_collected and Invoice.all_open functions. Example:

# Change this
Invoice.all_collected()
# To this
Invoice.all_paid()
# Change this
Invoice.all_open()
# To this
Invoice.all_pending()