diff --git a/CHANGELOG.md b/CHANGELOG.md index f3cc68ec..6a00389e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +### v3.12.0 (2022-11-10) +* * * + +### Fixes: +* Fixed the correct import of content in init.php + +#### New endpoints: +* credit_notes#import_credit_note has been added to the credit_notes resource. +* subscriptions#import_unbilled_charges has been added to the subscriptions resource. + +#### New attributes: +* shipped_at parameter has been added to the orders#list_orders API. + +#### Added input parameters: +* voided_at and void_reason_code have been added to the invoices#import_invoice API. + +#### New attributes: +* business_entity_id has been added to the orders resource. + +#### New Enum values: +* registered has been added to the status enum in credit_note_einvoice and invoice_einvoice subresources. +* type enum has been added to the subscription_discount subresource. +* subscription_entitlements_created has been added to the event_type enum. + + ### v3.11.0 (2022-09-20) #### New Resource: diff --git a/lib/ChargeBee/Models/CreditNote.php b/lib/ChargeBee/Models/CreditNote.php index 5d6408b1..597abbf0 100644 --- a/lib/ChargeBee/Models/CreditNote.php +++ b/lib/ChargeBee/Models/CreditNote.php @@ -112,6 +112,11 @@ public static function resendEinvoice($id, $env = null, $headers = array()) return Request::send(Request::POST, Util::encodeURIPath("credit_notes",$id,"resend_einvoice"), array(), $env, $headers); } + public static function importCreditNote($params, $env = null, $headers = array()) + { + return Request::send(Request::POST, Util::encodeURIPath("credit_notes","import_credit_note"), $params, $env, $headers); + } + } ?> \ No newline at end of file diff --git a/lib/ChargeBee/Models/Discount.php b/lib/ChargeBee/Models/Discount.php deleted file mode 100644 index 04d8f55c..00000000 --- a/lib/ChargeBee/Models/Discount.php +++ /dev/null @@ -1,38 +0,0 @@ - \ No newline at end of file diff --git a/lib/ChargeBee/Models/ItemPrice.php b/lib/ChargeBee/Models/ItemPrice.php index 09748ac2..2af922e4 100644 --- a/lib/ChargeBee/Models/ItemPrice.php +++ b/lib/ChargeBee/Models/ItemPrice.php @@ -64,7 +64,7 @@ public static function retrieve($id, $env = null, $headers = array()) return Request::send(Request::GET, Util::encodeURIPath("item_prices",$id), array(), $env, $headers); } - public static function update($id, $params = array(), $env = null, $headers = array()) + public static function update($id, $params, $env = null, $headers = array()) { return Request::send(Request::POST, Util::encodeURIPath("item_prices",$id), $params, $env, $headers); } diff --git a/lib/ChargeBee/Models/Order.php b/lib/ChargeBee/Models/Order.php index e81ca393..e06c8194 100644 --- a/lib/ChargeBee/Models/Order.php +++ b/lib/ChargeBee/Models/Order.php @@ -65,6 +65,7 @@ class Order extends Model 'giftId', 'resendReason', 'resentOrders', + 'businessEntityId', ]; diff --git a/lib/ChargeBee/Models/Subscription.php b/lib/ChargeBee/Models/Subscription.php index eb6fa697..01e7523f 100644 --- a/lib/ChargeBee/Models/Subscription.php +++ b/lib/ChargeBee/Models/Subscription.php @@ -223,6 +223,11 @@ public static function importContractTerm($id, $params = array(), $env = null, $ return Request::send(Request::POST, Util::encodeURIPath("subscriptions",$id,"import_contract_term"), $params, $env, $headers); } + public static function importUnbilledCharges($id, $params, $env = null, $headers = array()) + { + return Request::send(Request::POST, Util::encodeURIPath("subscriptions",$id,"import_unbilled_charges"), $params, $env, $headers); + } + public static function importForItems($id, $params, $env = null, $headers = array()) { return Request::send(Request::POST, Util::encodeURIPath("customers",$id,"import_for_items"), $params, $env, $headers); diff --git a/lib/ChargeBee/Models/SubscriptionDiscount.php b/lib/ChargeBee/Models/SubscriptionDiscount.php index 85de6d6e..19972b78 100644 --- a/lib/ChargeBee/Models/SubscriptionDiscount.php +++ b/lib/ChargeBee/Models/SubscriptionDiscount.php @@ -9,6 +9,7 @@ class SubscriptionDiscount extends Model protected $allowed = [ 'id', 'invoiceName', + 'type', 'percentage', 'amount', 'currencyCode', diff --git a/lib/ChargeBee/Version.php b/lib/ChargeBee/Version.php index f5efcb00..c051e248 100644 --- a/lib/ChargeBee/Version.php +++ b/lib/ChargeBee/Version.php @@ -4,7 +4,7 @@ final class Version { - const VERSION = '3.11.0'; + const VERSION = '3.12.0'; } ?> diff --git a/lib/init.php b/lib/init.php index 76100326..e359ec89 100644 --- a/lib/init.php +++ b/lib/init.php @@ -208,4 +208,4 @@ require(dirname(__FILE__) . '/ChargeBee/Models/VirtualBankAccount.php'); require(dirname(__FILE__) . '/ChargeBee/Models/Content.php'); -?> +?> \ No newline at end of file