Skip to content
Closed
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
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
### v4.15.0 (2026-08-12)
* * *
### New Resources:
- [`GatewayPaymentMethodToken`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens) has been added.
- [`OmnichannelSubscriptionItemMetric`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_item_metrics) has been added.
- [`VaultedPaymentMethod`](https://apidocs.chargebee.com/docs/api/vaulted_payment_methods) has been added.


### New Actions:
- [`update_credit_note_details`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
- [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) has been added to [`Export`](https://apidocs.chargebee.com/docs/api/exports).
- [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) has been added to [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).


### New Attributes:
- [`vault_token`](https://apidocs.chargebee.com/docs/api/payment_sources/payment-source-object#vault_token) has been added to [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).


### New Parameters:
- [`updated_at.between`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at_between) 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).
- [`updated_at.on`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at_on) 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).
- [`purchased_at.between`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at_between) 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).
- [`purchased_at.on`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at_on) 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).
- [`limit`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#limit) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).
- [`offset`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#offset) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).
- [`include_deleted`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#include_deleted) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).
- [`comment`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details#comment) has been added as request body parameter to [`update_credit_note_details`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details) in [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
- [`ramp`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps#ramp) has been added as request body parameter to [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) in [`Export`](https://apidocs.chargebee.com/docs/api/exports).
- [`export_type`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps#export_type) has been added as request body parameter to [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) in [`Export`](https://apidocs.chargebee.com/docs/api/exports).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items#subscription_items_description) has been added as request body parameter to [`create_a_quote_for_a_new_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/edit-update-subscription-quote-for-items#subscription_items_description) has been added as request body parameter to [`edit_update_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-update-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items#subscription_items_description) has been added as request body parameter to [`edit_create_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-update-subscription-items#subscription_items_description) has been added as request body parameter to [`create_a_quote_for_update_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-update-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).


### New Events:
- [`vault_token_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_updated) has been added.
- [`vault_token_deleted`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_deleted) has been added.
- [`omnichannel_subscription_item_mrr_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_mrr_updated) has been added.
- [`vault_token_created`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_created) has been added.


### New Enums:
- `omnichannel_subscription_item_metric` has been added as a new value enum `EntityType`.
- `omnichannel_subscription_item_mrr_updated`, `vault_token_created`, `vault_token_updated`, and `vault_token_deleted` have been added as new values enum `EventType`.
- `chargebee`, `chargebee_payments`, `adyen`, `stripe`, `wepay`, `braintree`, `authorize_net`, `paypal_pro`, `pin`, `eway`, `eway_rapid`, `worldpay`, `balanced_payments`, `beanstream`, `bluepay`, `elavon`, `first_data_global`, `hdfc`, `migs`, `nmi`, `ogone`, `paymill`, `paypal_payflow_pro`, `sage_pay`, `tco`, `wirecard`, `amazon_payments`, `paypal_express_checkout`, `gocardless`, `orbital`, `moneris_us`, `moneris`, `bluesnap`, `cybersource`, `vantiv`, `checkout_com`, `paypal`, `ingenico_direct`, `exact`, `mollie`, `quickbooks`, `razorpay`, `global_payments`, `bank_of_america`, `ecentric`, `metrics_global`, `windcave`, `pay_com`, `ebanx`, `dlocal`, `nuvei`, `solidgate`, `paystack`, `jp_morgan`, `deutsche_bank`, `ezidebit`, `twikey`, `tempus`, `moyasar`, `payway`, and `not_applicable` have been added as new values enum `GatewayName`.
- `active`, `inactive`, and `pending_verification` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens/gateway-payment-method-token-object#status) in [`GatewayPaymentMethodToken`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens).
- `payment_method_helper`, `card_components`, `checkout`, `collect_now`, `portal`, and `payment_components` have been added as new values to enum attribute [`payment_intent_metadata.source`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata_source) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).



### v4.14.0 (2026-07-30)
* * *
### New Resources:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.14.0
4.15.0
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group = "com.chargebee"
version = "4.14.0"
version = "4.15.0"
description = "Java client library for ChargeBee"

// Project metadata
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/chargebee/v4/client/ClientMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@

import com.chargebee.v4.services.ThirdPartyEntityMappingService;

import com.chargebee.v4.services.VaultedPaymentMethodService;

import com.chargebee.v4.services.UsageChargeService;

import com.chargebee.v4.services.EntitlementOverrideService;
Expand Down Expand Up @@ -764,6 +766,13 @@ public interface ClientMethods {
*/
ThirdPartyEntityMappingService thirdPartyEntityMappings();

/**
* Access vaulted_payment_method-related operations.
*
* @return VaultedPaymentMethodService instance for fluent API access
*/
VaultedPaymentMethodService vaultedPaymentMethods();

/**
* Access usage_charge-related operations.
*
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/chargebee/v4/client/ClientMethodsImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@

import com.chargebee.v4.services.ThirdPartyEntityMappingService;

import com.chargebee.v4.services.VaultedPaymentMethodService;

import com.chargebee.v4.services.UsageChargeService;

import com.chargebee.v4.services.EntitlementOverrideService;
Expand Down Expand Up @@ -602,6 +604,11 @@ public ThirdPartyEntityMappingService thirdPartyEntityMappings() {
return getServiceRegistry().thirdPartyEntityMappings();
}

@Override
public VaultedPaymentMethodService vaultedPaymentMethods() {
return getServiceRegistry().vaultedPaymentMethods();
}

@Override
public UsageChargeService usageCharges() {
return getServiceRegistry().usageCharges();
Expand Down
19 changes: 19 additions & 0 deletions src/main/java/com/chargebee/v4/client/ServiceRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@

import com.chargebee.v4.services.ThirdPartyEntityMappingService;

import com.chargebee.v4.services.VaultedPaymentMethodService;

import com.chargebee.v4.services.UsageChargeService;

import com.chargebee.v4.services.EntitlementOverrideService;
Expand Down Expand Up @@ -355,6 +357,8 @@ final class ServiceRegistry {

private volatile ThirdPartyEntityMappingService thirdPartyEntityMappingService;

private volatile VaultedPaymentMethodService vaultedPaymentMethodService;

private volatile UsageChargeService usageChargeService;

private volatile EntitlementOverrideService entitlementOverrideService;
Expand Down Expand Up @@ -1609,6 +1613,21 @@ ThirdPartyEntityMappingService thirdPartyEntityMappings() {
return thirdPartyEntityMappingService;
}

/**
* Get or create the VaultedPaymentMethodService instance. Thread-safe lazy initialization using
* double-checked locking.
*/
VaultedPaymentMethodService vaultedPaymentMethods() {
if (vaultedPaymentMethodService == null) {
synchronized (this) {
if (vaultedPaymentMethodService == null) {
vaultedPaymentMethodService = new VaultedPaymentMethodService(client);
}
}
}
return vaultedPaymentMethodService;
}

/**
* Get or create the UsageChargeService instance. Thread-safe lazy initialization using
* double-checked locking.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
* This file is auto-generated by Chargebee.
* For more information on how to make changes to this file, please see the README.
* Reach out to dx@chargebee.com for any questions.
* Copyright 2025 Chargebee Inc.
*/
package com.chargebee.v4.models.creditNote.params;

import com.chargebee.v4.internal.Recommended;

import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;

public final class CreditNoteUpdateParams {

private final String comment;

private final Map<String, String> customFields;

private CreditNoteUpdateParams(CreditNoteUpdateBuilder builder) {

this.comment = builder.comment;

this.customFields =
builder.customFields.isEmpty()
? Collections.emptyMap()
: Collections.unmodifiableMap(new LinkedHashMap<>(builder.customFields));
}

public String getComment() {
return comment;
}

public Map<String, String> customFields() {
return customFields;
}

/** Get the form data for this request. */
public Map<String, Object> toFormData() {
Map<String, Object> formData = new LinkedHashMap<>();

if (this.comment != null) {

formData.put("comment", this.comment);
}

formData.putAll(customFields);

return formData;
}

/** Create a new builder for CreditNoteUpdateParams. */
@Recommended(reason = "Preferred for reusability, validation, and LLM-friendliness")
public static CreditNoteUpdateBuilder builder() {
return new CreditNoteUpdateBuilder();
}

public static final class CreditNoteUpdateBuilder {

private String comment;

private Map<String, String> customFields = new LinkedHashMap<>();

private CreditNoteUpdateBuilder() {}

public CreditNoteUpdateBuilder comment(String value) {
this.comment = value;
return this;
}

/**
* Add a custom field to the request. Custom fields must start with "cf_".
*
* @param fieldName the name of the custom field (e.g., "cf_custom_field_name")
* @param value the value of the custom field
* @return this builder
* @throws IllegalArgumentException if fieldName doesn't start with "cf_"
*/
public CreditNoteUpdateBuilder customField(String fieldName, String value) {
if (fieldName == null || !fieldName.startsWith("cf_")) {
throw new IllegalArgumentException("Custom field name must start with 'cf_'");
}
this.customFields.put(fieldName, value);
return this;
}

/**
* Add multiple custom fields to the request. All field names must start with "cf_".
*
* @param customFields map of custom field names to values
* @return this builder
* @throws IllegalArgumentException if any field name doesn't start with "cf_"
*/
public CreditNoteUpdateBuilder customFields(Map<String, String> customFields) {
if (customFields != null) {
for (Map.Entry<String, String> entry : customFields.entrySet()) {
if (entry.getKey() == null || !entry.getKey().startsWith("cf_")) {
throw new IllegalArgumentException(
"Custom field name must start with 'cf_': " + entry.getKey());
}
this.customFields.put(entry.getKey(), entry.getValue());
}
}
return this;
}

public CreditNoteUpdateParams build() {
return new CreditNoteUpdateParams(this);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package com.chargebee.v4.models.creditNote.responses;

import com.chargebee.v4.models.creditNote.CreditNote;

import com.chargebee.v4.models.BaseResponse;
import com.chargebee.v4.internal.JsonUtil;
import com.google.gson.JsonObject;
import com.chargebee.v4.transport.Response;

/**
* Immutable response object for CreditNoteUpdate operation. Contains the response data from the
* API.
*/
public final class CreditNoteUpdateResponse extends BaseResponse {
private final CreditNote creditNote;

private CreditNoteUpdateResponse(Builder builder) {
super(builder.httpResponse);

this.creditNote = builder.creditNote;
}

/** Parse JSON response into CreditNoteUpdateResponse object. */
public static CreditNoteUpdateResponse fromJson(String json) {
return fromJson(json, null);
}

/** Parse JSON response into CreditNoteUpdateResponse object with HTTP response. */
public static CreditNoteUpdateResponse fromJson(String json, Response httpResponse) {
try {
JsonObject jsonObj = JsonUtil.parse(json);
Builder builder = builder();

JsonObject __creditNoteObj = JsonUtil.getJsonObject(jsonObj, "credit_note");
if (__creditNoteObj != null) {
builder.creditNote(CreditNote.fromJson(__creditNoteObj));
}

builder.httpResponse(httpResponse);
return builder.build();
} catch (Exception e) {
throw new RuntimeException("Failed to parse CreditNoteUpdateResponse from JSON", e);
}
}

/** Create a new builder for CreditNoteUpdateResponse. */
public static Builder builder() {
return new Builder();
}

/** Builder for CreditNoteUpdateResponse. */
public static class Builder {

private CreditNote creditNote;

private Response httpResponse;

private Builder() {}

public Builder creditNote(CreditNote creditNote) {
this.creditNote = creditNote;
return this;
}

public Builder httpResponse(Response httpResponse) {
this.httpResponse = httpResponse;
return this;
}

public CreditNoteUpdateResponse build() {
return new CreditNoteUpdateResponse(this);
}
}

/** Get the creditNote from the response. */
public CreditNote getCreditNote() {
return creditNote;
}

@Override
public String toString() {
return "CreditNoteUpdateResponse{" + "creditNote=" + creditNote + "}";
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

CreditNoteUpdateResponse that = (CreditNoteUpdateResponse) o;
return java.util.Objects.equals(creditNote, that.creditNote);
}

@Override
public int hashCode() {

return java.util.Objects.hash(creditNote);
}
}
Loading
Loading