Release v4.24.0#137
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughVersion 4.24.0 adds metering resources and actions, asynchronous response models, new nested resource fields, proration and exchange-rate support, expanded enums, updated request documentation, and removal of two ledger balance attributes. ChangesAPI contracts and release metadata
New and extended resource models
Existing resource schema updates
Meter and metered-feature API flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ChargebeeClient
participant MeteredFeatureActions
participant APIRequester
participant ResponseModel
Client->>ChargebeeClient: access meter or meteredFeature actions
ChargebeeClient->>MeteredFeatureActions: construct with HTTP client and environment
Client->>MeteredFeatureActions: invoke lifecycle operation
MeteredFeatureActions->>APIRequester: send POST request
APIRequester-->>MeteredFeatureActions: return response data and headers
MeteredFeatureActions->>ResponseModel: build typed response
ResponseModel-->>Client: return serialized resource response
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Resources/Alert/Alert.php`:
- Around line 60-64: Update the Alert model’s threshold property and its related
parsing/serialization logic to use a single nullable Threshold object rather
than an array. Remove array_map handling that treats scalar mode/value fields as
arrays, and update the corresponding occurrences in the Alert response paths
while preserving nullable threshold behavior.
In `@src/Resources/CreditNote/LineItem.php`:
- Around line 156-160: Update LineItem in src/Resources/CreditNote/LineItem.php
and src/Resources/CreditNoteEstimate/LineItem.php: type proration_mode as
LineItemProrationMode, convert incoming values with
LineItemProrationMode::tryFromValue() in from(), and serialize using the enum’s
value. Apply the same change at both listed sites so the UNKNOWN fallback is
used consistently.
In `@src/Resources/MeteredFeature/MeteredFeature.php`:
- Around line 42-52: Update the MeteredFeature type and status handling across
the MeteredFeature class, including its properties, constructor parameters, and
from() conversions, to use MeteredFeature\Enums\FeatureType and
MeteredFeature\Enums\FeatureStatus instead of the global Type and Status enums.
Preserve the existing nullable behavior and deserialization flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: dafe26eb-dfd5-4b3a-92d0-4274fdeabce1
📒 Files selected for processing (100)
CHANGELOG.mdVERSIONsrc/Actions/AlertActions.phpsrc/Actions/Contracts/AlertActionsInterface.phpsrc/Actions/Contracts/CreditNoteActionsInterface.phpsrc/Actions/Contracts/EstimateActionsInterface.phpsrc/Actions/Contracts/ExportActionsInterface.phpsrc/Actions/Contracts/FeatureActionsInterface.phpsrc/Actions/Contracts/InvoiceActionsInterface.phpsrc/Actions/Contracts/ItemActionsInterface.phpsrc/Actions/Contracts/ItemFamilyActionsInterface.phpsrc/Actions/Contracts/ItemPriceActionsInterface.phpsrc/Actions/Contracts/MeterActionsInterface.phpsrc/Actions/Contracts/MeteredFeatureActionsInterface.phpsrc/Actions/Contracts/PriceVariantActionsInterface.phpsrc/Actions/Contracts/RampActionsInterface.phpsrc/Actions/Contracts/RecordedPurchaseActionsInterface.phpsrc/Actions/Contracts/SubscriptionActionsInterface.phpsrc/Actions/CreditNoteActions.phpsrc/Actions/EstimateActions.phpsrc/Actions/ExportActions.phpsrc/Actions/FeatureActions.phpsrc/Actions/InvoiceActions.phpsrc/Actions/ItemActions.phpsrc/Actions/ItemFamilyActions.phpsrc/Actions/ItemPriceActions.phpsrc/Actions/MeterActions.phpsrc/Actions/MeteredFeatureActions.phpsrc/Actions/PriceVariantActions.phpsrc/Actions/RampActions.phpsrc/Actions/RecordedPurchaseActions.phpsrc/Actions/SubscriptionActions.phpsrc/ChargebeeClient.phpsrc/Enums/DunningType.phpsrc/Enums/EnabledEvents.phpsrc/Enums/EventType.phpsrc/Enums/PaymentMethod.phpsrc/Enums/PaymentMethodType.phpsrc/Enums/Status.phpsrc/Enums/TaxOverrideReason.phpsrc/Enums/Type.phpsrc/Resources/Alert/Alert.phpsrc/Resources/Alert/Enums/FilterConditionField.phpsrc/Resources/Alert/Enums/FilterConditionOperator.phpsrc/Resources/Alert/FilterCondition.phpsrc/Resources/Alert/Threshold.phpsrc/Resources/AsyncResponse/AsyncResponse.phpsrc/Resources/AsyncResponse/Enums/Status.phpsrc/Resources/AsyncResponse/Error.phpsrc/Resources/AsyncResponse/RequestAsyncApi.phpsrc/Resources/AsyncResponseList/AsyncResponseList.phpsrc/Resources/AsyncResponseList/Enums/AsyncResponseStatus.phpsrc/Resources/ColumnDefinition/ColumnDefinition.phpsrc/Resources/ColumnDefinition/Enums/DataType.phpsrc/Resources/Content/Content.phpsrc/Resources/CreditNote/CreditNote.phpsrc/Resources/CreditNote/Enums/LineItemProrationMode.phpsrc/Resources/CreditNote/ExchangeRate.phpsrc/Resources/CreditNote/LineItem.phpsrc/Resources/CreditNoteEstimate/Enums/LineItemProrationMode.phpsrc/Resources/CreditNoteEstimate/LineItem.phpsrc/Resources/Feature/Feature.phpsrc/Resources/GrantBlock/GrantBlock.phpsrc/Resources/Invoice/Enums/LineItemProrationMode.phpsrc/Resources/Invoice/ExchangeRate.phpsrc/Resources/Invoice/Invoice.phpsrc/Resources/Invoice/LineItem.phpsrc/Resources/InvoiceEstimate/Enums/LineItemProrationMode.phpsrc/Resources/InvoiceEstimate/LineItem.phpsrc/Resources/LedgerOperation/LedgerOperation.phpsrc/Resources/Meter/Enums/ColumnDefinitionDataType.phpsrc/Resources/Meter/Enums/FeatureStatus.phpsrc/Resources/Meter/Enums/FeatureType.phpsrc/Resources/Meter/Enums/Status.phpsrc/Resources/Meter/Enums/Type.phpsrc/Resources/Meter/Meter.phpsrc/Resources/MeteredFeature/Enums/ColumnDefinitionDataType.phpsrc/Resources/MeteredFeature/Enums/FeatureStatus.phpsrc/Resources/MeteredFeature/Enums/FeatureType.phpsrc/Resources/MeteredFeature/MeteredFeature.phpsrc/Resources/PaymentIntent/Enums/PaymentIntentMetadataSource.phpsrc/Resources/PaymentIntent/Enums/PaymentMethodType.phpsrc/Resources/PaymentIntent/PaymentIntent.phpsrc/Resources/PaymentIntent/PaymentIntentMetadata.phpsrc/Resources/PromotionalGrant/PromotionalGrant.phpsrc/Resources/Quote/Enums/LineItemProrationMode.phpsrc/Resources/Quote/LineItem.phpsrc/Resources/QuoteLineGroup/Enums/LineItemProrationMode.phpsrc/Resources/QuoteLineGroup/LineItem.phpsrc/Resources/QuotedCharge/Charge.phpsrc/Resources/QuotedCharge/InvoiceItem.phpsrc/Resources/Ramp/DiscountsToAdd.phpsrc/Resources/Ramp/Enums/DiscountsToAddType.phpsrc/Responses/MeterResponse/ListMeterResponse.phpsrc/Responses/MeterResponse/ListMeterResponseListObject.phpsrc/Responses/MeteredFeatureResponse/ArchiveMeteredFeatureResponse.phpsrc/Responses/MeteredFeatureResponse/CreateMeteredFeatureResponse.phpsrc/Responses/MeteredFeatureResponse/DeleteMeteredFeatureResponse.phpsrc/Responses/MeteredFeatureResponse/ReactivateMeteredFeatureResponse.phpsrc/Version.php
v4.24.0 (2026-07-21)
New Resources:
AsyncResponsehas been added.AsyncResponseListhas been added.ColumnDefinitionhas been added.Meterhas been added.MeteredFeaturehas been added.New Attributes:
currency_codehas been added toAlert.thresholdhas been added toAlert.filter_conditionshas been added toAlert.exchange_rateshas been added toCreditNote.meteredhas been added toFeature.exchange_rateshas been added toInvoice.payment_intent_metadatahas been added toPaymentIntent.New Parameters:
meteredhas been added as query parameter tolist_featuresinFeature.decommissionedhas been added as query parameter tolist_subscriptionsinSubscription.currency_codehas been added as request body parameter tocreate_an_alertinAlert.line_items.proration_modehas been added as request body parameter toimport_credit_noteinCreditNote.item_prices.descriptionhas been added as request body parameter tocreate_invoice_for_items_estimateinEstimate.item_prices.entity_descriptionhas been added as request body parameter tocreate_invoice_for_items_estimateinEstimate.charges.entity_descriptionhas been added as request body parameter tocreate_invoice_for_items_estimateinEstimate.subscription.decommissionedhas been added as request body parameter toexport_subscriptionsinExport.item_prices.descriptionhas been added as request body parameter tocreate_invoice_for_items_and_one-time_chargesinInvoice.item_prices.entity_descriptionhas been added as request body parameter tocreate_invoice_for_items_and_one-time_chargesinInvoice.charges.entity_descriptionhas been added as request body parameter tocreate_invoice_for_items_and_one-time_chargesinInvoice.create_pending_invoicehas been added as request body parameter tocreate_invoice_for_items_and_one-time_chargesinInvoice.line_items.proration_modehas been added as request body parameter toimport_invoiceinInvoice.paid_athas been added as request body parameter toimport_invoiceinInvoice.discounts_to_add.quantityhas been added as request body parameter tocreate_a_rampinRamp.discounts_to_add.quantityhas been added as request body parameter toupdate_a_subscription_rampinRamp.customer.emailhas been added as request body parameter torecord_a_purchaseinRecordedPurchase.customer.first_namehas been added as request body parameter torecord_a_purchaseinRecordedPurchase.customer.last_namehas been added as request body parameter torecord_a_purchaseinRecordedPurchase.Parameter Updates:
metered_feature_idhas been changed from required to optional increate_an_alertofAlert.New Events:
payment_source_business_entity_changedhas been added.Deleted Attributes:
start_balancehas been removed fromLedgerOperation.end_balancehas been removed fromLedgerOperation.New Enums:
real_time_paymentshas been added as a new value enumDunningType.payment_source_business_entity_changedhas been added as a new value enumEventType.paynow,bizum, andpromptpayhave been added as new values enumPaymentMethod.paynow,bizum, andpromptpayhave been added as new values enumPaymentMethodType.active,archived, anddeletedhave been added as new values enumStatus.zero_rated,region_non_taxable,product_exempt,high_value_physical_goods,zero_value_item, andtax_not_configured_external_providerhave been added as new values enumTaxOverrideReason.paynow,bizum,promptpay,simple,compound, andspend_exceededhave been added as new values enumType.successandfailedhave been added as new values to enum attributestatusinAsyncResponse.numberandstringhave been added as new values to enum attributedata_typeinColumnDefinition.simpleandcompoundhave been added as new values to enum attributetypeinMeter.active,archived, anddeletedhave been added as new values to enum attributestatusinMeter.paynow,bizum, andpromptpayhave been added as new values to enum attributepayment_method_typeinPaymentIntent.paynow,bizum, andpromptpayhave been added as new values to enum attributeactive_payment_attempt.payment_method_typeinPaymentIntent.cb_js,components_fields,checkout_v3,paynow_v3,portal_v3,gift_v3,checkout_v4,payment_component,pc_inapp_v4, andpc_fpc_v4have been added as new values to enum attributepayment_intent_metadata.sourceinPaymentIntent.adjusted_term,service_period_revision,delta, andresethave been added as new values to enum request body parameterline_items.proration_modeinimport_credit_noteofCreditNote.trueandfalsehave been added as new values to enum query parametermetered.isinlist_featuresofFeature.adjusted_term,service_period_revision,delta, andresethave been added as new values to enum request body parameterline_items.proration_modeinimport_invoiceofInvoice.updated_at,name,created_at, andidhave been added as new values to enum query parametersort_by.ascinlist_all_available_metersofMeter.updated_at,name,created_at, andidhave been added as new values to enum query parametersort_by.descinlist_all_available_metersofMeter.numberandstringhave been added as new values to enum request body parametercolumn_definitions.data_typeincreate_a_metered_featureofMeteredFeature.paynow,bizum, andpromptpayhave been added as new values to enum request body parameterpayment_method_typeinupdate_a_payment_intentofPaymentIntent.paynow,bizum, andpromptpayhave been added as new values to enum request body parameterpayment_method_typeincreate_a_payment_intentofPaymentIntent.trueandfalsehave been added as new values to enum query parameterdecommissioned.isinlist_subscriptionsofSubscription.Release v4.24.0 adds AsyncResponse* and metering resources (meter, metered feature) plus meter/metered-feature APIs. It expands alert/invoice/credit-note attributes (exchange_rates, proration_mode, thresholds, entity_description) and request filters, introduces a webhook event, removes LedgerOperation balances, and updates enums and version/changelog.