Releases: recurly/recurly-client-ruby
3.0.0.beta.2 (2018-07-25)
3.0.0.beta.1 (2018-07-13)
Initial release of v3. This library is still in beta.
See rubydoc.info for documentation: https://www.rubydoc.info/github/recurly/recurly-client-ruby/3_0_0_beta
See the 3_0_0_beta
branch for code: https://github.com/recurly/recurly-client-ruby/tree/3_0_0_beta
If you are interested in joining the beta, please email [email protected] and [email protected] with the subject "Ruby V3 Beta" and your site subdomains.
2.16.0 (06-26-2018)
- Don't set the logger in railtie PR
- Make currencies method public PR
- Allow programmer to set gateway code in purchases PR
- Add all_transactions link to Invoice PR
- Auth and Capture for Purchases PR
- Custom Fields PR
- Remove rails code and railtie PR
- Subscription Terms PR
Upgrade Notes
This brings us up to API version 2.13. The only breaking change is the removal of the railtie.
The railtie was being included automatically on detecting rails and was automatically setting the accept_language
for each request. If this is something you wish to continue doing, you'll need to set this yourself.
2.15.4 (05-16-2018)
2.15.2 (04-18-2018)
2.15.1 (04-02-2018)
2.15.0 (02-27-2018)
- Invoice refunds do not return InvoiceCollection PR
- Support gift card webhook PR
- Fixes to Resource#find_each PR
Upgrade Notes
1. Invoice#refund
and Invoice#refund_amount
return type
If you are upgrading from 2.13.X or 2.14.X, a design bug was fixed. Invoice#refund
and Invoice#refund_amount
once again return an Invoice
and not
an InvoiceCollection
.
2. Resource#find_each
arguments
Resource#find_each
previously only accepted per_page
but now accepts an options
Hash for pagination params. If you want to preserve functionality:
# Change This
Recurly::Invoice.find_each(50) do |invoice|
puts invoice
end
# To This
Recurly::Invoice.find_each(per_page: 50) do |invoice|
puts invoice
end
2.14.0 (02-20-2018)
Note: We recommend upgrading to 2.15.X for a bug fix around Invoice refunds.
- Updates to credit memos feature PR
Upgrade Notes
1. Invoice#mark_failed
now returns InvoiceCollection
mark_failed
no longer reloads the invoice with the response returning true or false, it returns either an InvoiceCollection
if failable and request is successful, it returns false
if invoice cannot be marked failed. To keep functionality, take the charge_invoice
of the returned collection:
invoice = Recurly::Invoice.find('1001')
failed_collection = invoice.mark_failed
if failed_collection
invoice = failed_collection.charge_invoice
end
2. Subscription previews and InvoiceCollection
Subscription previews and preview changes now return InvoiceCollection
s rather than Invoice
. Utilize the charge_invoice
to keep functionality the same:
subscription.preview
# Change
invoice = subscription.invoice
# To
invoice = subscription.invoice_collection.charge_invoice
2.13.0 (02-09-2018)
Note: We recommend upgrading to 2.15.X for a bug fix around Invoice refunds.
Upgrade Notes
This version bumps us to API version 2.10. There are many breaking changes due to the Credit Memos PR
1. InvoiceCollection
When creating or refunding invoices, 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 = my_account.invoice! # Returns an Invoice
# To this
collection = my_account.invoice! # Returns an InvoiceCollection
invoice = collection.charge_invoice # Returns an Invoice
These methods, which before returned Invoice
now return InvoiceCollection
:
Purchase.preview!
Purchase.invoice!
Purchase.authorize!
Account#invoice!
Account#build_invoice
2. Invoice subtotal_* changes
If you want to preserve functionality, change any use of Invoice#subtotal_after_discount_in_cents
to Invoice#subtotal_in_cents
. If you were previously using Invoice#subtotal_in_cents
, this has been changed to Invoice#subtotal_before_discount_in_cents
.
3. Invoice Refund -- refund_apply_order
changed to refund_method
If you were using refund_apply_order
on any refunds, then you need to change this to use refund_method
instead. The keys from this have changed from (credit
, transaction
) to (credit_first
, transaction_first
)
# If you use `credit` with refund_amount or refund
invoice.refund_amount(1000, 'credit')
invoice.refund(line_items, 'credit')
# Change to use `credit_first`
invoice.refund(line_items, 'credit_first')
# If you use `transaction` with refund_amount or refund
invoice.refund_amount(1000, 'transaction')
invoice.refund(line_items, 'transaction')
# Change to use `transaction_first`
invoice.refund(line_items, 'transaction_first')
4. 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'