diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6453730a..2b9d5185 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,85 @@
+### v3.51.0 (2026-07-21)
+* * *
+### New Resources:
+- [`AsyncResponse`](https://apidocs.chargebee.com/docs/api/async_responses) has been added.
+- [`AsyncResponseList`](https://apidocs.chargebee.com/docs/api/async_response_lists) has been added.
+- [`ColumnDefinition`](https://apidocs.chargebee.com/docs/api/column_definitions) has been added.
+- [`Meter`](https://apidocs.chargebee.com/docs/api/meters) has been added.
+- [`MeteredFeature`](https://apidocs.chargebee.com/docs/api/metered_features) has been added.
+
+
+### New Attributes:
+- [`currency_code`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#currency_code) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
+- [`threshold`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#threshold) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
+- [`filter_conditions`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#filter_conditions) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
+- [`exchange_rates`](https://apidocs.chargebee.com/docs/api/credit_notes/credit-note-object#exchange_rates) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
+- [`metered`](https://apidocs.chargebee.com/docs/api/features/feature-object#metered) has been added to [`Feature`](https://apidocs.chargebee.com/docs/api/features).
+- [`exchange_rates`](https://apidocs.chargebee.com/docs/api/invoices/invoice-object#exchange_rates) has been added to [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`payment_intent_metadata`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata) has been added to [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
+
+
+### New Parameters:
+- [`metered`](https://apidocs.chargebee.com/docs/api/features/list-features#metered) has been added as query parameter to [`list_features`](https://apidocs.chargebee.com/docs/api/features/list-features) in [`Feature`](https://apidocs.chargebee.com/docs/api/features).
+- [`decommissioned`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions#decommissioned) has been added as query parameter to [`list_subscriptions`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions) in [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).
+- [`currency_code`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#currency_code) 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).
+- [`line_items.proration_mode`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note#line_items_proration_mode) has been added as request body parameter to [`import_credit_note`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note) in [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
+- [`item_prices.description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#item_prices_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
+- [`item_prices.entity_description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#item_prices_entity_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
+- [`charges.entity_description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#charges_entity_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
+- [`subscription.decommissioned`](https://apidocs.chargebee.com/docs/api/exports/export-subscriptions#subscription_decommissioned) has been added as request body parameter to [`export_subscriptions`](https://apidocs.chargebee.com/docs/api/exports/export-subscriptions) in [`Export`](https://apidocs.chargebee.com/docs/api/exports).
+- [`item_prices.description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#item_prices_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`item_prices.entity_description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#item_prices_entity_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`charges.entity_description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#charges_entity_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`create_pending_invoice`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#create_pending_invoice) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`line_items.proration_mode`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice#line_items_proration_mode) has been added as request body parameter to [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`paid_at`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice#paid_at) has been added as request body parameter to [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- [`discounts_to_add.quantity`](https://apidocs.chargebee.com/docs/api/ramps/create-a-ramp#discounts_to_add_quantity) has been added as request body parameter to [`create_a_ramp`](https://apidocs.chargebee.com/docs/api/ramps/create-a-ramp) in [`Ramp`](https://apidocs.chargebee.com/docs/api/ramps).
+- [`discounts_to_add.quantity`](https://apidocs.chargebee.com/docs/api/ramps/update-a-subscription-ramp#discounts_to_add_quantity) has been added as request body parameter to [`update_a_subscription_ramp`](https://apidocs.chargebee.com/docs/api/ramps/update-a-subscription-ramp) in [`Ramp`](https://apidocs.chargebee.com/docs/api/ramps).
+- [`customer.email`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_email) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases).
+- [`customer.first_name`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_first_name) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases).
+- [`customer.last_name`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_last_name) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases).
+
+
+### Parameter Updates:
+- [`metered_feature_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#metered_feature_id) has been changed from required to optional in [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
+
+
+### New Events:
+- [`payment_source_business_entity_changed`](https://apidocs.chargebee.com/docs/api/events/webhook/payment_source_business_entity_changed) has been added.
+
+
+### Deleted Attributes:
+- `start_balance` has been removed from [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
+- `end_balance` has been removed from [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
+
+
+### 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`](https://apidocs.chargebee.com/docs/api/async_responses/async-response-object#status) in [`AsyncResponse`](https://apidocs.chargebee.com/docs/api/async_responses).
+- `number` and `string` have been added as new values to enum attribute [`data_type`](https://apidocs.chargebee.com/docs/api/column_definitions/column-definition-object#data_type) in [`ColumnDefinition`](https://apidocs.chargebee.com/docs/api/column_definitions).
+- `simple` and `compound` have been added as new values to enum attribute [`type`](https://apidocs.chargebee.com/docs/api/meters/meter-object#type) in [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
+- `active`, `archived`, and `deleted` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/meters/meter-object#status) in [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
+- `paynow`, `bizum`, and `promptpay` 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).
+- `paynow`, `bizum`, and `promptpay` 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).
+- `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`](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).
+- `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`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note) of [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
+- `true` and `false` have been added as new values to enum query parameter `metered.is` in [`list_features`](https://apidocs.chargebee.com/docs/api/features/list-features) of [`Feature`](https://apidocs.chargebee.com/docs/api/features).
+- `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`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) of [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
+- `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`](https://apidocs.chargebee.com/docs/api/meters/list-all-available-meters) of [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
+- `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`](https://apidocs.chargebee.com/docs/api/meters/list-all-available-meters) of [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
+- `number` and `string` have been added as new values to enum request body parameter `column_definitions.data_type` in [`create_a_metered_feature`](https://apidocs.chargebee.com/docs/api/metered_features/create-a-metered-feature) of [`MeteredFeature`](https://apidocs.chargebee.com/docs/api/metered_features).
+- `paynow`, `bizum`, and `promptpay` 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).
+- `paynow`, `bizum`, and `promptpay` 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).
+- `true` and `false` have been added as new values to enum query parameter `decommissioned.is` in [`list_subscriptions`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions) of [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).
+
+
+
### v3.50.0 (2026-06-22)
* * *
### Bug Fixes:
diff --git a/VERSION b/VERSION
index ca25ff63..84ba969c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.50.0
+3.51.0
diff --git a/pom.xml b/pom.xml
index cf165cd0..8991a737 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.chargebee
chargebee-java
- 3.50.0
+ 3.51.0
jar
diff --git a/src/main/java/com/chargebee/Environment.java b/src/main/java/com/chargebee/Environment.java
index 012b3657..7bb9977e 100644
--- a/src/main/java/com/chargebee/Environment.java
+++ b/src/main/java/com/chargebee/Environment.java
@@ -38,7 +38,7 @@ public class Environment {
public static final String API_VERSION = "v2";
- public static final String LIBRARY_VERSION = "3.50.0";
+ public static final String LIBRARY_VERSION = "3.51.0";
private final String apiBaseUrl;
diff --git a/src/main/java/com/chargebee/internal/ResultBase.java b/src/main/java/com/chargebee/internal/ResultBase.java
index f99cee64..29ffe93b 100644
--- a/src/main/java/com/chargebee/internal/ResultBase.java
+++ b/src/main/java/com/chargebee/internal/ResultBase.java
@@ -16,6 +16,14 @@ public ResultBase(JSONObject jsonObj) {
}
+ public AsyncResponseList asyncResponseList() {
+ return (AsyncResponseList)get("async_response_list");
+ }
+
+ public AsyncResponse asyncResponse() {
+ return (AsyncResponse)get("async_response");
+ }
+
public Subscription subscription() {
return (Subscription)get("subscription");
}
@@ -356,10 +364,18 @@ public Rule rule() {
return (Rule)get("rule");
}
+ public Meter meter() {
+ return (Meter)get("meter");
+ }
+
public UsageEvent usageEvent() {
return (UsageEvent)get("usage_event");
}
+ public MeteredFeature meteredFeature() {
+ return (MeteredFeature)get("metered_feature");
+ }
+
public UsageFile usageFile() {
return (UsageFile)get("usage_file");
}
diff --git a/src/main/java/com/chargebee/models/Alert.java b/src/main/java/com/chargebee/models/Alert.java
index b9e32258..f9cf3335 100644
--- a/src/main/java/com/chargebee/models/Alert.java
+++ b/src/main/java/com/chargebee/models/Alert.java
@@ -20,6 +20,52 @@ public enum Status {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public static class Threshold extends Resource {
+ public Threshold(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public Mode mode() {
+ return reqEnum("mode", Mode.class);
+ }
+
+ public Double value() {
+ return reqDouble("value");
+ }
+
+ }
+
+ public static class FilterCondition extends Resource {
+ public enum Field {
+ PLAN_PRICE_ID,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ public enum Operator {
+ EQUALS,NOT_EQUALS,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ public FilterCondition(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public Field field() {
+ return reqEnum("field", Field.class);
+ }
+
+ public Operator operator() {
+ return reqEnum("operator", Operator.class);
+ }
+
+ public String value() {
+ return reqString("value");
+ }
+
+ }
+
//Constructors
//============
@@ -51,7 +97,11 @@ public String description() {
}
public String meteredFeatureId() {
- return reqString("metered_feature_id");
+ return optString("metered_feature_id");
+ }
+
+ public String currencyCode() {
+ return optString("currency_code");
}
public String subscriptionId() {
@@ -74,6 +124,14 @@ public Timestamp updatedAt() {
return reqTimestamp("updated_at");
}
+ public List threshold() {
+ return optList("threshold", Alert.Threshold.class);
+ }
+
+ public List filterConditions() {
+ return optList("filter_conditions", Alert.FilterCondition.class);
+ }
+
// Operations
//===========
@@ -136,7 +194,13 @@ public CreateRequest description(String description) {
public CreateRequest meteredFeatureId(String meteredFeatureId) {
- params.add("metered_feature_id", meteredFeatureId);
+ params.addOpt("metered_feature_id", meteredFeatureId);
+ return this;
+ }
+
+
+ public CreateRequest currencyCode(String currencyCode) {
+ params.addOpt("currency_code", currencyCode);
return this;
}
@@ -154,7 +218,7 @@ public CreateRequest meta(String meta) {
public CreateRequest thresholdMode(com.chargebee.models.enums.Mode thresholdMode) {
- params.add("threshold[mode]", thresholdMode);
+ params.addOpt("threshold[mode]", thresholdMode);
return this;
}
diff --git a/src/main/java/com/chargebee/models/AsyncResponse.java b/src/main/java/com/chargebee/models/AsyncResponse.java
new file mode 100644
index 00000000..d3fdaee4
--- /dev/null
+++ b/src/main/java/com/chargebee/models/AsyncResponse.java
@@ -0,0 +1,131 @@
+package com.chargebee.models;
+
+import com.chargebee.*;
+import com.chargebee.internal.*;
+import com.chargebee.filters.*;
+import com.chargebee.filters.enums.SortOrder;
+import com.chargebee.internal.HttpUtil.Method;
+import com.chargebee.models.enums.*;
+import org.json.*;
+import java.io.*;
+import java.sql.Timestamp;
+import java.util.*;
+
+public class AsyncResponse extends Resource {
+
+ public enum Status {
+ SUCCESS,
+ FAILED,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ public static class RequestAsyncApi extends Resource {
+ public RequestAsyncApi(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public String id() {
+ return reqString("id");
+ }
+
+ public String resource() {
+ return optString("resource");
+ }
+
+ public String operationType() {
+ return optString("operation_type");
+ }
+
+ public String method() {
+ return optString("method");
+ }
+
+ public String uri() {
+ return optString("uri");
+ }
+
+ public String idempotencyKey() {
+ return optString("idempotency_key");
+ }
+
+ }
+
+ public static class Error extends Resource {
+ public Error(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public String message() {
+ return optString("message");
+ }
+
+ public String type() {
+ return optString("type");
+ }
+
+ public String apiErrorCode() {
+ return optString("api_error_code");
+ }
+
+ public String errorCode() {
+ return optString("error_code");
+ }
+
+ public String errorMsg() {
+ return optString("error_msg");
+ }
+
+ public String httpStatusCode() {
+ return optString("http_status_code");
+ }
+
+ }
+
+ //Constructors
+ //============
+
+ public AsyncResponse(String jsonStr) {
+ super(jsonStr);
+ }
+
+ public AsyncResponse(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ // Fields
+ //=======
+
+ public String apiVersion() {
+ return optString("api_version");
+ }
+
+ public Timestamp createdAt() {
+ return optTimestamp("created_at");
+ }
+
+ public Timestamp completedAt() {
+ return optTimestamp("completed_at");
+ }
+
+ public Status status() {
+ return reqEnum("status", Status.class);
+ }
+
+ public AsyncResponse.RequestAsyncApi request() {
+ return optSubResource("request", AsyncResponse.RequestAsyncApi.class);
+ }
+
+ public AsyncResponse.Error errorDetail() {
+ return optSubResource("error_detail", AsyncResponse.Error.class);
+ }
+
+ public JSONObject result() {
+ return optJSONObject("result");
+ }
+
+ // Operations
+ //===========
+
+
+}
diff --git a/src/main/java/com/chargebee/models/AsyncResponseList.java b/src/main/java/com/chargebee/models/AsyncResponseList.java
new file mode 100644
index 00000000..223080a5
--- /dev/null
+++ b/src/main/java/com/chargebee/models/AsyncResponseList.java
@@ -0,0 +1,38 @@
+package com.chargebee.models;
+
+import com.chargebee.*;
+import com.chargebee.internal.*;
+import com.chargebee.filters.*;
+import com.chargebee.filters.enums.SortOrder;
+import com.chargebee.internal.HttpUtil.Method;
+import com.chargebee.models.enums.*;
+import org.json.*;
+import java.io.*;
+import java.sql.Timestamp;
+import java.util.*;
+
+public class AsyncResponseList extends Resource {
+
+ //Constructors
+ //============
+
+ public AsyncResponseList(String jsonStr) {
+ super(jsonStr);
+ }
+
+ public AsyncResponseList(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ // Fields
+ //=======
+
+ public List list() {
+ return optList("list", AsyncResponse.class);
+ }
+
+ // Operations
+ //===========
+
+
+}
diff --git a/src/main/java/com/chargebee/models/ColumnDefinition.java b/src/main/java/com/chargebee/models/ColumnDefinition.java
new file mode 100644
index 00000000..6861b46f
--- /dev/null
+++ b/src/main/java/com/chargebee/models/ColumnDefinition.java
@@ -0,0 +1,49 @@
+package com.chargebee.models;
+
+import com.chargebee.*;
+import com.chargebee.internal.*;
+import com.chargebee.filters.*;
+import com.chargebee.filters.enums.SortOrder;
+import com.chargebee.internal.HttpUtil.Method;
+import com.chargebee.models.enums.*;
+import org.json.*;
+import java.io.*;
+import java.sql.Timestamp;
+import java.util.*;
+
+public class ColumnDefinition extends Resource {
+
+ public enum DataType {
+ NUMBER,
+ STRING,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ //Constructors
+ //============
+
+ public ColumnDefinition(String jsonStr) {
+ super(jsonStr);
+ }
+
+ public ColumnDefinition(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ // Fields
+ //=======
+
+ public String columnName() {
+ return reqString("column_name");
+ }
+
+ public DataType dataType() {
+ return reqEnum("data_type", DataType.class);
+ }
+
+ // Operations
+ //===========
+
+
+}
diff --git a/src/main/java/com/chargebee/models/CreditNote.java b/src/main/java/com/chargebee/models/CreditNote.java
index fb2019f9..0f0e8c48 100644
--- a/src/main/java/com/chargebee/models/CreditNote.java
+++ b/src/main/java/com/chargebee/models/CreditNote.java
@@ -55,6 +55,12 @@ public enum EntityType {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public enum ProrationMode {
+ RESET,DELTA,SERVICE_PERIOD_REVISION,ADJUSTED_TERM,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
public LineItem(JSONObject jsonObj) {
super(jsonObj);
}
@@ -159,6 +165,10 @@ public String customerId() {
return optString("customer_id");
}
+ public ProrationMode prorationMode() {
+ return optEnum("proration_mode", ProrationMode.class);
+ }
+
}
public static class LineItemTier extends Resource {
@@ -538,6 +548,21 @@ public TaxApplication taxApplication() {
}
+ public static class ExchangeRate extends Resource {
+ public ExchangeRate(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public String currencyCode() {
+ return reqString("currency_code");
+ }
+
+ public BigDecimal rate() {
+ return reqBigDecimal("rate");
+ }
+
+ }
+
public static class ShippingAddress extends Resource {
public ShippingAddress(JSONObject jsonObj) {
super(jsonObj);
@@ -898,6 +923,10 @@ public BigDecimal localCurrencyExchangeRate() {
return optBigDecimal("local_currency_exchange_rate");
}
+ public List exchangeRates() {
+ return optList("exchange_rates", CreditNote.ExchangeRate.class);
+ }
+
public String createReasonCode() {
return optString("create_reason_code");
}
@@ -1684,6 +1713,10 @@ public ImportCreditNoteRequest lineItemTax10Amount(int index, Long lineItemTax10
params.addOpt("line_items[tax10_amount][" + index + "]", lineItemTax10Amount);
return this;
}
+ public ImportCreditNoteRequest lineItemProrationMode(int index, CreditNote.LineItem.ProrationMode lineItemProrationMode) {
+ params.addOpt("line_items[proration_mode][" + index + "]", lineItemProrationMode);
+ return this;
+ }
public ImportCreditNoteRequest lineItemTierLineItemId(int index, String lineItemTierLineItemId) {
params.add("line_item_tiers[line_item_id][" + index + "]", lineItemTierLineItemId);
return this;
diff --git a/src/main/java/com/chargebee/models/CreditNoteEstimate.java b/src/main/java/com/chargebee/models/CreditNoteEstimate.java
index d049c95b..66d37a78 100644
--- a/src/main/java/com/chargebee/models/CreditNoteEstimate.java
+++ b/src/main/java/com/chargebee/models/CreditNoteEstimate.java
@@ -29,6 +29,12 @@ public enum EntityType {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public enum ProrationMode {
+ RESET,DELTA,SERVICE_PERIOD_REVISION,ADJUSTED_TERM,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
public LineItem(JSONObject jsonObj) {
super(jsonObj);
}
@@ -133,6 +139,10 @@ public String customerId() {
return optString("customer_id");
}
+ public ProrationMode prorationMode() {
+ return optEnum("proration_mode", ProrationMode.class);
+ }
+
}
public static class LineItemTier extends Resource {
diff --git a/src/main/java/com/chargebee/models/Customer.java b/src/main/java/com/chargebee/models/Customer.java
index 1751a25b..eb33e290 100644
--- a/src/main/java/com/chargebee/models/Customer.java
+++ b/src/main/java/com/chargebee/models/Customer.java
@@ -209,7 +209,7 @@ public Boolean sendBillingEmail() {
public static class PaymentMethod extends Resource {
public enum Type {
- CARD,PAYPAL_EXPRESS_CHECKOUT,AMAZON_PAYMENTS,DIRECT_DEBIT,GENERIC,ALIPAY,UNIONPAY,APPLE_PAY,WECHAT_PAY,IDEAL,GOOGLE_PAY,SOFORT,BANCONTACT,GIROPAY,DOTPAY,UPI,NETBANKING_EMANDATES,VENMO,PAY_TO,FASTER_PAYMENTS,SEPA_INSTANT_TRANSFER,AUTOMATED_BANK_TRANSFER,KLARNA_PAY_NOW,ONLINE_BANKING_POLAND,PAYCONIQ_BY_BANCONTACT,ELECTRONIC_PAYMENT_STANDARD,KBC_PAYMENT_BUTTON,PAY_BY_BANK,TRUSTLY,STABLECOIN,KAKAO_PAY,NAVER_PAY,REVOLUT_PAY,CASH_APP_PAY,TWINT,GO_PAY,GRAB_PAY,PAY_CO,AFTER_PAY,SWISH,PAYME,PIX,KLARNA,ALIPAY_HK,PAYPAY,GCASH,SOUTH_KOREAN_CARDS,
+ CARD,PAYPAL_EXPRESS_CHECKOUT,AMAZON_PAYMENTS,DIRECT_DEBIT,GENERIC,ALIPAY,UNIONPAY,APPLE_PAY,WECHAT_PAY,IDEAL,GOOGLE_PAY,SOFORT,BANCONTACT,GIROPAY,DOTPAY,UPI,NETBANKING_EMANDATES,VENMO,PAY_TO,FASTER_PAYMENTS,SEPA_INSTANT_TRANSFER,AUTOMATED_BANK_TRANSFER,KLARNA_PAY_NOW,ONLINE_BANKING_POLAND,PAYCONIQ_BY_BANCONTACT,ELECTRONIC_PAYMENT_STANDARD,KBC_PAYMENT_BUTTON,PAY_BY_BANK,TRUSTLY,STABLECOIN,KAKAO_PAY,NAVER_PAY,REVOLUT_PAY,CASH_APP_PAY,TWINT,GO_PAY,GRAB_PAY,PAY_CO,AFTER_PAY,SWISH,PAYME,PIX,KLARNA,ALIPAY_HK,PAYPAY,GCASH,SOUTH_KOREAN_CARDS,PAYNOW,BIZUM,PROMPTPAY,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
diff --git a/src/main/java/com/chargebee/models/Estimate.java b/src/main/java/com/chargebee/models/Estimate.java
index cac6cc02..0983d63d 100644
--- a/src/main/java/com/chargebee/models/Estimate.java
+++ b/src/main/java/com/chargebee/models/Estimate.java
@@ -3754,6 +3754,18 @@ public CreateInvoiceForItemsRequest chargeDateTo(int index, Timestamp chargeDate
params.addOpt("charges[date_to][" + index + "]", chargeDateTo);
return this;
}
+ public CreateInvoiceForItemsRequest itemPriceDescription(int index, String itemPriceDescription) {
+ params.addOpt("item_prices[description][" + index + "]", itemPriceDescription);
+ return this;
+ }
+ public CreateInvoiceForItemsRequest itemPriceEntityDescription(int index, String itemPriceEntityDescription) {
+ params.addOpt("item_prices[entity_description][" + index + "]", itemPriceEntityDescription);
+ return this;
+ }
+ public CreateInvoiceForItemsRequest chargeEntityDescription(int index, String chargeEntityDescription) {
+ params.addOpt("charges[entity_description][" + index + "]", chargeEntityDescription);
+ return this;
+ }
public CreateInvoiceForItemsRequest notesToRemoveEntityType(int index, com.chargebee.models.enums.EntityType notesToRemoveEntityType) {
params.addOpt("notes_to_remove[entity_type][" + index + "]", notesToRemoveEntityType);
return this;
diff --git a/src/main/java/com/chargebee/models/Export.java b/src/main/java/com/chargebee/models/Export.java
index d980e30c..1926b3e6 100644
--- a/src/main/java/com/chargebee/models/Export.java
+++ b/src/main/java/com/chargebee/models/Export.java
@@ -1210,6 +1210,11 @@ public EnumFilter subs
}
+ public BooleanFilter subscriptionDecommissioned() {
+ return new BooleanFilter("subscription[decommissioned]",this);
+ }
+
+
@Override
public Params params() {
return params;
diff --git a/src/main/java/com/chargebee/models/Feature.java b/src/main/java/com/chargebee/models/Feature.java
index 8b826163..dc0b9775 100644
--- a/src/main/java/com/chargebee/models/Feature.java
+++ b/src/main/java/com/chargebee/models/Feature.java
@@ -103,6 +103,10 @@ public Timestamp createdAt() {
return reqTimestamp("created_at");
}
+ public Boolean metered() {
+ return reqBoolean("metered");
+ }
+
public List levels() {
return optList("levels", Feature.Level.class);
}
@@ -180,6 +184,11 @@ public EnumFilter type() {
}
+ public BooleanFilter metered() {
+ return new BooleanFilter("metered",this);
+ }
+
+
@Override
public Params params() {
return params;
diff --git a/src/main/java/com/chargebee/models/GrantBlock.java b/src/main/java/com/chargebee/models/GrantBlock.java
index 0a8298eb..24d59c49 100644
--- a/src/main/java/com/chargebee/models/GrantBlock.java
+++ b/src/main/java/com/chargebee/models/GrantBlock.java
@@ -98,10 +98,6 @@ public Status status() {
return reqEnum("status", Status.class);
}
- public String metadata() {
- return optString("metadata");
- }
-
public GrantSource grantSource() {
return reqEnum("grant_source", GrantSource.class);
}
@@ -122,6 +118,10 @@ public UnitType unitType() {
return optEnum("unit_type", UnitType.class);
}
+ public JSONObject metadata() {
+ return optJSONObject("metadata");
+ }
+
// Operations
//===========
@@ -179,7 +179,6 @@ public GrantBlockListGrantBlocksRequest sortByCreatedAt(SortOrder order) {
}
-
@Override
public Params params() {
return params;
diff --git a/src/main/java/com/chargebee/models/Invoice.java b/src/main/java/com/chargebee/models/Invoice.java
index 04f0619b..9c452c9e 100644
--- a/src/main/java/com/chargebee/models/Invoice.java
+++ b/src/main/java/com/chargebee/models/Invoice.java
@@ -34,6 +34,21 @@ public enum DunningStatus {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public static class ExchangeRate extends Resource {
+ public ExchangeRate(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public String currencyCode() {
+ return reqString("currency_code");
+ }
+
+ public BigDecimal rate() {
+ return reqBigDecimal("rate");
+ }
+
+ }
+
public static class LineItem extends Resource {
public enum EntityType {
ADHOC,PLAN_ITEM_PRICE,ADDON_ITEM_PRICE,CHARGE_ITEM_PRICE,PLAN_SETUP,PLAN,ADDON,
@@ -41,6 +56,12 @@ public enum EntityType {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public enum ProrationMode {
+ RESET,DELTA,SERVICE_PERIOD_REVISION,ADJUSTED_TERM,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
public LineItem(JSONObject jsonObj) {
super(jsonObj);
}
@@ -145,6 +166,10 @@ public String customerId() {
return optString("customer_id");
}
+ public ProrationMode prorationMode() {
+ return optEnum("proration_mode", ProrationMode.class);
+ }
+
}
public static class LineItemTier extends Resource {
@@ -1102,6 +1127,10 @@ public String lineItemsNextOffset() {
return optString("line_items_next_offset");
}
+ public List exchangeRates() {
+ return optList("exchange_rates", Invoice.ExchangeRate.class);
+ }
+
public Boolean firstInvoice() {
return optBoolean("first_invoice");
}
@@ -2092,6 +2121,12 @@ public CreateForChargeItemsAndChargesRequest invoiceDate(Timestamp invoiceDate)
}
+ public CreateForChargeItemsAndChargesRequest createPendingInvoice(Boolean createPendingInvoice) {
+ params.addOpt("create_pending_invoice", createPendingInvoice);
+ return this;
+ }
+
+
public CreateForChargeItemsAndChargesRequest tokenId(String tokenId) {
params.addOpt("token_id", tokenId);
return this;
@@ -2510,6 +2545,18 @@ public CreateForChargeItemsAndChargesRequest itemTierPackageSize(int index, Inte
params.addOpt("item_tiers[package_size][" + index + "]", itemTierPackageSize);
return this;
}
+ public CreateForChargeItemsAndChargesRequest itemPriceDescription(int index, String itemPriceDescription) {
+ params.addOpt("item_prices[description][" + index + "]", itemPriceDescription);
+ return this;
+ }
+ public CreateForChargeItemsAndChargesRequest itemPriceEntityDescription(int index, String itemPriceEntityDescription) {
+ params.addOpt("item_prices[entity_description][" + index + "]", itemPriceEntityDescription);
+ return this;
+ }
+ public CreateForChargeItemsAndChargesRequest chargeEntityDescription(int index, String chargeEntityDescription) {
+ params.addOpt("charges[entity_description][" + index + "]", chargeEntityDescription);
+ return this;
+ }
public CreateForChargeItemsAndChargesRequest chargeAmount(int index, Long chargeAmount) {
params.addOpt("charges[amount][" + index + "]", chargeAmount);
return this;
@@ -3165,6 +3212,12 @@ public ImportInvoiceRequest useForProration(Boolean useForProration) {
}
+ public ImportInvoiceRequest paidAt(Timestamp paidAt) {
+ params.addOpt("paid_at", paidAt);
+ return this;
+ }
+
+
public ImportInvoiceRequest creditNoteId(String creditNoteId) {
params.addOpt("credit_note[id]", creditNoteId);
return this;
@@ -3458,6 +3511,10 @@ public ImportInvoiceRequest lineItemTax10Amount(int index, Long lineItemTax10Amo
params.addOpt("line_items[tax10_amount][" + index + "]", lineItemTax10Amount);
return this;
}
+ public ImportInvoiceRequest lineItemProrationMode(int index, Invoice.LineItem.ProrationMode lineItemProrationMode) {
+ params.addOpt("line_items[proration_mode][" + index + "]", lineItemProrationMode);
+ return this;
+ }
public ImportInvoiceRequest lineItemCreatedAt(int index, Timestamp lineItemCreatedAt) {
params.addOpt("line_items[created_at][" + index + "]", lineItemCreatedAt);
return this;
diff --git a/src/main/java/com/chargebee/models/InvoiceEstimate.java b/src/main/java/com/chargebee/models/InvoiceEstimate.java
index d0e590e5..710b298b 100644
--- a/src/main/java/com/chargebee/models/InvoiceEstimate.java
+++ b/src/main/java/com/chargebee/models/InvoiceEstimate.java
@@ -21,6 +21,12 @@ public enum EntityType {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public enum ProrationMode {
+ RESET,DELTA,SERVICE_PERIOD_REVISION,ADJUSTED_TERM,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
public LineItem(JSONObject jsonObj) {
super(jsonObj);
}
@@ -125,6 +131,10 @@ public String customerId() {
return optString("customer_id");
}
+ public ProrationMode prorationMode() {
+ return optEnum("proration_mode", ProrationMode.class);
+ }
+
}
public static class LineItemTier extends Resource {
diff --git a/src/main/java/com/chargebee/models/LedgerAccountBalance.java b/src/main/java/com/chargebee/models/LedgerAccountBalance.java
index 7db0b799..f282f87d 100644
--- a/src/main/java/com/chargebee/models/LedgerAccountBalance.java
+++ b/src/main/java/com/chargebee/models/LedgerAccountBalance.java
@@ -135,7 +135,6 @@ public StringFilter unitId
}
-
@Override
public Params params() {
return params;
diff --git a/src/main/java/com/chargebee/models/LedgerOperation.java b/src/main/java/com/chargebee/models/LedgerOperation.java
index 3afa8364..f993959e 100644
--- a/src/main/java/com/chargebee/models/LedgerOperation.java
+++ b/src/main/java/com/chargebee/models/LedgerOperation.java
@@ -59,14 +59,6 @@ public String amount() {
return reqString("amount");
}
- public String startBalance() {
- return reqString("start_balance");
- }
-
- public String endBalance() {
- return reqString("end_balance");
- }
-
public String provisionedStartBalance() {
return reqString("provisioned_start_balance");
}
@@ -95,10 +87,6 @@ public Timestamp autoReleaseTimestamp() {
return optTimestamp("auto_release_timestamp");
}
- public String metadata() {
- return optString("metadata");
- }
-
public Timestamp createdAt() {
return optTimestamp("created_at");
}
@@ -119,6 +107,10 @@ public UnitType unitType() {
return optEnum("unit_type", UnitType.class);
}
+ public Map metadata() {
+ return optMap("metadata");
+ }
+
// Operations
//===========
@@ -188,7 +180,6 @@ public LedgerOperationListLedgerOperationsRequest sortByCreatedAt(SortOrder orde
}
-
@Override
public Params params() {
return params;
diff --git a/src/main/java/com/chargebee/models/Meter.java b/src/main/java/com/chargebee/models/Meter.java
new file mode 100644
index 00000000..91f02f7d
--- /dev/null
+++ b/src/main/java/com/chargebee/models/Meter.java
@@ -0,0 +1,132 @@
+package com.chargebee.models;
+
+import com.chargebee.*;
+import com.chargebee.internal.*;
+import com.chargebee.filters.*;
+import com.chargebee.filters.enums.SortOrder;
+import com.chargebee.internal.HttpUtil.Method;
+import com.chargebee.models.enums.*;
+import org.json.*;
+import java.io.*;
+import java.sql.Timestamp;
+import java.util.*;
+
+public class Meter extends Resource {
+
+ public enum Type {
+ SIMPLE,
+ COMPOUND,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ public enum Status {
+ ACTIVE,
+ ARCHIVED,
+ DELETED,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ //Constructors
+ //============
+
+ public Meter(String jsonStr) {
+ super(jsonStr);
+ }
+
+ public Meter(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ // Fields
+ //=======
+
+ public String id() {
+ return reqString("id");
+ }
+
+ public String name() {
+ return reqString("name");
+ }
+
+ public String description() {
+ return optString("description");
+ }
+
+ public Type type() {
+ return reqEnum("type", Type.class);
+ }
+
+ public Status status() {
+ return optEnum("status", Status.class);
+ }
+
+ public String query() {
+ return reqString("query");
+ }
+
+ public Timestamp createdAt() {
+ return reqTimestamp("created_at");
+ }
+
+ public Timestamp updatedAt() {
+ return optTimestamp("updated_at");
+ }
+
+ public List columnDefinitions() {
+ return optList("column_definitions", ColumnDefinition.class);
+ }
+
+ public List features() {
+ return optList("features", Feature.class);
+ }
+
+ // Operations
+ //===========
+
+ public static MeterListRequest list() {
+ String uri = uri("meters");
+ return new MeterListRequest(uri);
+ }
+
+
+ // Operation Request Classes
+ //==========================
+
+ public static class MeterListRequest extends ListRequest {
+
+ private MeterListRequest(String uri) {
+ super(uri);
+ }
+
+ public StringFilter name() {
+ return new StringFilter("name",this);
+ }
+
+
+ public MeterListRequest sortById(SortOrder order) {
+ params.addOpt("sort_by["+order.name().toLowerCase()+"]","id");
+ return this;
+ }
+ public MeterListRequest sortByName(SortOrder order) {
+ params.addOpt("sort_by["+order.name().toLowerCase()+"]","name");
+ return this;
+ }
+ public MeterListRequest sortByCreatedAt(SortOrder order) {
+ params.addOpt("sort_by["+order.name().toLowerCase()+"]","created_at");
+ return this;
+ }
+ public MeterListRequest sortByUpdatedAt(SortOrder order) {
+ params.addOpt("sort_by["+order.name().toLowerCase()+"]","updated_at");
+ return this;
+ }
+
+
+ @Override
+ public Params params() {
+ return params;
+ }
+ }
+
+}
diff --git a/src/main/java/com/chargebee/models/MeteredFeature.java b/src/main/java/com/chargebee/models/MeteredFeature.java
new file mode 100644
index 00000000..95b227ba
--- /dev/null
+++ b/src/main/java/com/chargebee/models/MeteredFeature.java
@@ -0,0 +1,133 @@
+package com.chargebee.models;
+
+import com.chargebee.*;
+import com.chargebee.internal.*;
+import com.chargebee.filters.*;
+import com.chargebee.filters.enums.SortOrder;
+import com.chargebee.internal.HttpUtil.Method;
+import com.chargebee.models.enums.*;
+import org.json.*;
+import java.io.*;
+import java.sql.Timestamp;
+import java.util.*;
+
+public class MeteredFeature extends Resource {
+
+ //Constructors
+ //============
+
+ public MeteredFeature(String jsonStr) {
+ super(jsonStr);
+ }
+
+ public MeteredFeature(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ // Fields
+ //=======
+
+ public String id() {
+ return reqString("id");
+ }
+
+ public String name() {
+ return optString("name");
+ }
+
+ public String description() {
+ return optString("description");
+ }
+
+ public Type type() {
+ return optEnum("type", Type.class);
+ }
+
+ public Status status() {
+ return optEnum("status", Status.class);
+ }
+
+ public String query() {
+ return optString("query");
+ }
+
+ public List columnDefinitions() {
+ return optList("column_definitions", ColumnDefinition.class);
+ }
+
+ public List features() {
+ return optList("features", Feature.class);
+ }
+
+ // Operations
+ //===========
+
+ public static CreateRequest create() {
+ String uri = uri("metered_features");
+ return new CreateRequest(Method.POST, uri);
+ }
+
+ public static Request archive(String id) {
+ String uri = uri("metered_features", nullCheck(id), "archive_command");
+ return new Request(Method.POST, uri);
+ }
+
+ public static Request reactivate(String id) {
+ String uri = uri("metered_features", nullCheck(id), "reactivate_command");
+ return new Request(Method.POST, uri);
+ }
+
+ public static Request delete(String id) {
+ String uri = uri("metered_features", nullCheck(id), "delete");
+ return new Request(Method.POST, uri);
+ }
+
+
+ // Operation Request Classes
+ //==========================
+
+ public static class CreateRequest extends Request {
+
+ private CreateRequest(Method httpMeth, String uri) {
+ super(httpMeth, uri);
+ }
+
+ public CreateRequest name(String name) {
+ params.add("name", name);
+ return this;
+ }
+
+
+ public CreateRequest description(String description) {
+ params.addOpt("description", description);
+ return this;
+ }
+
+
+ public CreateRequest featureUnit(String featureUnit) {
+ params.add("feature_unit", featureUnit);
+ return this;
+ }
+
+
+ public CreateRequest query(String query) {
+ params.add("query", query);
+ return this;
+ }
+
+
+ public CreateRequest columnDefinitionColumnName(int index, String columnDefinitionColumnName) {
+ params.add("column_definitions[column_name][" + index + "]", columnDefinitionColumnName);
+ return this;
+ }
+ public CreateRequest columnDefinitionDataType(int index, ColumnDefinition.DataType columnDefinitionDataType) {
+ params.add("column_definitions[data_type][" + index + "]", columnDefinitionDataType);
+ return this;
+ }
+ @Override
+ public Params params() {
+ return params;
+ }
+ }
+
+}
diff --git a/src/main/java/com/chargebee/models/PaymentIntent.java b/src/main/java/com/chargebee/models/PaymentIntent.java
index cff92c67..a4a31d21 100644
--- a/src/main/java/com/chargebee/models/PaymentIntent.java
+++ b/src/main/java/com/chargebee/models/PaymentIntent.java
@@ -69,6 +69,9 @@ public enum PaymentMethodType {
PAYPAY,
GCASH,
SOUTH_KOREAN_CARDS,
+ PAYNOW,
+ BIZUM,
+ PROMPTPAY,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
@@ -126,6 +129,35 @@ public GatewayErrorDetail errorDetail() {
}
+ public static class PaymentIntentMetadata extends Resource {
+ public enum Source {
+ CB_JS,COMPONENTS_FIELDS,CHECKOUT_V3,PAYNOW_V3,PORTAL_V3,GIFT_V3,CHECKOUT_V4,PAYMENT_COMPONENT,PC_INAPP_V4,PC_FPC_V4,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
+ public PaymentIntentMetadata(JSONObject jsonObj) {
+ super(jsonObj);
+ }
+
+ public Source source() {
+ return reqEnum("source", Source.class);
+ }
+
+ public String clientIpAddress() {
+ return optString("client_ip_address");
+ }
+
+ public String userAgent() {
+ return optString("user_agent");
+ }
+
+ public Timestamp createdAt() {
+ return optTimestamp("created_at");
+ }
+
+ }
+
//Constructors
//============
@@ -212,6 +244,10 @@ public List paymentAttempts() {
return optList("payment_attempts", PaymentIntent.PaymentAttempt.class);
}
+ public PaymentIntent.PaymentIntentMetadata paymentIntentMetadata() {
+ return optSubResource("payment_intent_metadata", PaymentIntent.PaymentIntentMetadata.class);
+ }
+
public String businessEntityId() {
return optString("business_entity_id");
}
diff --git a/src/main/java/com/chargebee/models/PromotionalGrant.java b/src/main/java/com/chargebee/models/PromotionalGrant.java
index 70b3a4bb..3e75eaf2 100644
--- a/src/main/java/com/chargebee/models/PromotionalGrant.java
+++ b/src/main/java/com/chargebee/models/PromotionalGrant.java
@@ -43,8 +43,8 @@ public Timestamp expiresAt() {
return reqTimestamp("expires_at");
}
- public String metadata() {
- return optString("metadata");
+ public Map metadata() {
+ return optMap("metadata");
}
// Operations
diff --git a/src/main/java/com/chargebee/models/Quote.java b/src/main/java/com/chargebee/models/Quote.java
index 8f502dae..4fc6a426 100644
--- a/src/main/java/com/chargebee/models/Quote.java
+++ b/src/main/java/com/chargebee/models/Quote.java
@@ -45,6 +45,12 @@ public enum EntityType {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public enum ProrationMode {
+ RESET,DELTA,SERVICE_PERIOD_REVISION,ADJUSTED_TERM,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
public LineItem(JSONObject jsonObj) {
super(jsonObj);
}
@@ -149,6 +155,10 @@ public String customerId() {
return optString("customer_id");
}
+ public ProrationMode prorationMode() {
+ return optEnum("proration_mode", ProrationMode.class);
+ }
+
}
public static class LineItemTier extends Resource {
diff --git a/src/main/java/com/chargebee/models/QuoteLineGroup.java b/src/main/java/com/chargebee/models/QuoteLineGroup.java
index 1e3a6452..7788d281 100644
--- a/src/main/java/com/chargebee/models/QuoteLineGroup.java
+++ b/src/main/java/com/chargebee/models/QuoteLineGroup.java
@@ -32,6 +32,12 @@ public enum EntityType {
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
+ public enum ProrationMode {
+ RESET,DELTA,SERVICE_PERIOD_REVISION,ADJUSTED_TERM,
+ _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
+ java-client version incompatibility. We suggest you to upgrade to the latest version */
+ }
+
public LineItem(JSONObject jsonObj) {
super(jsonObj);
}
@@ -136,6 +142,10 @@ public String customerId() {
return optString("customer_id");
}
+ public ProrationMode prorationMode() {
+ return optEnum("proration_mode", ProrationMode.class);
+ }
+
}
public static class LineItemDiscount extends Resource {
diff --git a/src/main/java/com/chargebee/models/QuotedCharge.java b/src/main/java/com/chargebee/models/QuotedCharge.java
index 17ea7f8e..1f0e1041 100644
--- a/src/main/java/com/chargebee/models/QuotedCharge.java
+++ b/src/main/java/com/chargebee/models/QuotedCharge.java
@@ -30,6 +30,10 @@ public String description() {
return optString("description");
}
+ public String entityDescription() {
+ return optString("entity_description");
+ }
+
public Integer servicePeriodInDays() {
return optInteger("service_period_in_days");
}
@@ -108,6 +112,14 @@ public String unitPriceInDecimal() {
return optString("unit_price_in_decimal");
}
+ public String description() {
+ return optString("description");
+ }
+
+ public String entityDescription() {
+ return optString("entity_description");
+ }
+
public Integer servicePeriodDays() {
return optInteger("service_period_days");
}
diff --git a/src/main/java/com/chargebee/models/Ramp.java b/src/main/java/com/chargebee/models/Ramp.java
index 172cd8c2..1f2d0c94 100644
--- a/src/main/java/com/chargebee/models/Ramp.java
+++ b/src/main/java/com/chargebee/models/Ramp.java
@@ -205,7 +205,7 @@ public Timestamp applyTill() {
public static class DiscountsToAdd extends Resource {
public enum Type {
- FIXED_AMOUNT,PERCENTAGE,
+ FIXED_AMOUNT,PERCENTAGE,OFFER_QUANTITY,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
@@ -246,6 +246,10 @@ public Long amount() {
return optLong("amount");
}
+ public Integer quantity() {
+ return optInteger("quantity");
+ }
+
public DurationType durationType() {
return reqEnum("duration_type", DurationType.class);
}
@@ -743,6 +747,11 @@ public CreateForSubscriptionRequest discountsToAddAmount(int index, Long discoun
paramsV2.addOpt(new CompositeArrayParameter("discounts_to_add", "amount", index), discountsToAddAmount);
return this;
}
+ public CreateForSubscriptionRequest discountsToAddQuantity(int index, Integer discountsToAddQuantity) {
+ params.addOpt("discounts_to_add[quantity][" + index + "]", discountsToAddQuantity);
+ paramsV2.addOpt(new CompositeArrayParameter("discounts_to_add", "quantity", index), discountsToAddQuantity);
+ return this;
+ }
public CreateForSubscriptionRequest discountsToAddPeriod(int index, Integer discountsToAddPeriod) {
params.addOpt("discounts_to_add[period][" + index + "]", discountsToAddPeriod);
paramsV2.addOpt(new CompositeArrayParameter("discounts_to_add", "period", index), discountsToAddPeriod);
@@ -1025,6 +1034,11 @@ public UpdateRequest discountsToAddAmount(int index, Long discountsToAddAmount)
paramsV2.addOpt(new CompositeArrayParameter("discounts_to_add", "amount", index), discountsToAddAmount);
return this;
}
+ public UpdateRequest discountsToAddQuantity(int index, Integer discountsToAddQuantity) {
+ params.addOpt("discounts_to_add[quantity][" + index + "]", discountsToAddQuantity);
+ paramsV2.addOpt(new CompositeArrayParameter("discounts_to_add", "quantity", index), discountsToAddQuantity);
+ return this;
+ }
public UpdateRequest discountsToAddPeriod(int index, Integer discountsToAddPeriod) {
params.addOpt("discounts_to_add[period][" + index + "]", discountsToAddPeriod);
paramsV2.addOpt(new CompositeArrayParameter("discounts_to_add", "period", index), discountsToAddPeriod);
diff --git a/src/main/java/com/chargebee/models/RecordedPurchase.java b/src/main/java/com/chargebee/models/RecordedPurchase.java
index 85d8bc54..6178eaa2 100644
--- a/src/main/java/com/chargebee/models/RecordedPurchase.java
+++ b/src/main/java/com/chargebee/models/RecordedPurchase.java
@@ -154,6 +154,21 @@ public CreateRequest customerId(String customerId) {
return this;
}
+ public CreateRequest customerEmail(String customerEmail) {
+ params.addOpt("customer[email]", customerEmail);
+ return this;
+ }
+
+ public CreateRequest customerFirstName(String customerFirstName) {
+ params.addOpt("customer[first_name]", customerFirstName);
+ return this;
+ }
+
+ public CreateRequest customerLastName(String customerLastName) {
+ params.addOpt("customer[last_name]", customerLastName);
+ return this;
+ }
+
public CreateRequest appleAppStoreTransactionId(String appleAppStoreTransactionId) {
params.addOpt("apple_app_store[transaction_id]", appleAppStoreTransactionId);
return this;
diff --git a/src/main/java/com/chargebee/models/Subscription.java b/src/main/java/com/chargebee/models/Subscription.java
index f287d55b..135595f1 100644
--- a/src/main/java/com/chargebee/models/Subscription.java
+++ b/src/main/java/com/chargebee/models/Subscription.java
@@ -3049,6 +3049,11 @@ public EnumFilter c
}
+ public BooleanFilter decommissioned() {
+ return new BooleanFilter("decommissioned",this);
+ }
+
+
@Override
public Params params() {
return params;
diff --git a/src/main/java/com/chargebee/models/UsageEvent.java b/src/main/java/com/chargebee/models/UsageEvent.java
index 27e91e2a..29db33fe 100644
--- a/src/main/java/com/chargebee/models/UsageEvent.java
+++ b/src/main/java/com/chargebee/models/UsageEvent.java
@@ -121,7 +121,7 @@ public Params params() {
public static class EventBatchIngestInputParams {
private final String DeduplicationId;
private final String SubscriptionId;
- private final Timestamp UsageTimestamp;
+ private final Long UsageTimestamp;
private final Map Properties;
private EventBatchIngestInputParams(EventBatchIngestInputParamsBuilder builder){
this.DeduplicationId = builder.DeduplicationId;
@@ -134,7 +134,7 @@ public JSONObject toJObject(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("deduplication_id", this.DeduplicationId);
jsonObject.put("subscription_id", this.SubscriptionId);
- jsonObject.put("usage_timestamp", this.UsageTimestamp.getTime());
+ jsonObject.put("usage_timestamp", this.UsageTimestamp);
jsonObject.put("properties", this.Properties);
return jsonObject;
@@ -143,7 +143,7 @@ public JSONObject toJObject(){
public static class EventBatchIngestInputParamsBuilder {
private String DeduplicationId;
private String SubscriptionId;
- private Timestamp UsageTimestamp;
+ private Long UsageTimestamp;
private Map Properties;
public EventBatchIngestInputParamsBuilder setDeduplicationId( String DeduplicationId ) {
@@ -154,7 +154,7 @@ public EventBatchIngestInputParamsBuilder setSubscriptionId( String Subscription
this.SubscriptionId = SubscriptionId;
return this;
}
- public EventBatchIngestInputParamsBuilder setUsageTimestamp( Timestamp UsageTimestamp ) {
+ public EventBatchIngestInputParamsBuilder setUsageTimestamp( Long UsageTimestamp ) {
this.UsageTimestamp = UsageTimestamp;
return this;
}
diff --git a/src/main/java/com/chargebee/models/enums/DunningType.java b/src/main/java/com/chargebee/models/enums/DunningType.java
index 4aeab1e8..7fcb7875 100644
--- a/src/main/java/com/chargebee/models/enums/DunningType.java
+++ b/src/main/java/com/chargebee/models/enums/DunningType.java
@@ -4,6 +4,7 @@ public enum DunningType {
AUTO_COLLECT,
OFFLINE,
DIRECT_DEBIT,
+ REAL_TIME_PAYMENTS,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
\ No newline at end of file
diff --git a/src/main/java/com/chargebee/models/enums/EnabledEvents.java b/src/main/java/com/chargebee/models/enums/EnabledEvents.java
index dfc9e14d..3a275a26 100644
--- a/src/main/java/com/chargebee/models/enums/EnabledEvents.java
+++ b/src/main/java/com/chargebee/models/enums/EnabledEvents.java
@@ -162,6 +162,7 @@ public enum EnabledEvents {
BUSINESS_ENTITY_DELETED,
CUSTOMER_BUSINESS_ENTITY_CHANGED,
SUBSCRIPTION_BUSINESS_ENTITY_CHANGED,
+ PAYMENT_SOURCE_BUSINESS_ENTITY_CHANGED,
PURCHASE_CREATED,
VOUCHER_CREATED,
VOUCHER_EXPIRED,
diff --git a/src/main/java/com/chargebee/models/enums/EventType.java b/src/main/java/com/chargebee/models/enums/EventType.java
index 486b96c9..fdc21312 100644
--- a/src/main/java/com/chargebee/models/enums/EventType.java
+++ b/src/main/java/com/chargebee/models/enums/EventType.java
@@ -179,6 +179,7 @@ public enum EventType {
BUSINESS_ENTITY_DELETED,
CUSTOMER_BUSINESS_ENTITY_CHANGED,
SUBSCRIPTION_BUSINESS_ENTITY_CHANGED,
+ PAYMENT_SOURCE_BUSINESS_ENTITY_CHANGED,
PURCHASE_CREATED,
VOUCHER_CREATED,
VOUCHER_EXPIRED,
diff --git a/src/main/java/com/chargebee/models/enums/PaymentMethod.java b/src/main/java/com/chargebee/models/enums/PaymentMethod.java
index 6a84a86a..cea78ce1 100644
--- a/src/main/java/com/chargebee/models/enums/PaymentMethod.java
+++ b/src/main/java/com/chargebee/models/enums/PaymentMethod.java
@@ -56,6 +56,9 @@ public enum PaymentMethod {
PAYPAY,
GCASH,
SOUTH_KOREAN_CARDS,
+ PAYNOW,
+ BIZUM,
+ PROMPTPAY,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
\ No newline at end of file
diff --git a/src/main/java/com/chargebee/models/enums/PaymentMethodType.java b/src/main/java/com/chargebee/models/enums/PaymentMethodType.java
index abf148be..81e79a97 100644
--- a/src/main/java/com/chargebee/models/enums/PaymentMethodType.java
+++ b/src/main/java/com/chargebee/models/enums/PaymentMethodType.java
@@ -48,6 +48,9 @@ public enum PaymentMethodType {
PAYPAY,
GCASH,
SOUTH_KOREAN_CARDS,
+ PAYNOW,
+ BIZUM,
+ PROMPTPAY,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
\ No newline at end of file
diff --git a/src/main/java/com/chargebee/models/enums/Status.java b/src/main/java/com/chargebee/models/enums/Status.java
index 26bcd8e4..867ff28d 100644
--- a/src/main/java/com/chargebee/models/enums/Status.java
+++ b/src/main/java/com/chargebee/models/enums/Status.java
@@ -1,6 +1,9 @@
package com.chargebee.models.enums;
public enum Status {
+ ACTIVE,
+ ARCHIVED,
+ DELETED,
AVAILABLE,
EXHAUSTED,
SCHEDULED,
diff --git a/src/main/java/com/chargebee/models/enums/TaxOverrideReason.java b/src/main/java/com/chargebee/models/enums/TaxOverrideReason.java
index 78a86f3d..5fa8cb30 100644
--- a/src/main/java/com/chargebee/models/enums/TaxOverrideReason.java
+++ b/src/main/java/com/chargebee/models/enums/TaxOverrideReason.java
@@ -1,9 +1,15 @@
package com.chargebee.models.enums;
public enum TaxOverrideReason {
+ ZERO_RATED,
ID_EXEMPT,
CUSTOMER_EXEMPT,
+ REGION_NON_TAXABLE,
+ PRODUCT_EXEMPT,
EXPORT,
+ HIGH_VALUE_PHYSICAL_GOODS,
+ ZERO_VALUE_ITEM,
+ TAX_NOT_CONFIGURED_EXTERNAL_PROVIDER,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
\ No newline at end of file
diff --git a/src/main/java/com/chargebee/models/enums/Type.java b/src/main/java/com/chargebee/models/enums/Type.java
index e7a378dc..033e4ecd 100644
--- a/src/main/java/com/chargebee/models/enums/Type.java
+++ b/src/main/java/com/chargebee/models/enums/Type.java
@@ -48,10 +48,16 @@ public enum Type {
PAYPAY,
GCASH,
SOUTH_KOREAN_CARDS,
+ PAYNOW,
+ BIZUM,
+ PROMPTPAY,
FREE_TRIAL,
PAY_UP_FRONT,
PAY_AS_YOU_GO,
+ SIMPLE,
+ COMPOUND,
USAGE_EXCEEDED,
+ SPEND_EXCEEDED,
_UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
java-client version incompatibility. We suggest you to upgrade to the latest version */
}
\ No newline at end of file