diff --git a/CHANGELOG.md b/CHANGELOG.md index baaf16e3..c56452c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,46 @@ +### v3.26.0 (2024-03-20) +* * * + +#### New resources: +* Attribute has been added. +* ImpactedItemPrice has been added. +* InstallmentConfig has been added. +* Installment has been added. + +#### Removed attributes: +* product_id has been removed from ItemPrice resource. + +#### New Enum values: +* klarna_pay_now has been added to TypeEnum in Customer resource. +* klarna_pay_now has been added to PaymentMethodEnum. +* klarna_pay_now has been added to PaymentMethodTypeEnum enum. +* klarna_pay_now has been added to TypeEnum. +* price_variant has been added to EntityTypeEnum. +* price_variant_created has been added in EventType enum. +* price_variant_updated has been added in EventType enum. +* price_variant_deleted has been added in EventType enum. + +#### Removed Enum values: +* product and variant have been removed from EntityTypeEnum. + +#### New Input parameters: +* config_id has been added to Invoice#InstallmentsRequest. +* amount has been added to Invoice#InstallmentsRequest. +* payment_source_id has been added to Purchase#CreateRequest. +* installment_info[config_id] has been added to Purchase#CreateRequest. +* installment_info[amount] has been added to Purchase#CreateRequest. +* subscription_info[contract_term_billing_cycle_on_renewal] has been added to Purchase#CreateRequest. +* contract_terms[index] has been added to Purchase#CreateRequest. +* contract_terms[action_at_term_end] has been added to Purchase#CreateRequest. +* contract_terms[cancellation_cutoff_period] has been added to Purchase#CreateRequest. +* subscription_info[contract_term_billing_cycle_on_renewal] has been added to Purchase#EstimateRequest. +* contract_terms[index] has been added to Purchase#EstimateRequest. +* contract_terms[action_at_term_end] has been added to Purchase#EstimateRequest. +* contract_terms[cancellation_cutoff_period] has been added to Purchase#EstimateRequest. + +#### Deprecated input parameters: +* product_created, product_updated, product_deleted, variant_created, variant_updated, variant_deleted has been deprecated in EventTypeEnum. + ### v3.25.1 (2024-03-06) * * * * NonSubscription has been added. diff --git a/lib/ChargeBee/Models/Attribute.php b/lib/ChargeBee/Models/Attribute.php new file mode 100644 index 00000000..24dc2fa0 --- /dev/null +++ b/lib/ChargeBee/Models/Attribute.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/ImpactedItemPrice.php b/lib/ChargeBee/Models/ImpactedItemPrice.php new file mode 100644 index 00000000..d36aa669 --- /dev/null +++ b/lib/ChargeBee/Models/ImpactedItemPrice.php @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/ImpactedItemPriceDownload.php b/lib/ChargeBee/Models/ImpactedItemPriceDownload.php new file mode 100644 index 00000000..57137b62 --- /dev/null +++ b/lib/ChargeBee/Models/ImpactedItemPriceDownload.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/Installment.php b/lib/ChargeBee/Models/Installment.php new file mode 100644 index 00000000..77201a2e --- /dev/null +++ b/lib/ChargeBee/Models/Installment.php @@ -0,0 +1,39 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/InstallmentConfig.php b/lib/ChargeBee/Models/InstallmentConfig.php new file mode 100644 index 00000000..0984e3da --- /dev/null +++ b/lib/ChargeBee/Models/InstallmentConfig.php @@ -0,0 +1,46 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/InstallmentConfigInstallment.php b/lib/ChargeBee/Models/InstallmentConfigInstallment.php new file mode 100644 index 00000000..af54eee2 --- /dev/null +++ b/lib/ChargeBee/Models/InstallmentConfigInstallment.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/Invoice.php b/lib/ChargeBee/Models/Invoice.php index 1ee3830e..2dcb6daf 100644 --- a/lib/ChargeBee/Models/Invoice.php +++ b/lib/ChargeBee/Models/Invoice.php @@ -251,6 +251,11 @@ public static function updateDetails($id, $params = array(), $env = null, $heade return Request::send(Request::POST, Util::encodeURIPath("invoices",$id,"update_details"), $params, $env, $headers); } + public static function installments($id, $params, $env = null, $headers = array()) + { + return Request::send(Request::POST, Util::encodeURIPath("invoices",$id,"installments"), $params, $env, $headers); + } + public static function resendEinvoice($id, $env = null, $headers = array()) { return Request::send(Request::POST, Util::encodeURIPath("invoices",$id,"resend_einvoice"), array(), $env, $headers); diff --git a/lib/ChargeBee/Models/ItemPrice.php b/lib/ChargeBee/Models/ItemPrice.php index ec2591c4..4ed1a55d 100644 --- a/lib/ChargeBee/Models/ItemPrice.php +++ b/lib/ChargeBee/Models/ItemPrice.php @@ -13,7 +13,6 @@ class ItemPrice extends Model 'id', 'name', 'itemFamilyId', - 'productId', 'itemId', 'description', 'status', diff --git a/lib/ChargeBee/Result.php b/lib/ChargeBee/Result.php index f1dadc82..3a6cf14f 100644 --- a/lib/ChargeBee/Result.php +++ b/lib/ChargeBee/Result.php @@ -525,6 +525,12 @@ public function item() return $item; } + public function attribute() + { + $attribute = $this->_get('attribute', Models\Attribute::class); + return $attribute; + } + public function itemPrice() { $item_price = $this->_get('item_price', Models\ItemPrice::class, @@ -542,7 +548,6 @@ public function attachedItem() return $attached_item; } - public function differentialPrice() { $differential_price = $this->_get('differential_price', Models\DifferentialPrice::class, @@ -580,6 +585,15 @@ public function impactedItem() return $impacted_item; } + public function impactedItemPrice() + { + $impacted_item_price = $this->_get('impacted_item_price', Models\ImpactedItemPrice::class, + array( + 'download' => Models\ImpactedItemPriceDownload::class + )); + return $impacted_item_price; + } + public function subscriptionEntitlement() { $subscription_entitlement = $this->_get('subscription_entitlement', Models\SubscriptionEntitlement::class, @@ -634,6 +648,21 @@ public function paymentVoucher() return $payment_voucher; } + public function installmentConfig() + { + $installment_config = $this->_get('installment_config', Models\InstallmentConfig::class, + array( + 'installments' => Models\InstallmentConfigInstallment::class + )); + return $installment_config; + } + + public function installment() + { + $installment = $this->_get('installment', Models\Installment::class); + return $installment; + } + public function advanceInvoiceSchedules() { $advance_invoice_schedules = $this->_getList('advance_invoice_schedules', Models\AdvanceInvoiceSchedule::class, diff --git a/lib/ChargeBee/Version.php b/lib/ChargeBee/Version.php index a1a23af8..a105098b 100644 --- a/lib/ChargeBee/Version.php +++ b/lib/ChargeBee/Version.php @@ -4,7 +4,7 @@ final class Version { - const VERSION = '3.25.1'; + const VERSION = '3.26.0'; } ?> diff --git a/lib/init.php b/lib/init.php index 3b155748..bd945e52 100644 --- a/lib/init.php +++ b/lib/init.php @@ -28,6 +28,7 @@ require(dirname(__FILE__) . '/ChargeBee/Models/AdvanceInvoiceScheduleFixedIntervalSchedule.php'); require(dirname(__FILE__) . '/ChargeBee/Models/AdvanceInvoiceScheduleSpecificDatesSchedule.php'); require(dirname(__FILE__) . '/ChargeBee/Models/AttachedItem.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/Attribute.php'); require(dirname(__FILE__) . '/ChargeBee/Models/Card.php'); require(dirname(__FILE__) . '/ChargeBee/Models/Comment.php'); require(dirname(__FILE__) . '/ChargeBee/Models/Contact.php'); @@ -90,9 +91,14 @@ require(dirname(__FILE__) . '/ChargeBee/Models/HostedPage.php'); require(dirname(__FILE__) . '/ChargeBee/Models/ImpactedItem.php'); require(dirname(__FILE__) . '/ChargeBee/Models/ImpactedItemDownload.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/ImpactedItemPrice.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/ImpactedItemPriceDownload.php'); require(dirname(__FILE__) . '/ChargeBee/Models/ImpactedSubscription.php'); require(dirname(__FILE__) . '/ChargeBee/Models/ImpactedSubscriptionDownload.php'); require(dirname(__FILE__) . '/ChargeBee/Models/InAppSubscription.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/Installment.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/InstallmentConfig.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/InstallmentConfigInstallment.php'); require(dirname(__FILE__) . '/ChargeBee/Models/Invoice.php'); require(dirname(__FILE__) . '/ChargeBee/Models/InvoiceAdjustmentCreditNote.php'); require(dirname(__FILE__) . '/ChargeBee/Models/InvoiceAppliedCredit.php');