Skip to content

Version 2.9.0

Compare
Choose a tag to compare
@bhelx bhelx released this 06 Oct 17:37

This release will upgrade us to API version 2.8.

  • Added custom invoice notes to Purchase #332
  • Added imported_trial boolean field to Subscription #331

Upgrade Notes

There are two breaking changes in this API version you must consider.

Country Codes

All country fields must now contain valid 2 letter ISO 3166 country codes. If your country code fails validation, you will receive a validation error. This affects any endpoint where an address is collected.

Purchase Currency

The purchases endpoint can create and invoice multiple adjustments at once but our invoices can only contain items in one currency. To make this explicit the currency can no longer be provided on an adjustment, it must be set once for the entire purchase:

$purchase = new Recurly_Purchase();
# The purchase object is the only place you can set the currency:
$purchase->currency = 'USD';
$purchase->account = new Recurly_Account();
$purchase->account->account_code = 'someone';

$adjustment = new Recurly_Adjustment();
# You can no longer set a currency on an adjustment, so this should be removed:
$adjustment->currency = 'USD';
$adjustment->unit_amount_in_cents = 1000;
$purchase->adjustments[] = $adjustment;