Release client 2.10.0 / API version 2.10 #341
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This release will upgrade us to API version 2.10.
Upgrade Notes
There are several breaking changes to support the new credit memos feature.
1. InvoiceCollection
When creating invoices or using
markFailed()
, we now return anRecurly_InvoiceCollection
object rather than anRecurly_Invoice
. If you wish to upgrade your application without changing functionality, we recommend that you use thecharge_invoice
on theRecurly_InvoiceCollection
. Example:Calls that now return
InvoiceCollection
instead ofInvoice
:Recurly_Purchase::invoice()
Recurly_Purchase::preview()
Recurly_Purchase::authorize()
Recurly_Invoice::invoicePendingCharges()
Recurly_Invoice::previewPendingCharges()
Furthermore,
Recurly_Invoice->markFailed()
no longer updates the invoice but rather returns a newRecurly_InvoiceCollection
object:2. Recurly_Invoice->original_invoice removed
Recurly_Invoice->original_invoice
was removed in favor ofRecurly_Invoice->original_invoices
. If you want to maintain functionality, change your code grab the first invoice from that endpoint:3. Invoice
subtotal_*
changesWe have renamed two of the invoice subtotal fields to more clearly reflect their values:
subtotal_in_cents
tosubtotal_before_discount_in_cents
subtotal_after_discount_in_cents
tosubtotal_in_cents
4. Invoice Refund --
refund_apply_order
changed torefund_method
If you were using
Recurly_Invoice->refund
orRecurly_Invoice->refundAmount
and explicitly setting the secondrefund_apply_order
parameter, then you may need to change value to fit the newrefund_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:If you do set the second param, you'll need to change:
credit
tocredit_first
transaction
totransaction_first
Examples:
5. Invoice States
If you are checking
Recurly_Invoice->state
anywhere, you will want to check that you have the new correct values.collected
has changed topaid
andopen
has changed topending
. Example:This also affects the
Recurly_InvoiceList::getCollected()
andRecurly_InvoiceList::getOpen()
functions. Example: