Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
### v4.25.0 (2026-07-30)
* * *
### New Resources:
- [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units) has been added.
- [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries) has been added.


### New Actions:
- [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) has been added to [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).


### New Attributes:
- [`unit_id`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#unit_id) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
- [`subscription_id`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#subscription_id) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- [`modified_at`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#modified_at) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- [`resource_version`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#resource_version) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- [`created_at`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#created_at) has been added to [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).
- [`resource_version`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#resource_version) has been added to [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).


### New Parameters:
- [`account_type`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks#account_type) has been added as query parameter to [`list_grant_blocks`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- [`unit_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#unit_id) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
- [`include_cancellation_day_in_billing`](https://apidocs.chargebee.com/docs/api/estimates/cancel-subscription-for-items-estimate#include_cancellation_day_in_billing) has been added as request body parameter to [`cancel_subscription_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/cancel-subscription-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
- [`subscription_id`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#subscription_id) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- [`unit_id`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#unit_id) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- [`amount`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#amount) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- [`expires_at`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#expires_at) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- [`metadata`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#metadata) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- [`include_cancellation_day_in_billing`](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items#include_cancellation_day_in_billing) has been added as request body parameter to [`cancel_subscription_for_items`](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items) in [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).


### New Events:
- [`grant_blocks_created`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_created) has been added.
- [`ledger_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_updated) has been added.
- [`ledger_account_balance_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_account_balance_updated) has been added.
- [`grant_blocks_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_updated) has been added.


### New Enums:
- `ledger_account_balance_updated`, `grant_blocks_created`, `grant_blocks_updated`, and `ledger_updated` have been added as new values enum `EventType`.
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethod`.
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethodType`.
- `dana`, `touch_n_go`, `tamara`, `qpay`, `credit_balance_dropped`, `credit`, `debit`, `hold`, and `unhold` have been added as new values enum `Type`.
- `active` and `archived` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/credit_units/credit-unit-object#status) in [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
- `grant_renewal` and `subscription_renewed` have been added as new values to enum attribute [`grant_source`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#grant_source) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- `provisioned` and `overdraft` have been added as new values to enum attribute [`account_type`](https://apidocs.chargebee.com/docs/api/ledger_entries/ledger-entry-object#account_type) in [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries).
- `credit_unit` has been added as a new value to enum attribute [`unit_type`](https://apidocs.chargebee.com/docs/api/ledger_entries/ledger-entry-object#unit_type) in [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries).
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
- `archived` and `active` have been added as new values to enum query parameter `status.in` in [`list_credit_units`](https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units) of [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
- `archived` and `active` have been added as new values to enum query parameter `status.is` in [`list_credit_units`](https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units) of [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
- `provisioned` and `overdraft` have been added as new values to enum query parameter `account_type.is` in [`list_grant_blocks`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks) of [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).



### v4.24.0 (2026-07-21)
* * *
### New Resources:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.24.0
4.25.0
1 change: 1 addition & 0 deletions src/Actions/AlertActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public function all(array $params = [], array $headers = []): ListAlertResponse
* description?: string,
* metered_feature_id?: string,
* currency_code?: string,
* unit_id?: string,
* subscription_id?: string,
* meta?: string,
* } $params Description of the parameters
Expand Down
1 change: 1 addition & 0 deletions src/Actions/Contracts/AlertActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public function all(array $params = [], array $headers = []): ListAlertResponse;
* description?: string,
* metered_feature_id?: string,
* currency_code?: string,
* unit_id?: string,
* subscription_id?: string,
* meta?: string,
* } $params Description of the parameters
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Contracts/CouponActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
* not_in?: mixed,
* },
* applicable_item_price_ids?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* } $params Description of the parameters
*
Expand Down
109 changes: 109 additions & 0 deletions src/Actions/Contracts/CreditUnitActionsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?php
namespace Chargebee\Actions\Contracts;

use Chargebee\Responses\CreditUnitResponse\CreateCreditUnitResponse;
use Chargebee\Responses\CreditUnitResponse\ReactivateCreditUnitResponse;
use Chargebee\Responses\CreditUnitResponse\ListCreditUnitResponse;
use Chargebee\Responses\CreditUnitResponse\UpdateCreditUnitResponse;
use Chargebee\Responses\CreditUnitResponse\ArchiveCreditUnitResponse;
use Exception;
use Chargebee\Exceptions\PaymentException;
use Chargebee\Exceptions\OperationFailedException;
use Chargebee\Exceptions\APIError;
use Chargebee\Exceptions\InvalidRequestException;

Interface CreditUnitActionsInterface
{

/**
* @see https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units?lang=php-v4
* @param array{
* limit?: int,
* offset?: string,
* status?: array{
* in?: mixed,
* is?: mixed,
* },
* id?: array{
* in?: mixed,
* is?: mixed,
* },
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return ListCreditUnitResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function all(array $params = [], array $headers = []): ListCreditUnitResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/credit_units/create-a-credit-unit?lang=php-v4
* @param array{
* id?: string,
* name?: string,
* is_unlimited?: bool,
* overdraft_amount?: string,
* external_name?: string,
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return CreateCreditUnitResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function create(array $params, array $headers = []): CreateCreditUnitResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/credit_units/archive-a-credit-unit?lang=php-v4
*
* @param string $id
* @param array<string, string> $headers
* @return ArchiveCreditUnitResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function archive(string $id, array $headers = []): ArchiveCreditUnitResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/credit_units/update-a-credit-unit?lang=php-v4
* @param array{
* name?: string,
* external_name?: string,
* } $params Description of the parameters
* @param string $id
* @param array<string, string> $headers
* @return UpdateCreditUnitResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function update(string $id, array $params = [], array $headers = []): UpdateCreditUnitResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/credit_units/reactivate-a-credit-unit?lang=php-v4
*
* @param string $id
* @param array<string, string> $headers
* @return ReactivateCreditUnitResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function reactivate(string $id, array $headers = []): ReactivateCreditUnitResponse;

}
?>
6 changes: 3 additions & 3 deletions src/Actions/Contracts/EntitlementActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
* limit?: int,
* offset?: string,
* feature_id?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* entity_type?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* entity_id?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* include_drafts?: bool,
* embed?: string,
Expand Down
1 change: 1 addition & 0 deletions src/Actions/Contracts/EstimateActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public function paymentSchedules(array $params, array $headers = []): PaymentSch
* unit_price_in_decimal?: string,
* service_period_days?: int,
* }>,
* include_cancellation_day_in_billing?: bool,
* cancel_reason_code?: string,
* } $params Description of the parameters
* @param string $id
Expand Down
10 changes: 5 additions & 5 deletions src/Actions/Contracts/ExportActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ public function differentialPrices(array $params = [], array $headers = []): Dif
* },
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down Expand Up @@ -602,8 +602,8 @@ public function retrieve(string $id, array $headers = []): RetrieveExportRespons
* },
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down Expand Up @@ -693,8 +693,8 @@ public function priceVariants(array $params = [], array $headers = []): PriceVar
* },
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down Expand Up @@ -1602,8 +1602,8 @@ public function creditNotes(array $params = [], array $headers = []): CreditNote
* not_in?: mixed,
* },
* applicable_item_price_ids?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* } $params Description of the parameters
*
Expand Down Expand Up @@ -1862,8 +1862,8 @@ public function orders(array $params = [], array $headers = []): OrdersExportRes
* not_in?: mixed,
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down
3 changes: 3 additions & 0 deletions src/Actions/Contracts/GrantBlockActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* unit_id?: array{
* is?: mixed,
* },
* account_type?: array{
* is?: mixed,
* },
* effective_from?: array{
* after?: mixed,
* before?: mixed,
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/Contracts/InvoiceActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -1244,13 +1244,13 @@ public function removeTaxWithheld(string $id, array $params, array $headers = []
* offset?: string,
* payment_reference_number?: array{
* number?: array{
* is?: string,
* in?: string,
* in?: string,
* is?: string,
* },
* },
* id?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* } $params Description of the parameters
*
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Contracts/ItemActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
* not_in?: mixed,
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Contracts/ItemFamilyActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function delete(string $id, array $headers = []): DeleteItemFamilyRespons
* between?: mixed,
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Contracts/ItemPriceActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ public function findApplicableItems(string $id, array $params = [], array $heade
* between?: mixed,
* },
* business_entity_id?: array{
* is_present?: mixed,
* is?: mixed,
* is_present?: mixed,
* },
* include_site_level_resources?: array{
* is?: mixed,
Expand Down
23 changes: 22 additions & 1 deletion src/Actions/Contracts/LedgerOperationActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Chargebee\Responses\LedgerOperationResponse\CaptureLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\CaptureAuthorizationLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\RetrieveLedgerOperationLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\AllocateLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\ReleaseAuthorizationLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\ListLedgerOperationsLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\AuthorizeLedgerOperationResponse;
Expand Down Expand Up @@ -56,6 +57,26 @@ public function releaseAuthorization(array $params, array $headers = []): Releas
*/
public function capture(array $params, array $headers = []): CaptureLedgerOperationResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/ledger_operations/allocate?lang=php-v4
* @param array{
* subscription_id?: string,
* unit_id?: string,
* amount?: string,
* expires_at?: int,
* metadata?: mixed,
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return AllocateLedgerOperationResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function allocate(array $params, array $headers = []): AllocateLedgerOperationResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/ledger_operations/authorize?lang=php-v4
* @param array{
Expand Down Expand Up @@ -96,8 +117,8 @@ public function authorize(array $params, array $headers = []): AuthorizeLedgerOp
* between?: mixed,
* },
* type?: array{
* is?: mixed,
* in?: mixed,
* is?: mixed,
* },
* sort_by?: array{
* asc?: string,
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Contracts/MeterActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* limit?: int,
* offset?: string,
* name?: array{
* is?: mixed,
* starts_with?: mixed,
* is?: mixed,
* },
* sort_by?: array{
* asc?: string,
Expand Down
Loading
Loading