Skip to content

Release v4.13.0#111

Merged
cb-alish merged 1 commit into
v4from
release-v4.13.0
Jul 21, 2026
Merged

Release v4.13.0#111
cb-alish merged 1 commit into
v4from
release-v4.13.0

Conversation

@cb-alish

@cb-alish cb-alish commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

v4.13.0 (2026-07-21)

New Resources:

New Attributes:

New Parameters:

Parameter Updates:

New Events:

Deleted Attributes:

New Enums:

  • real_time_payments has been added as a new value enum DunningType.
  • payment_source_business_entity_changed has been added as a new value enum EventType.
  • paynow, bizum, and promptpay have been added as new values enum PaymentMethod.
  • paynow, bizum, and promptpay have been added as new values enum PaymentMethodType.
  • active, archived, and deleted have been added as new values enum Status.
  • zero_rated, region_non_taxable, product_exempt, high_value_physical_goods, zero_value_item, and tax_not_configured_external_provider have been added as new values enum TaxOverrideReason.
  • paynow, bizum, promptpay, simple, compound, and spend_exceeded have been added as new values enum Type.
  • success and failed have been added as new values to enum attribute status in AsyncResponse.
  • number and string have been added as new values to enum attribute data_type in ColumnDefinition.
  • simple and compound have been added as new values to enum attribute type in Meter.
  • active, archived, and deleted have been added as new values to enum attribute status in Meter.
  • paynow, bizum, and promptpay have been added as new values to enum attribute payment_method_type in PaymentIntent.
  • paynow, bizum, and promptpay have been added as new values to enum attribute active_payment_attempt.payment_method_type in PaymentIntent.
  • cb_js, components_fields, checkout_v3, paynow_v3, portal_v3, gift_v3, checkout_v4, payment_component, pc_inapp_v4, and pc_fpc_v4 have been added as new values to enum attribute payment_intent_metadata.source in PaymentIntent.
  • adjusted_term, service_period_revision, delta, and reset have been added as new values to enum request body parameter line_items.proration_mode in import_credit_note of CreditNote.
  • true and false have been added as new values to enum query parameter metered.is in list_features of Feature.
  • adjusted_term, service_period_revision, delta, and reset have been added as new values to enum request body parameter line_items.proration_mode in import_invoice of Invoice.
  • updated_at, name, created_at, and id have been added as new values to enum query parameter sort_by.asc in list_all_available_meters of Meter.
  • updated_at, name, created_at, and id have been added as new values to enum query parameter sort_by.desc in list_all_available_meters of Meter.
  • number and string have been added as new values to enum request body parameter column_definitions.data_type in create_a_metered_feature of MeteredFeature.
  • paynow, bizum, and promptpay have been added as new values to enum request body parameter payment_method_type in update_a_payment_intent of PaymentIntent.
  • paynow, bizum, and promptpay have been added as new values to enum request body parameter payment_method_type in create_a_payment_intent of PaymentIntent.
  • true and false have been added as new values to enum query parameter decommissioned.is in list_subscriptions of Subscription.

Released v4.13.0 with Meter and MeteredFeature APIs, AsyncResponse models, expanded attributes and request parameters, new webhook events, payment method and status enums, metadata type updates, proration support, and LedgerOperation attribute removals. Added metering services, builders, responses, filters, and updated versioning documentation.

@snyk-io

snyk-io Bot commented Jul 21, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues
Secrets 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Changes

Version 4.13.0 adds meter and metered-feature APIs, async response and webhook event models, new resource attributes and request parameters, expanded payment and domain enums, metadata shape changes, and client service accessors.

Metering resources

