A Ruby API wrapper for Recurly
MIT License
Bot releases are hidden (Show)
Published by bhelx about 6 years ago
This release contains one breaking change. Older Recurly.js token signing is no longer supported. You should upgrade to version 4 of Recurly.js: https://dev.recurly.com/docs/recurlyjs
The js
module is still around to support storing the public_key
.
Published by bhelx about 6 years ago
Published by aaron-junot about 6 years ago
Published by bhelx about 6 years ago
Published by bhelx about 6 years ago
get_*
method signatures: https://github.com/recurly/recurly-client-ruby/commit/8f05736151162014d3caf64da8765c6b2bda9acf
Published by bhelx over 6 years ago
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.
Published by bhelx over 6 years ago
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.
Published by bhelx over 6 years ago
Published by bhelx over 6 years ago
Published by bhelx over 6 years ago
Published by bhelx over 6 years ago
Invoice#refund
and Invoice#refund_amount
return typeIf 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
.
Resource#find_each
argumentsResource#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
Published by bhelx over 6 years ago
Note: We recommend upgrading to 2.15.X for a bug fix around Invoice refunds.
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
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
Published by bhelx over 6 years ago
Note: We recommend upgrading to 2.15.X for a bug fix around Invoice refunds.
This version bumps us to API version 2.10. There are many breaking changes due to the Credit Memos PR
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
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
.
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')
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'
Published by bhelx over 6 years ago
Published by bhelx almost 7 years ago
This is a pre-release for API Version 2.10
. It contains only one feature:
Published by bhelx almost 7 years ago
This version bumps us to API version 2.9. There are a few breaking changes.
Adjustment
is now only created if adjustment isTransaction
and Invoice
no longer have a subscription
link and you must nowsubscriptions
link.Published by bhelx almost 7 years ago
Resource#reload
method. Commit: https://github.com/recurly/recurly-client-ruby/commit/442848a8912a559217116a98057667f56985fb08
Published by bhelx almost 7 years ago
Resource#reload
method. Commit: https://github.com/recurly/recurly-client-ruby/commit/442848a8912a559217116a98057667f56985fb08
Published by bhelx almost 7 years ago
Resource#reload
method. Commit: https://github.com/recurly/recurly-client-ruby/commit/442848a8912a559217116a98057667f56985fb08
Published by bhelx almost 7 years ago
Resource#reload
method. Commit: https://github.com/recurly/recurly-client-ruby/commit/442848a8912a559217116a98057667f56985fb08