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
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
### v4.22.0 (2026-06-12)
* * *
### New Resources:
- [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks) has been added.
- [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances) has been added.
- [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations) has been added.
- [`PromotionalGrant`](https://apidocs.chargebee.com/docs/api/promotional_grants) has been added.


### New Attributes:
- [`notes`](https://apidocs.chargebee.com/docs/api/credit_notes/credit-note-object#notes) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
- [`layout`](https://apidocs.chargebee.com/docs/api/hosted_pages/hosted-page-object#layout) has been added to [`HostedPage`](https://apidocs.chargebee.com/docs/api/hosted_pages).


### New Parameters:
- [`sort_by`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#sort_by) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).


### New Enums:
- `available`, `exhausted`, `scheduled`, and `in_grace_period` have been added as new values enum `Status`.
- `subscription_created`, `subscription_changed`, `top_up`, `promotional_grants`, and `rollover` 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/grant_blocks/grant-block-object#account_type) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- `credit_unit` has been added as a new value to enum attribute [`unit_type`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#unit_type) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
- `credit_unit` has been added as a new value to enum attribute [`unit_type`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#unit_type) in [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).
- `allocation`, `capture`, `authorize`, `release_authorization`, `capture_authorization`, `expiry`, `void`, `rollover`, and `adjustment` have been added as new values to enum attribute [`type`](https://apidocs.chargebee.com/docs/api/ledger_operations/ledger-operation-object#type) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- `credit_unit` has been added as a new value to enum attribute [`unit_type`](https://apidocs.chargebee.com/docs/api/ledger_operations/ledger-operation-object#unit_type) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- `expires_at`, `created_at`, and `effective_from` have been added as new values to enum query parameter `sort_by.asc` 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).
- `expires_at`, `created_at`, and `effective_from` have been added as new values to enum query parameter `sort_by.desc` 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).
- `allocation`, `release_authorization`, `void`, `capture`, `rollover`, `adjustment`, `expiry`, `authorize`, and `capture_authorization` have been added as new values to enum query parameter `type.is` in [`list_ledger_operations`](https://apidocs.chargebee.com/docs/api/ledger_operations/list-ledger-operations) of [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- `allocation`, `release_authorization`, `void`, `capture`, `rollover`, `adjustment`, `expiry`, `authorize`, and `capture_authorization` have been added as new values to enum query parameter `type.in` in [`list_ledger_operations`](https://apidocs.chargebee.com/docs/api/ledger_operations/list-ledger-operations) of [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- `created_at` has been added as a new value to enum query parameter `sort_by.asc` in [`list_ledger_operations`](https://apidocs.chargebee.com/docs/api/ledger_operations/list-ledger-operations) of [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- `created_at` has been added as a new value to enum query parameter `sort_by.desc` in [`list_ledger_operations`](https://apidocs.chargebee.com/docs/api/ledger_operations/list-ledger-operations) of [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
- `updated_at` and `created_at` have been added as new values to enum query parameter `sort_by.asc` in [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) of [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
- `updated_at` and `created_at` have been added as new values to enum query parameter `sort_by.desc` in [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) of [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).



### v4.21.0 (2026-06-08)
* * *
### New Attributes:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.21.0
4.22.0
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{
* in?: mixed,
* is?: mixed,
* in?: mixed,
* },
* } $params Description of the parameters
*
Expand Down
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{
* in?: mixed,
* is?: mixed,
* in?: mixed,
* },
* entity_type?: array{
* in?: mixed,
* is?: mixed,
* in?: mixed,
* },
* entity_id?: array{
* in?: mixed,
* is?: mixed,
* in?: mixed,
* },
* include_drafts?: bool,
* embed?: string,
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Contracts/ExportActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -1602,8 +1602,8 @@ public function creditNotes(array $params = [], array $headers = []): CreditNote
* not_in?: mixed,
* },
* applicable_item_price_ids?: array{
* in?: mixed,
* is?: mixed,
* in?: mixed,
* },
* } $params Description of the parameters
*
Expand Down
60 changes: 60 additions & 0 deletions src/Actions/Contracts/GrantBlockActionsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
namespace Chargebee\Actions\Contracts;

use Chargebee\Responses\GrantBlockResponse\ListGrantBlocksGrantBlockResponse;
use Exception;
use Chargebee\Exceptions\PaymentException;
use Chargebee\Exceptions\OperationFailedException;
use Chargebee\Exceptions\APIError;
use Chargebee\Exceptions\InvalidRequestException;

Interface GrantBlockActionsInterface
{

/**
* @see https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks?lang=php-v4
* @param array{
* limit?: int,
* offset?: string,
* subscription_id?: array{
* is?: mixed,
* },
* unit_id?: array{
* is?: mixed,
* },
* effective_from?: array{
* after?: mixed,
* before?: mixed,
* on?: mixed,
* between?: mixed,
* },
* expires_at?: array{
* after?: mixed,
* before?: mixed,
* on?: mixed,
* between?: mixed,
* },
* created_at?: array{
* after?: mixed,
* before?: mixed,
* on?: mixed,
* between?: mixed,
* },
* sort_by?: array{
* asc?: string,
* desc?: string,
* },
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return ListGrantBlocksGrantBlockResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function listGrantBlocks(array $params, array $headers = []): ListGrantBlocksGrantBlockResponse;

}
?>
3 changes: 2 additions & 1 deletion src/Actions/Contracts/HostedPageActionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
public function checkoutOneTimeForItems(array $params, array $headers = []): CheckoutOneTimeForItemsHostedPageResponse;

/**
* @see https://apidocs.chargebee.com/docs/api/hosted_pages/update-payment-method?lang=php-v4
*
* @param array{
* customer?: array{
* id?: string,
Expand All @@ -180,6 +180,7 @@ public function checkoutOneTimeForItems(array $params, array $headers = []): Che
* iframe_messaging?: bool,
* } $params Description of the parameters
*
* @deprecated This method is deprecated and will be removed in a future version.
* @param array<string, string> $headers
* @return UpdatePaymentMethodHostedPageResponse
* @throws PaymentException
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 @@ -1238,13 +1238,13 @@ public function removeTaxWithheld(string $id, array $params, array $headers = []
* offset?: string,
* payment_reference_number?: array{
* number?: array{
* in?: string,
* is?: string,
* is?: string,
* in?: string,
* },
* },
* id?: array{
* in?: mixed,
* is?: mixed,
* in?: mixed,
* },
* } $params Description of the parameters
*
Expand Down
38 changes: 38 additions & 0 deletions src/Actions/Contracts/LedgerAccountBalanceActionsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
namespace Chargebee\Actions\Contracts;

use Chargebee\Responses\LedgerAccountBalanceResponse\ListLedgerAccountBalancesLedgerAccountBalanceResponse;
use Exception;
use Chargebee\Exceptions\PaymentException;
use Chargebee\Exceptions\OperationFailedException;
use Chargebee\Exceptions\APIError;
use Chargebee\Exceptions\InvalidRequestException;

Interface LedgerAccountBalanceActionsInterface
{

/**
* @see https://apidocs.chargebee.com/docs/api/ledger_account_balances/list-ledger-account-balances?lang=php-v4
* @param array{
* limit?: int,
* offset?: string,
* subscription_id?: array{
* is?: mixed,
* },
* unit_id?: array{
* is?: mixed,
* },
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return ListLedgerAccountBalancesLedgerAccountBalanceResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function listLedgerAccountBalances(array $params, array $headers = []): ListLedgerAccountBalancesLedgerAccountBalanceResponse;

}
?>
153 changes: 153 additions & 0 deletions src/Actions/Contracts/LedgerOperationActionsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?php
namespace Chargebee\Actions\Contracts;

use Chargebee\Responses\LedgerOperationResponse\CaptureLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\CaptureAuthorizationLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\RetrieveLedgerOperationLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\ReleaseAuthorizationLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\ListLedgerOperationsLedgerOperationResponse;
use Chargebee\Responses\LedgerOperationResponse\AuthorizeLedgerOperationResponse;
use Exception;
use Chargebee\Exceptions\PaymentException;
use Chargebee\Exceptions\OperationFailedException;
use Chargebee\Exceptions\APIError;
use Chargebee\Exceptions\InvalidRequestException;

Interface LedgerOperationActionsInterface
{

/**
* @see https://apidocs.chargebee.com/docs/api/ledger_operations/release-authorization?lang=php-v4
* @param array{
* authorization_id?: string,
* id?: string,
* ledger_operation_timestamp?: int,
* metadata?: mixed,
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return ReleaseAuthorizationLedgerOperationResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function releaseAuthorization(array $params, array $headers = []): ReleaseAuthorizationLedgerOperationResponse;

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

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

/**
* @see https://apidocs.chargebee.com/docs/api/ledger_operations/list-ledger-operations?lang=php-v4
* @param array{
* limit?: int,
* offset?: string,
* subscription_id?: array{
* is?: mixed,
* },
* unit_id?: array{
* is?: mixed,
* },
* created_at?: array{
* after?: mixed,
* before?: mixed,
* on?: mixed,
* between?: mixed,
* },
* type?: array{
* is?: mixed,
* in?: mixed,
* },
* sort_by?: array{
* asc?: string,
* desc?: string,
* },
* } $params Description of the parameters
*
* @param array<string, string> $headers
* @return ListLedgerOperationsLedgerOperationResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function listLedgerOperations(array $params, array $headers = []): ListLedgerOperationsLedgerOperationResponse;

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

/**
* @see https://apidocs.chargebee.com/docs/api/ledger_operations/retrieve-ledger-operation?lang=php-v4
*
* @param string $id
* @param array<string, string> $headers
* @return RetrieveLedgerOperationLedgerOperationResponse
* @throws PaymentException
* @throws OperationFailedException
* @throws APIError
* @throws InvalidRequestException
* @throws Exception
*/
public function retrieveLedgerOperation(string $id, array $headers = []): RetrieveLedgerOperationLedgerOperationResponse;

}
?>
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ public function omnichannelTransactionsForOmnichannelSubscription(string $id, ar
* before?: mixed,
* after?: mixed,
* },
* sort_by?: array{
* asc?: string,
* desc?: string,
* },
* } $params Description of the parameters
*
* @param array<string, string> $headers
Expand Down
Loading
Loading