Layer / File(s) Summary
Meter models, parameters, and responses
src/main/java/com/chargebee/v4/models/meter/*, src/main/java/com/chargebee/v4/models/meteredFeature/*
Adds meter and metered-feature models, builders, form/query serialization, typed responses, and pagination.
Metering services and client wiring
src/main/java/com/chargebee/v4/services/*Meter*Service.java, src/main/java/com/chargebee/v4/client/*
Adds synchronous/asynchronous meter operations, metered-feature operations, service registry initialization, and client accessors.

API model updates

Layer / File(s) Summary
Async and event payloads
src/main/java/com/chargebee/v4/models/asyncResponse/*, src/main/java/com/chargebee/v4/models/event/*
Adds async response/list models and the payment-source business-entity-changed event model with nested payload parsing.
Resource attributes and request fields
src/main/java/com/chargebee/v4/models/{alert,creditNote,invoice,paymentIntent,ramp,quote,...}/*
Adds exchange rates, proration modes, payment metadata, alert conditions, quantities, descriptions, customer fields, and related form serialization.
Enum and compatibility updates
src/main/java/com/chargebee/v4/models/*
Adds payment method, alert, event, dunning, tax, and filter enum values; changes metadata to maps and removes ledger balance attributes.

Estimated code review effort: 5 (Critical) | ~120 minutes

Suggested reviewers: cb-karthikp

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
build.gradle.kts

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

🔧 ast-grep (0.44.1)
src/main/java/com/chargebee/v4/models/estimate/Estimate.java

ast-grep timed out on this file


Comment @coderabbitai help to get the list of available commands.

@cb-alish
cb-alish merged commit 3830634 into v4 Jul 21, 2026
8 of 9 checks passed
@cb-alish
cb-alish deleted the release-v4.13.0 branch July 21, 2026 10:52

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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/main/java/com/chargebee/v4/models/grantBlock/GrantBlock.java`:
- Around line 103-105: Preserve the existing String-returning getMetadata()
contract in GrantBlock.java lines 103-105 and PromotionalGrant.java lines 38-40;
expose the map through a new accessor instead of changing the existing method
signature, or otherwise treat the change as a major-version break.

In
`@src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureCreateParams.java`:
- Around line 182-185: Update the dataType serialization in
MeteredFeatureCreateParams so the data_type form field uses the enum’s wire
value via getValue() rather than the enum object’s toString() output. Preserve
the existing null check and form field key.
🪄 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: 39d9afca-af51-41cd-9686-6a9ecb92be26

📥 Commits

Reviewing files that changed from the base of the PR and between d17faaf and 079f72f.

📒 Files selected for processing (88)
  • CHANGELOG.md
  • VERSION
  • build.gradle.kts
  • src/main/java/com/chargebee/v4/client/ClientMethods.java
  • src/main/java/com/chargebee/v4/client/ClientMethodsImpl.java
  • src/main/java/com/chargebee/v4/client/ServiceRegistry.java
  • src/main/java/com/chargebee/v4/models/alert/Alert.java
  • src/main/java/com/chargebee/v4/models/alert/params/AlertCreateParams.java
  • src/main/java/com/chargebee/v4/models/alert/params/AlertListParams.java
  • src/main/java/com/chargebee/v4/models/alert/params/ApplicationAlertsForSubscriptionParams.java
  • src/main/java/com/chargebee/v4/models/asyncResponse/AsyncResponse.java
  • src/main/java/com/chargebee/v4/models/asyncResponseList/AsyncResponseList.java
  • src/main/java/com/chargebee/v4/models/columnDefinition/ColumnDefinition.java
  • src/main/java/com/chargebee/v4/models/creditNote/CreditNote.java
  • src/main/java/com/chargebee/v4/models/creditNote/params/ImportCreditNoteParams.java
  • src/main/java/com/chargebee/v4/models/creditNoteEstimate/CreditNoteEstimate.java
  • src/main/java/com/chargebee/v4/models/customer/Customer.java
  • src/main/java/com/chargebee/v4/models/customer/params/CustomerCollectPaymentParams.java
  • src/main/java/com/chargebee/v4/models/customer/params/CustomerCreateParams.java
  • src/main/java/com/chargebee/v4/models/customer/params/CustomerUpdatePaymentMethodParams.java
  • src/main/java/com/chargebee/v4/models/entitlement/params/EntitlementListParams.java
  • src/main/java/com/chargebee/v4/models/estimate/Estimate.java
  • src/main/java/com/chargebee/v4/models/estimate/params/EstimateCreateInvoiceForItemsParams.java
  • src/main/java/com/chargebee/v4/models/estimate/params/EstimateGiftSubscriptionForItemsParams.java
  • src/main/java/com/chargebee/v4/models/estimate/params/EstimateGiftSubscriptionParams.java
  • src/main/java/com/chargebee/v4/models/event/Event.java
  • src/main/java/com/chargebee/v4/models/event/PaymentSourceBusinessEntityChangedEvent.java
  • src/main/java/com/chargebee/v4/models/event/params/EventListParams.java
  • src/main/java/com/chargebee/v4/models/export/params/ExportSubscriptionsParams.java
  • src/main/java/com/chargebee/v4/models/export/params/ExportTransactionsParams.java
  • src/main/java/com/chargebee/v4/models/feature/Feature.java
  • src/main/java/com/chargebee/v4/models/feature/params/FeatureListParams.java
  • src/main/java/com/chargebee/v4/models/gift/params/GiftCreateForItemsParams.java
  • src/main/java/com/chargebee/v4/models/gift/params/GiftCreateParams.java
  • src/main/java/com/chargebee/v4/models/grantBlock/GrantBlock.java
  • src/main/java/com/chargebee/v4/models/invoice/Invoice.java
  • src/main/java/com/chargebee/v4/models/invoice/params/ImportInvoiceParams.java
  • src/main/java/com/chargebee/v4/models/invoice/params/InvoiceCreateForChargeItemsAndChargesParams.java
  • src/main/java/com/chargebee/v4/models/invoice/params/InvoiceCreateParams.java
  • src/main/java/com/chargebee/v4/models/invoiceEstimate/InvoiceEstimate.java
  • src/main/java/com/chargebee/v4/models/ledgerOperation/LedgerOperation.java
  • src/main/java/com/chargebee/v4/models/ledgerOperation/params/ListLedgerOperationsParams.java
  • src/main/java/com/chargebee/v4/models/meter/Meter.java
  • src/main/java/com/chargebee/v4/models/meter/params/MeterListParams.java
  • src/main/java/com/chargebee/v4/models/meter/responses/MeterListResponse.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/MeteredFeature.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureArchiveParams.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureCreateParams.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureDeleteParams.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureReactivateParams.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/responses/MeteredFeatureArchiveResponse.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/responses/MeteredFeatureCreateResponse.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/responses/MeteredFeatureDeleteResponse.java
  • src/main/java/com/chargebee/v4/models/meteredFeature/responses/MeteredFeatureReactivateResponse.java
  • src/main/java/com/chargebee/v4/models/paymentIntent/PaymentIntent.java
  • src/main/java/com/chargebee/v4/models/paymentIntent/params/PaymentIntentCreateParams.java
  • src/main/java/com/chargebee/v4/models/paymentIntent/params/PaymentIntentUpdateParams.java
  • src/main/java/com/chargebee/v4/models/paymentSource/PaymentSource.java
  • src/main/java/com/chargebee/v4/models/paymentSource/params/PaymentSourceCreateUsingPaymentIntentParams.java
  • src/main/java/com/chargebee/v4/models/paymentSource/params/PaymentSourceCreateUsingPermanentTokenParams.java
  • src/main/java/com/chargebee/v4/models/paymentSource/params/PaymentSourceCreateUsingTempTokenParams.java
  • src/main/java/com/chargebee/v4/models/paymentSource/params/PaymentSourceListParams.java
  • src/main/java/com/chargebee/v4/models/promotionalGrant/PromotionalGrant.java
  • src/main/java/com/chargebee/v4/models/purchase/params/PurchaseCreateParams.java
  • src/main/java/com/chargebee/v4/models/quote/Quote.java
  • src/main/java/com/chargebee/v4/models/quoteLineGroup/QuoteLineGroup.java
  • src/main/java/com/chargebee/v4/models/quotedCharge/QuotedCharge.java
  • src/main/java/com/chargebee/v4/models/ramp/Ramp.java
  • src/main/java/com/chargebee/v4/models/ramp/params/RampCreateForSubscriptionParams.java
  • src/main/java/com/chargebee/v4/models/ramp/params/RampListParams.java
  • src/main/java/com/chargebee/v4/models/ramp/params/RampUpdateParams.java
  • src/main/java/com/chargebee/v4/models/recordedPurchase/params/RecordedPurchaseCreateParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/ImportSubscriptionParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionCreateForCustomerParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionCreateParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionCreateWithItemsParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionListParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionReactivateParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionResumeParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionUpdateForItemsParams.java
  • src/main/java/com/chargebee/v4/models/subscription/params/SubscriptionUpdateParams.java
  • src/main/java/com/chargebee/v4/models/thirdPartyPaymentMethod/ThirdPartyPaymentMethod.java
  • src/main/java/com/chargebee/v4/models/token/Token.java
  • src/main/java/com/chargebee/v4/models/transaction/Transaction.java
  • src/main/java/com/chargebee/v4/models/transaction/params/TransactionListParams.java
  • src/main/java/com/chargebee/v4/services/MeterService.java
  • src/main/java/com/chargebee/v4/services/MeteredFeatureService.java
  • src/main/java/com/chargebee/v4/telemetry/TelemetryAttributeKeys.java

Comment on lines +103 to +105
public java.util.Map<String, Object> getMetadata() {
return metadata;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve the public getMetadata() contract.

Changing its return type breaks existing consumers at compile time and already-compiled consumers with NoSuchMethodError. Keep a compatible accessor and add a map-specific API, or release this as a major-version breaking change.

  • src/main/java/com/chargebee/v4/models/grantBlock/GrantBlock.java#L103-L105: retain the String-returning contract or move the map to a new accessor.
  • src/main/java/com/chargebee/v4/models/promotionalGrant/PromotionalGrant.java#L38-L40: apply the same compatibility strategy.
📍 Affects 2 files
  • src/main/java/com/chargebee/v4/models/grantBlock/GrantBlock.java#L103-L105 (this comment)
  • src/main/java/com/chargebee/v4/models/promotionalGrant/PromotionalGrant.java#L38-L40
🤖 Prompt for 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.

In `@src/main/java/com/chargebee/v4/models/grantBlock/GrantBlock.java` around
lines 103 - 105, Preserve the existing String-returning getMetadata() contract
in GrantBlock.java lines 103-105 and PromotionalGrant.java lines 38-40; expose
the map through a new accessor instead of changing the existing method
signature, or otherwise treat the change as a major-version break.

Comment on lines +182 to +185
if (this.dataType != null) {

formData.put("data_type", this.dataType);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect how form-data enum values are serialized before HTTP send.
rg -nP --type=java -C3 '(getValue\(\)|instanceof\s+Enum|\.name\(\)|toFormData)' src/main/java/com/chargebee/v4/internal src/main/java/com/chargebee/v4/transport src/main/java/com/chargebee/v4/services/BaseService.java 2>/dev/null
# Compare with a sibling params class that serializes an enum into form data.
rg -nP --type=java -C2 'formData\.put\([^)]*this\.\w+\.getValue\(\)' src/main/java/com/chargebee/v4/models | head -40

Repository: chargebee/chargebee-java

Length of output: 14906


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the form serializer implementation.
ast-grep outline src/main/java/com/chargebee/v4/transport/FormRequestBody.java --view expanded

# Inspect the specific params class and the DataType enum.
ast-grep outline src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureCreateParams.java --view expanded

# Print the relevant sections with line numbers.
sed -n '1,220p' src/main/java/com/chargebee/v4/transport/FormRequestBody.java | cat -n
printf '\n----\n'
sed -n '1,260p' src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureCreateParams.java | cat -n

Repository: chargebee/chargebee-java

Length of output: 14963


Serialize data_type with the enum wire value
FormRequestBody encodes scalars via value.toString(), so formData.put("data_type", this.dataType) sends NUMBER/STRING instead of number/string. Use this.dataType.getValue() here or create requests for column definitions will fail.

🤖 Prompt for 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.

In
`@src/main/java/com/chargebee/v4/models/meteredFeature/params/MeteredFeatureCreateParams.java`
around lines 182 - 185, Update the dataType serialization in
MeteredFeatureCreateParams so the data_type form field uses the enum’s wire
value via getValue() rather than the enum object’s toString() output. Preserve
the existing null check and form field key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants