Skip to content

Commit

Permalink
Releasing v3.33.0. Please check the changelog for the updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-alish committed Aug 29, 2024
1 parent c5d0ab3 commit 9423e1b
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 1 deletion.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
* * *

Expand Down
33 changes: 33 additions & 0 deletions lib/ChargeBee/Models/CustomerEntitlement.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace ChargeBee\ChargeBee\Models;

use ChargeBee\ChargeBee\Model;
use ChargeBee\ChargeBee\Request;
use ChargeBee\ChargeBee\Util;

class CustomerEntitlement extends Model
{

protected $allowed = [
'customerId',
'subscriptionId',
'featureId',
'value',
'name',
'isEnabled',
];



# OPERATIONS
#-----------

public static function entitlementsForCustomer($id, $params = array(), $env = null, $headers = array())
{
return Request::send(Request::GET, Util::encodeURIPath("customers",$id,"customer_entitlements"), $params, $env, $headers);
}

}

?>
5 changes: 5 additions & 0 deletions lib/ChargeBee/Models/Ramp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions lib/ChargeBee/Models/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Subscription extends Model
'dueSince',
'totalDues',
'mrr',
'arr',
'exchangeRate',
'baseCurrencyCode',
'addons',
Expand Down
5 changes: 5 additions & 0 deletions lib/ChargeBee/Models/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions lib/ChargeBee/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/ChargeBee/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

final class Version
{
const VERSION = '3.32.0';
const VERSION = '3.33.0';
}

?>
1 change: 1 addition & 0 deletions lib/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 9423e1b

Please sign in to comment.