Skip to content

Commit

Permalink
Releasing v3.26.0. Please check the changelog for the updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-thushitamariaselvan committed Mar 20, 2024
1 parent 07a11bc commit 5f8cd85
Show file tree
Hide file tree
Showing 12 changed files with 252 additions and 3 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
24 changes: 24 additions & 0 deletions lib/ChargeBee/Models/Attribute.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace ChargeBee\ChargeBee\Models;

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

class Attribute extends Model
{

protected $allowed = [
'name',
'value',
];



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

}

?>
25 changes: 25 additions & 0 deletions lib/ChargeBee/Models/ImpactedItemPrice.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace ChargeBee\ChargeBee\Models;

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

class ImpactedItemPrice extends Model
{

protected $allowed = [
'count',
'download',
'itemPrices',
];



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

}

?>
17 changes: 17 additions & 0 deletions lib/ChargeBee/Models/ImpactedItemPriceDownload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace ChargeBee\ChargeBee\Models;

use ChargeBee\ChargeBee\Model;

class ImpactedItemPriceDownload extends Model
{
protected $allowed = [
'downloadUrl',
'validTill',
'mimeType',
];

}

?>
39 changes: 39 additions & 0 deletions lib/ChargeBee/Models/Installment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace ChargeBee\ChargeBee\Models;

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

class Installment extends Model
{

protected $allowed = [
'id',
'invoiceId',
'date',
'amount',
'status',
'createdAt',
'updatedAt',
];



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

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

public static function all($params, $env = null, $headers = array())
{
return Request::sendListRequest(Request::GET, Util::encodeURIPath("installments"), $params, $env, $headers);
}

}

?>
46 changes: 46 additions & 0 deletions lib/ChargeBee/Models/InstallmentConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace ChargeBee\ChargeBee\Models;

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

class InstallmentConfig extends Model
{

protected $allowed = [
'id',
'description',
'numberOfInstallments',
'periodUnit',
'period',
'preferredDay',
'createdAt',
'updatedAt',
'installments',
];



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

public static function create($params, $env = null, $headers = array())
{
return Request::send(Request::POST, Util::encodeURIPath("installment_configs"), $params, $env, $headers);
}

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

public static function delete($id, $env = null, $headers = array())
{
return Request::send(Request::POST, Util::encodeURIPath("installment_configs",$id,"delete"), array(), $env, $headers);
}

}

?>
16 changes: 16 additions & 0 deletions lib/ChargeBee/Models/InstallmentConfigInstallment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace ChargeBee\ChargeBee\Models;

use ChargeBee\ChargeBee\Model;

class InstallmentConfigInstallment extends Model
{
protected $allowed = [
'period',
'amountPercentage',
];

}

?>
5 changes: 5 additions & 0 deletions lib/ChargeBee/Models/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion lib/ChargeBee/Models/ItemPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class ItemPrice extends Model
'id',
'name',
'itemFamilyId',
'productId',
'itemId',
'description',
'status',
Expand Down
31 changes: 30 additions & 1 deletion lib/ChargeBee/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -542,7 +548,6 @@ public function attachedItem()
return $attached_item;
}


public function differentialPrice()
{
$differential_price = $this->_get('differential_price', Models\DifferentialPrice::class,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
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.25.1';
const VERSION = '3.26.0';
}

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

0 comments on commit 5f8cd85

Please sign in to comment.