From 9423e1bbf8d1f8c48e40347fb1dfe711b817dbf0 Mon Sep 17 00:00:00 2001 From: alishsapkota Date: Thu, 29 Aug 2024 06:59:27 +0000 Subject: [PATCH] Releasing v3.33.0. Please check the changelog for the updates. --- CHANGELOG.md | 19 +++++++++++ lib/ChargeBee/Models/CustomerEntitlement.php | 33 ++++++++++++++++++++ lib/ChargeBee/Models/Ramp.php | 5 +++ lib/ChargeBee/Models/Subscription.php | 1 + lib/ChargeBee/Models/Transaction.php | 5 +++ lib/ChargeBee/Result.php | 6 ++++ lib/ChargeBee/Version.php | 2 +- lib/init.php | 1 + 8 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 lib/ChargeBee/Models/CustomerEntitlement.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 6602f7b4..e574e5f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +### v3.33.0 (2024-08-29) +* * * + +#### New Resource: +* CustomerEntitlement has been added. + +#### New Endpoints: +* Ramp#UpdateRequest has been added to Ramp resource. +* Transaction#ReconcileRequest has been added to Transaction resource. + +### New Attributes: +* arr has been added to Subscription. + +### New Enum Values: +* customer_entitlements_updated has been added to EntityTypeEnum. +* subscription_moved_in has been added in EventType enum. +* subscription_moved_out has been added in EventType enum. +* subscription_movement_failed has been added in EventType enum. + ### v3.32.0 (2024-08-14) * * * diff --git a/lib/ChargeBee/Models/CustomerEntitlement.php b/lib/ChargeBee/Models/CustomerEntitlement.php new file mode 100644 index 00000000..47f0ddc4 --- /dev/null +++ b/lib/ChargeBee/Models/CustomerEntitlement.php @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/lib/ChargeBee/Models/Ramp.php b/lib/ChargeBee/Models/Ramp.php index fb7004b4..ce9cfe99 100644 --- a/lib/ChargeBee/Models/Ramp.php +++ b/lib/ChargeBee/Models/Ramp.php @@ -40,6 +40,11 @@ public static function createForSubscription($id, $params, $env = null, $headers return Request::send(Request::POST, Util::encodeURIPath("subscriptions",$id,"create_ramp"), $params, $env, $headers); } + public static function update($id, $params, $env = null, $headers = array()) + { + return Request::send(Request::POST, Util::encodeURIPath("ramps",$id,"update"), $params, $env, $headers); + } + public static function retrieve($id, $env = null, $headers = array()) { return Request::send(Request::GET, Util::encodeURIPath("ramps",$id), array(), $env, $headers); diff --git a/lib/ChargeBee/Models/Subscription.php b/lib/ChargeBee/Models/Subscription.php index 49e73e5e..4b6ba2d8 100644 --- a/lib/ChargeBee/Models/Subscription.php +++ b/lib/ChargeBee/Models/Subscription.php @@ -65,6 +65,7 @@ class Subscription extends Model 'dueSince', 'totalDues', 'mrr', + 'arr', 'exchangeRate', 'baseCurrencyCode', 'addons', diff --git a/lib/ChargeBee/Models/Transaction.php b/lib/ChargeBee/Models/Transaction.php index 1a8d78c7..ea33283d 100644 --- a/lib/ChargeBee/Models/Transaction.php +++ b/lib/ChargeBee/Models/Transaction.php @@ -78,6 +78,11 @@ public static function recordRefund($id, $params, $env = null, $headers = array( return Request::send(Request::POST, Util::encodeURIPath("transactions",$id,"record_refund"), $params, $env, $headers); } + public static function reconcile($id, $params = array(), $env = null, $headers = array()) + { + return Request::send(Request::POST, Util::encodeURIPath("transactions",$id,"reconcile"), $params, $env, $headers); + } + public static function refund($id, $params = array(), $env = null, $headers = array()) { return Request::send(Request::POST, Util::encodeURIPath("transactions",$id,"refund"), $params, $env, $headers); diff --git a/lib/ChargeBee/Result.php b/lib/ChargeBee/Result.php index f7835bba..818369e1 100644 --- a/lib/ChargeBee/Result.php +++ b/lib/ChargeBee/Result.php @@ -633,6 +633,12 @@ public function subscriptionEntitlement() return $subscription_entitlement; } + public function customerEntitlement() + { + $customer_entitlement = $this->_get('customer_entitlement', Models\CustomerEntitlement::class); + return $customer_entitlement; + } + public function itemEntitlement() { $item_entitlement = $this->_get('item_entitlement', Models\ItemEntitlement::class); diff --git a/lib/ChargeBee/Version.php b/lib/ChargeBee/Version.php index 645b8736..da54e442 100644 --- a/lib/ChargeBee/Version.php +++ b/lib/ChargeBee/Version.php @@ -4,7 +4,7 @@ final class Version { - const VERSION = '3.32.0'; + const VERSION = '3.33.0'; } ?> diff --git a/lib/init.php b/lib/init.php index ab399678..846c80e7 100644 --- a/lib/init.php +++ b/lib/init.php @@ -69,6 +69,7 @@ require(dirname(__FILE__) . '/ChargeBee/Models/CustomerBillingAddress.php'); require(dirname(__FILE__) . '/ChargeBee/Models/CustomerChildAccountAccess.php'); require(dirname(__FILE__) . '/ChargeBee/Models/CustomerContact.php'); +require(dirname(__FILE__) . '/ChargeBee/Models/CustomerEntitlement.php'); require(dirname(__FILE__) . '/ChargeBee/Models/CustomerEntityIdentifier.php'); require(dirname(__FILE__) . '/ChargeBee/Models/CustomerParentAccountAccess.php'); require(dirname(__FILE__) . '/ChargeBee/Models/CustomerPaymentMethod.php');