From a5e823daf4b14351e67c2f169a199416594e1935 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 29 May 2026 17:58:26 +0000
Subject: [PATCH 01/14] Update generated code for v2279 and
d4c5613f2c824ce394453c7d2eda2f5621c6f6d2
---
CODEGEN_VERSION | 2 +-
OPENAPI_VERSION | 2 +-
.../stripe/model/EventDataClassLookup.java | 3 +
src/main/java/com/stripe/model/Invoice.java | 31 -
.../com/stripe/model/PaymentLocation.java | 4 +-
.../model/PaymentLocationCapability.java | 33 +-
.../com/stripe/model/QuotePreviewInvoice.java | 31 -
.../java/com/stripe/model/Subscription.java | 31 -
.../stripe/model/delegatedcheckout/Order.java | 202 +
.../delegatedcheckout/OrderCollection.java | 6 +
.../model/delegatedcheckout/OrderEvent.java | 186 +
.../delegatedcheckout/RequestedSession.java | 47 +
.../stripe/model/v2/EventDataClassLookup.java | 4 +
.../com/stripe/model/v2/billing/Contract.java | 1109 +++
.../ContractLicensePricingQuantityChange.java | 65 +
.../com/stripe/param/InvoiceCreateParams.java | 151 +-
.../com/stripe/param/InvoiceUpdateParams.java | 160 +-
.../param/PaymentIntentConfirmParams.java | 101 +-
.../param/PaymentIntentCreateParams.java | 197 +-
.../param/PaymentIntentUpdateParams.java | 102 +-
.../PaymentLocationCapabilityListParams.java | 9 +-
...ymentLocationCapabilityRetrieveParams.java | 6 +-
...PaymentLocationCapabilityUpdateParams.java | 6 +-
.../param/PaymentLocationListParams.java | 75 +-
.../param/PaymentLocationUpdateParams.java | 12 +-
.../param/SubscriptionCreateParams.java | 152 +-
.../param/SubscriptionUpdateParams.java | 161 +-
.../RequestedSessionListOrdersParams.java | 171 +
.../RequestedSessionOrderListParams.java | 171 +
...ngAuthorizationEvaluationCreateParams.java | 4 +-
.../v2/billing/ContractActivateParams.java | 125 +
.../v2/billing/ContractCancelParams.java | 125 +
.../v2/billing/ContractCreateParams.java | 6224 +++++++++++++++++
.../param/v2/billing/ContractListParams.java | 91 +
.../v2/billing/ContractRetrieveParams.java | 125 +
.../v2/billing/ContractUpdateParams.java | 3657 ++++++++++
...antityChangeListQuantityChangesParams.java | 78 +
.../param/v2/core/AccountCreateParams.java | 38 +-
.../param/v2/core/AccountUpdateParams.java | 38 +-
.../OutboundPaymentCreateParams.java | 6 +-
.../OutboundTransferCreateParams.java | 6 +-
.../PaymentLocationCapabilityService.java | 12 +-
.../RequestedSessionOrderService.java | 53 +
.../RequestedSessionService.java | 5 +
.../com/stripe/service/v2/BillingService.java | 4 +
.../service/v2/billing/ContractService.java | 174 +
.../contracts/LicensePricingService.java | 17 +
.../licensepricing/QuantityChangeService.java | 65 +
.../stripe/functional/GeneratedExamples.java | 534 ++
49 files changed, 13753 insertions(+), 858 deletions(-)
create mode 100644 src/main/java/com/stripe/model/delegatedcheckout/Order.java
create mode 100644 src/main/java/com/stripe/model/delegatedcheckout/OrderCollection.java
create mode 100644 src/main/java/com/stripe/model/delegatedcheckout/OrderEvent.java
create mode 100644 src/main/java/com/stripe/model/v2/billing/Contract.java
create mode 100644 src/main/java/com/stripe/model/v2/billing/ContractLicensePricingQuantityChange.java
create mode 100644 src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionListOrdersParams.java
create mode 100644 src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionOrderListParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/ContractActivateParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/ContractCancelParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/ContractCreateParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/ContractListParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/ContractRetrieveParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/ContractUpdateParams.java
create mode 100644 src/main/java/com/stripe/param/v2/billing/contracts/licensepricing/QuantityChangeListQuantityChangesParams.java
create mode 100644 src/main/java/com/stripe/service/delegatedcheckout/RequestedSessionOrderService.java
create mode 100644 src/main/java/com/stripe/service/v2/billing/ContractService.java
create mode 100644 src/main/java/com/stripe/service/v2/billing/contracts/LicensePricingService.java
create mode 100644 src/main/java/com/stripe/service/v2/billing/contracts/licensepricing/QuantityChangeService.java
diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION
index 3e97ca07d9e..61f471e756f 100644
--- a/CODEGEN_VERSION
+++ b/CODEGEN_VERSION
@@ -1 +1 @@
-e410e9ac8e4f0d0d73c68b612253be5eadfcc065
\ No newline at end of file
+d4c5613f2c824ce394453c7d2eda2f5621c6f6d2
\ No newline at end of file
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 30723023b84..938fb429e2f 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v2277
\ No newline at end of file
+v2279
\ No newline at end of file
diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java
index 66c1b410f74..a2183f3af95 100644
--- a/src/main/java/com/stripe/model/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/EventDataClassLookup.java
@@ -158,6 +158,9 @@ public final class EventDataClassLookup {
classLookup.put("climate.product", com.stripe.model.climate.Product.class);
classLookup.put("climate.supplier", com.stripe.model.climate.Supplier.class);
+ classLookup.put("delegated_checkout.order", com.stripe.model.delegatedcheckout.Order.class);
+ classLookup.put(
+ "delegated_checkout.order_event", com.stripe.model.delegatedcheckout.OrderEvent.class);
classLookup.put(
"delegated_checkout.requested_session",
com.stripe.model.delegatedcheckout.RequestedSession.class);
diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java
index 3cf7f260ebc..067e101bfac 100644
--- a/src/main/java/com/stripe/model/Invoice.java
+++ b/src/main/java/com/stripe/model/Invoice.java
@@ -2678,13 +2678,6 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- @SerializedName("wechat_pay")
- WechatPay wechatPay;
-
/**
* For more details about AcssDebit, please refer to the API Reference.
@@ -3070,30 +3063,6 @@ public static class Filters extends StripeObject {
}
}
}
-
- /**
- * For more details about WechatPay, please refer to the API Reference.
- */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay extends StripeObject {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- String appId;
-
- /**
- * The client type that the end customer will pay from.
- *
- *
One of {@code android}, {@code ios}, {@code mobile_web}, or {@code web}.
- */
- @SerializedName("client")
- String client;
- }
}
}
diff --git a/src/main/java/com/stripe/model/PaymentLocation.java b/src/main/java/com/stripe/model/PaymentLocation.java
index d4c5ab22874..5fa3d55dc5a 100644
--- a/src/main/java/com/stripe/model/PaymentLocation.java
+++ b/src/main/java/com/stripe/model/PaymentLocation.java
@@ -32,8 +32,8 @@ public class PaymentLocation extends ApiResource implements HasId {
BusinessRegistration businessRegistration;
/**
- * The capability settings for the location. Only applicable for locations with requested Payment
- * Location Capabilities.
+ * The capability settings for the location. Only applicable for locations with requested payment
+ * location capabilities.
*/
@SerializedName("capability_settings")
CapabilitySettings capabilitySettings;
diff --git a/src/main/java/com/stripe/model/PaymentLocationCapability.java b/src/main/java/com/stripe/model/PaymentLocationCapability.java
index 24200e8cbd3..05b77717212 100644
--- a/src/main/java/com/stripe/model/PaymentLocationCapability.java
+++ b/src/main/java/com/stripe/model/PaymentLocationCapability.java
@@ -19,13 +19,14 @@
import lombok.Setter;
/**
- * A Payment Location Capability represents a capability for a Stripe account at a Payment Location.
+ * A {@code payment_location} capability represents a capability for a Stripe account at a payment
+ * location.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public class PaymentLocationCapability extends ApiResource implements HasId {
- /** The account for which the capability enables functionality. */
+ /** The account that the capability enables functionality for. */
@SerializedName("account")
String account;
@@ -44,7 +45,7 @@ public class PaymentLocationCapability extends ApiResource implements HasId {
@SerializedName("livemode")
Boolean livemode;
- /** The payment location for which the capability enables functionality. */
+ /** The payment location that the capability enables functionality for. */
@SerializedName("location")
String location;
@@ -60,7 +61,7 @@ public class PaymentLocationCapability extends ApiResource implements HasId {
@SerializedName("requested")
Boolean requested;
- /** Time at which the capability was requested. Measured in seconds since the Unix epoch. */
+ /** Time when the capability was requested. Measured in seconds since the Unix epoch. */
@SerializedName("requested_at")
Long requestedAt;
@@ -75,13 +76,13 @@ public class PaymentLocationCapability extends ApiResource implements HasId {
@SerializedName("status")
String status;
- /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ /** List all payment location capabilities associated with the payment location. */
public static PaymentLocationCapabilityCollection list(Map params)
throws StripeException {
return list(params, (RequestOptions) null);
}
- /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ /** List all payment location capabilities associated with the payment location. */
public static PaymentLocationCapabilityCollection list(
Map params, RequestOptions options) throws StripeException {
String path = "/v1/payment_location_capabilities";
@@ -90,13 +91,13 @@ public static PaymentLocationCapabilityCollection list(
return getGlobalResponseGetter().request(request, PaymentLocationCapabilityCollection.class);
}
- /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ /** List all payment location capabilities associated with the payment location. */
public static PaymentLocationCapabilityCollection list(PaymentLocationCapabilityListParams params)
throws StripeException {
return list(params, (RequestOptions) null);
}
- /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ /** List all payment location capabilities associated with the payment location. */
public static PaymentLocationCapabilityCollection list(
PaymentLocationCapabilityListParams params, RequestOptions options) throws StripeException {
String path = "/v1/payment_location_capabilities";
@@ -111,18 +112,18 @@ public static PaymentLocationCapabilityCollection list(
return getGlobalResponseGetter().request(request, PaymentLocationCapabilityCollection.class);
}
- /** Retrieves information about the specified Payment Location Capability. */
+ /** Retrieves a {@code payment_location} capability. */
public static PaymentLocationCapability retrieve(String capability) throws StripeException {
return retrieve(capability, (Map) null, (RequestOptions) null);
}
- /** Retrieves information about the specified Payment Location Capability. */
+ /** Retrieves a {@code payment_location} capability. */
public static PaymentLocationCapability retrieve(String capability, RequestOptions options)
throws StripeException {
return retrieve(capability, (Map) null, options);
}
- /** Retrieves information about the specified Payment Location Capability. */
+ /** Retrieves a {@code payment_location} capability. */
public static PaymentLocationCapability retrieve(
String capability, Map params, RequestOptions options)
throws StripeException {
@@ -133,7 +134,7 @@ public static PaymentLocationCapability retrieve(
return getGlobalResponseGetter().request(request, PaymentLocationCapability.class);
}
- /** Retrieves information about the specified Payment Location Capability. */
+ /** Retrieves a {@code payment_location} capability. */
public static PaymentLocationCapability retrieve(
String capability, PaymentLocationCapabilityRetrieveParams params, RequestOptions options)
throws StripeException {
@@ -151,7 +152,7 @@ public static PaymentLocationCapability retrieve(
}
/**
- * Updates a specified Payment Location Capability. Request or remove a payment location
+ * Updates a {@code payment_location} capability. Request or remove a {@code payment_location}
* capability by updating its {@code requested} parameter.
*/
public PaymentLocationCapability update(Map params) throws StripeException {
@@ -159,7 +160,7 @@ public PaymentLocationCapability update(Map params) throws Strip
}
/**
- * Updates a specified Payment Location Capability. Request or remove a payment location
+ * Updates a {@code payment_location} capability. Request or remove a {@code payment_location}
* capability by updating its {@code requested} parameter.
*/
public PaymentLocationCapability update(Map params, RequestOptions options)
@@ -173,7 +174,7 @@ public PaymentLocationCapability update(Map params, RequestOptio
}
/**
- * Updates a specified Payment Location Capability. Request or remove a payment location
+ * Updates a {@code payment_location} capability. Request or remove a {@code payment_location}
* capability by updating its {@code requested} parameter.
*/
public PaymentLocationCapability update(PaymentLocationCapabilityUpdateParams params)
@@ -182,7 +183,7 @@ public PaymentLocationCapability update(PaymentLocationCapabilityUpdateParams pa
}
/**
- * Updates a specified Payment Location Capability. Request or remove a payment location
+ * Updates a {@code payment_location} capability. Request or remove a {@code payment_location}
* capability by updating its {@code requested} parameter.
*/
public PaymentLocationCapability update(
diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java
index abff7c1114d..dbd274cb554 100644
--- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java
+++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java
@@ -1499,13 +1499,6 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- @SerializedName("wechat_pay")
- WechatPay wechatPay;
-
/**
* For more details about AcssDebit, please refer to the API Reference.
@@ -1891,30 +1884,6 @@ public static class Filters extends StripeObject {
}
}
}
-
- /**
- * For more details about WechatPay, please refer to the API Reference.
- */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay extends StripeObject {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- String appId;
-
- /**
- * The client type that the end customer will pay from.
- *
- * One of {@code android}, {@code ios}, {@code mobile_web}, or {@code web}.
- */
- @SerializedName("client")
- String client;
- }
}
}
diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java
index 516bfcdb64f..3e0f60b52cf 100644
--- a/src/main/java/com/stripe/model/Subscription.java
+++ b/src/main/java/com/stripe/model/Subscription.java
@@ -2116,13 +2116,6 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to
- * invoices created by the subscription.
- */
- @SerializedName("wechat_pay")
- WechatPay wechatPay;
-
/**
* For more details about AcssDebit, please refer to the API Reference.
@@ -2605,30 +2598,6 @@ public static class Filters extends StripeObject {
}
}
}
-
- /**
- * For more details about WechatPay, please refer to the API Reference.
- */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay extends StripeObject {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- String appId;
-
- /**
- * The client type that the end customer will pay from.
- *
- *
One of {@code android}, {@code ios}, {@code mobile_web}, or {@code web}.
- */
- @SerializedName("client")
- String client;
- }
}
}
diff --git a/src/main/java/com/stripe/model/delegatedcheckout/Order.java b/src/main/java/com/stripe/model/delegatedcheckout/Order.java
new file mode 100644
index 00000000000..8dd1fd34a42
--- /dev/null
+++ b/src/main/java/com/stripe/model/delegatedcheckout/Order.java
@@ -0,0 +1,202 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.delegatedcheckout;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.util.List;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** An order represents the post-checkout lifecycle of a delegated checkout purchase. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class Order extends StripeObject implements HasId {
+ /** Time at which the object was created. Measured in seconds since the Unix epoch. */
+ @SerializedName("created")
+ Long created;
+
+ /**
+ * Three-letter ISO currency code,
+ * in lowercase. Must be a supported currency.
+ */
+ @SerializedName("currency")
+ String currency;
+
+ /** Unique identifier for the object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** The latest order event for this order. */
+ @SerializedName("latest_order_event")
+ OrderEvent latestOrderEvent;
+
+ /** The line items in this order. */
+ @SerializedName("line_items")
+ List lineItems;
+
+ /**
+ * If the object exists in live mode, the value is {@code true}. If the object exists in test
+ * mode, the value is {@code false}.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value.
+ *
+ * Equal to {@code delegated_checkout.order}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** The permalink URL for this order. */
+ @SerializedName("permalink_url")
+ String permalinkUrl;
+
+ /** The requested session associated with this order. */
+ @SerializedName("requested_session")
+ String requestedSession;
+
+ /** The seller reference for this order. */
+ @SerializedName("seller_reference")
+ String sellerReference;
+
+ /** The totals for this order. */
+ @SerializedName("totals")
+ Totals totals;
+
+ /**
+ * For more details about LineItem, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LineItem extends StripeObject {
+ /** The order line item key. */
+ @SerializedName("key")
+ String key;
+
+ @SerializedName("product_details")
+ ProductDetails productDetails;
+
+ @SerializedName("quantity")
+ Quantity quantity;
+
+ /** The SKU ID of the line item. */
+ @SerializedName("sku_id")
+ String skuId;
+
+ /** The totals for this line item. */
+ @SerializedName("totals")
+ Totals totals;
+
+ /** The line item unit amount. */
+ @SerializedName("unit_amount")
+ Long unitAmount;
+
+ /**
+ * For more details about ProductDetails, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ProductDetails extends StripeObject {
+ /** The item description. */
+ @SerializedName("description")
+ String description;
+
+ /** The item images. */
+ @SerializedName("images")
+ List images;
+
+ /** The item title. */
+ @SerializedName("title")
+ String title;
+ }
+
+ /**
+ * For more details about Quantity, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Quantity extends StripeObject {
+ /** The current quantity. */
+ @SerializedName("current")
+ Long current;
+
+ /** The ordered quantity. */
+ @SerializedName("ordered")
+ Long ordered;
+
+ /** The shipped quantity. */
+ @SerializedName("shipped")
+ Long shipped;
+ }
+
+ /**
+ * For more details about Totals, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Totals extends StripeObject {
+ /** The base amount for the line item. */
+ @SerializedName("base_amount")
+ Long baseAmount;
+
+ /** The discount amount for the line item. */
+ @SerializedName("discount")
+ Long discount;
+
+ /** The subtotal amount for the line item. */
+ @SerializedName("subtotal")
+ Long subtotal;
+
+ /** The tax amount for the line item. */
+ @SerializedName("tax")
+ Long tax;
+
+ /** The total amount for the line item. */
+ @SerializedName("total")
+ Long total;
+ }
+ }
+
+ /**
+ * For more details about Totals, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Totals extends StripeObject {
+ /** The discount amount for the order. */
+ @SerializedName("discount")
+ Long discount;
+
+ /** The fulfillment amount for the order. */
+ @SerializedName("fulfillment")
+ Long fulfillment;
+
+ /** The subtotal amount for the order. */
+ @SerializedName("subtotal")
+ Long subtotal;
+
+ /** The tax amount for the order. */
+ @SerializedName("tax")
+ Long tax;
+
+ /** The total amount for the order. */
+ @SerializedName("total")
+ Long total;
+ }
+}
diff --git a/src/main/java/com/stripe/model/delegatedcheckout/OrderCollection.java b/src/main/java/com/stripe/model/delegatedcheckout/OrderCollection.java
new file mode 100644
index 00000000000..5c398e4cac1
--- /dev/null
+++ b/src/main/java/com/stripe/model/delegatedcheckout/OrderCollection.java
@@ -0,0 +1,6 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.delegatedcheckout;
+
+import com.stripe.model.StripeCollection;
+
+public class OrderCollection extends StripeCollection {}
diff --git a/src/main/java/com/stripe/model/delegatedcheckout/OrderEvent.java b/src/main/java/com/stripe/model/delegatedcheckout/OrderEvent.java
new file mode 100644
index 00000000000..0863c09dfe3
--- /dev/null
+++ b/src/main/java/com/stripe/model/delegatedcheckout/OrderEvent.java
@@ -0,0 +1,186 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.delegatedcheckout;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.util.List;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** An order event represents a change to a delegated checkout order. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class OrderEvent extends StripeObject implements HasId {
+ /** The adjustment details for this order event. */
+ @SerializedName("adjustment")
+ Adjustment adjustment;
+
+ /** Time at which the object was created. Measured in seconds since the Unix epoch. */
+ @SerializedName("created")
+ Long created;
+
+ /** The fulfillment details for this order event. */
+ @SerializedName("fulfillment")
+ Fulfillment fulfillment;
+
+ /** Unique identifier for the object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * If the object exists in live mode, the value is {@code true}. If the object exists in test
+ * mode, the value is {@code false}.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value.
+ *
+ * Equal to {@code delegated_checkout.order_event}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** Time at which this event occurred. Measured in seconds since the Unix epoch. */
+ @SerializedName("occurred_at")
+ Long occurredAt;
+
+ /** The delegated checkout order associated with this order event. */
+ @SerializedName("order")
+ String order;
+
+ /** The requested session associated with this order event. */
+ @SerializedName("requested_session")
+ String requestedSession;
+
+ /**
+ * The type of order event.
+ *
+ *
One of {@code adjustment}, or {@code fulfillment}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about Adjustment, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Adjustment extends StripeObject {
+ /** The amount associated with the adjustment. */
+ @SerializedName("amount")
+ Long amount;
+
+ /** The currency associated with the adjustment amount. */
+ @SerializedName("currency")
+ String currency;
+
+ /** The description of the adjustment. */
+ @SerializedName("description")
+ String description;
+
+ /** The line items associated with the adjustment. */
+ @SerializedName("line_items")
+ List lineItems;
+
+ /**
+ * The status of the adjustment.
+ *
+ * One of {@code completed}, {@code failed}, or {@code pending}.
+ */
+ @SerializedName("status")
+ String status;
+
+ /**
+ * The type of adjustment.
+ *
+ *
One of {@code cancellation}, {@code credit}, {@code dispute}, {@code
+ * original_payment_refund}, {@code return}, or {@code store_credit_refund}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about LineItem, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LineItem extends StripeObject {
+ /** The line item key. */
+ @SerializedName("key")
+ String key;
+
+ /** The quantity associated with the order event. */
+ @SerializedName("quantity")
+ Long quantity;
+ }
+ }
+
+ /**
+ * For more details about Fulfillment, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Fulfillment extends StripeObject {
+ /** The carrier for the fulfillment. */
+ @SerializedName("carrier")
+ String carrier;
+
+ /** Time at which the fulfillment was delivered. Measured in seconds since the Unix epoch. */
+ @SerializedName("delivered_at")
+ Long deliveredAt;
+
+ /** The line items associated with the fulfillment. */
+ @SerializedName("line_items")
+ List lineItems;
+
+ /** Time at which the fulfillment shipped. Measured in seconds since the Unix epoch. */
+ @SerializedName("shipped_at")
+ Long shippedAt;
+
+ /**
+ * The status of the fulfillment.
+ *
+ * One of {@code confirmed}, {@code delivered}, {@code fulfilled}, {@code pending}, {@code
+ * returned}, or {@code shipped}.
+ */
+ @SerializedName("status")
+ String status;
+
+ /** The tracking number for the fulfillment. */
+ @SerializedName("tracking_number")
+ String trackingNumber;
+
+ /** The tracking URL for the fulfillment. */
+ @SerializedName("tracking_url")
+ String trackingUrl;
+
+ /**
+ * For more details about LineItem, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LineItem extends StripeObject {
+ /** The line item key. */
+ @SerializedName("key")
+ String key;
+
+ /** The quantity associated with the order event. */
+ @SerializedName("quantity")
+ Long quantity;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/delegatedcheckout/RequestedSession.java b/src/main/java/com/stripe/model/delegatedcheckout/RequestedSession.java
index f7ca106386e..eaa179bc5c6 100644
--- a/src/main/java/com/stripe/model/delegatedcheckout/RequestedSession.java
+++ b/src/main/java/com/stripe/model/delegatedcheckout/RequestedSession.java
@@ -18,6 +18,7 @@
import com.stripe.param.delegatedcheckout.RequestedSessionConfirmParams;
import com.stripe.param.delegatedcheckout.RequestedSessionCreateParams;
import com.stripe.param.delegatedcheckout.RequestedSessionExpireParams;
+import com.stripe.param.delegatedcheckout.RequestedSessionListOrdersParams;
import com.stripe.param.delegatedcheckout.RequestedSessionRetrieveParams;
import com.stripe.param.delegatedcheckout.RequestedSessionUpdateParams;
import java.math.BigDecimal;
@@ -322,6 +323,52 @@ public RequestedSession expire(RequestedSessionExpireParams params, RequestOptio
return getResponseGetter().request(request, RequestedSession.class);
}
+ /** Lists orders for a delegated checkout requested session. */
+ public OrderCollection listOrders() throws StripeException {
+ return listOrders((Map) null, (RequestOptions) null);
+ }
+
+ /** Lists orders for a delegated checkout requested session. */
+ public OrderCollection listOrders(Map params) throws StripeException {
+ return listOrders(params, (RequestOptions) null);
+ }
+
+ /** Lists orders for a delegated checkout requested session. */
+ public OrderCollection listOrders(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/delegated_checkout/requested_sessions/%s/orders",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
+ return getResponseGetter().request(request, OrderCollection.class);
+ }
+
+ /** Lists orders for a delegated checkout requested session. */
+ public OrderCollection listOrders(RequestedSessionListOrdersParams params)
+ throws StripeException {
+ return listOrders(params, (RequestOptions) null);
+ }
+
+ /** Lists orders for a delegated checkout requested session. */
+ public OrderCollection listOrders(RequestedSessionListOrdersParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/delegated_checkout/requested_sessions/%s/orders",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, OrderCollection.class);
+ }
+
/** Retrieves a requested session. */
public static RequestedSession retrieve(String requestedSession) throws StripeException {
return retrieve(requestedSession, (Map) null, (RequestOptions) null);
diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
index 68710bb5bfd..a723729e2fc 100644
--- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
@@ -111,6 +111,10 @@ public final class EventDataClassLookup {
classLookup.put(
"v2.billing.collection_setting_version",
com.stripe.model.v2.billing.CollectionSettingVersion.class);
+ classLookup.put("v2.billing.contract", com.stripe.model.v2.billing.Contract.class);
+ classLookup.put(
+ "v2.billing.contract_license_pricing_quantity_change",
+ com.stripe.model.v2.billing.ContractLicensePricingQuantityChange.class);
classLookup.put(
"v2.billing.custom_pricing_unit", com.stripe.model.v2.billing.CustomPricingUnit.class);
classLookup.put("v2.billing.intent", com.stripe.model.v2.billing.Intent.class);
diff --git a/src/main/java/com/stripe/model/v2/billing/Contract.java b/src/main/java/com/stripe/model/v2/billing/Contract.java
new file mode 100644
index 00000000000..8198f9d36b1
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/Contract.java
@@ -0,0 +1,1109 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StringInt64TypeAdapter;
+import com.stripe.model.StripeObject;
+import java.math.BigDecimal;
+import java.time.Instant;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** Main Contract resource representing a comprehensive billing agreement. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class Contract extends StripeObject implements HasId {
+ /** The billing settings for the contract. */
+ @SerializedName("billing_settings")
+ BillingSettings billingSettings;
+
+ /**
+ * The contract line details of the contract. Only populated when {@code contract_line_details} is
+ * passed in the {@code include} parameter.
+ */
+ @SerializedName("contract_line_details")
+ List contractLineDetails;
+
+ /** A unique user-provided contract number e.g. C-2026-0001. */
+ @SerializedName("contract_number")
+ String contractNumber;
+
+ /** The computed total value of all contract lines. */
+ @SerializedName("contract_value_details")
+ ContractValueDetails contractValueDetails;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** The currency of the contract. */
+ @SerializedName("currency")
+ String currency;
+
+ /** The ID of the customer associated with the contract. */
+ @SerializedName("customer")
+ String customer;
+
+ /** The ID of the contract object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * The license quantities of the contract. Only populated when {@code license_quantities} is
+ * passed in the {@code include} parameter.
+ */
+ @SerializedName("license_quantities")
+ List licenseQuantities;
+
+ /**
+ * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
+ * object exists in test mode.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /** Set of key-value pairs that you can attach to an object. */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ * Equal to {@code v2.billing.contract}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /**
+ * The one-time fees of the contract. Only populated when {@code one_time_fees} is passed in the
+ * {@code include} parameter.
+ */
+ @SerializedName("one_time_fees")
+ List oneTimeFees;
+
+ /**
+ * The pricing lines of the contract. Only populated when {@code pricing_lines} is passed in the
+ * {@code include} parameter.
+ */
+ @SerializedName("pricing_lines")
+ List pricingLines;
+
+ /**
+ * The pricing overrides of the contract. Only populated when {@code pricing_overrides} is passed
+ * in the {@code include} parameter.
+ */
+ @SerializedName("pricing_overrides")
+ List pricingOverrides;
+
+ /**
+ * The current status of the contract.
+ *
+ * One of {@code active}, {@code canceled}, {@code draft}, or {@code ended}.
+ */
+ @SerializedName("status")
+ String status;
+
+ /** Information about the contract status transitions. */
+ @SerializedName("status_details")
+ StatusDetails statusDetails;
+
+ /** The billing settings for the contract. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingSettings extends StripeObject {
+ /** Billing settings details for the contract. */
+ @SerializedName("contract_billing_details")
+ ContractBillingDetails contractBillingDetails;
+
+ /** Billing settings details for the contract. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ContractBillingDetails extends StripeObject {
+ /** The bill settings details. */
+ @SerializedName("bill_settings_details")
+ BillSettingsDetails billSettingsDetails;
+
+ /** The billing profile details. */
+ @SerializedName("billing_profile_details")
+ BillingProfileDetails billingProfileDetails;
+
+ /** The collection settings details. */
+ @SerializedName("collection_settings_details")
+ CollectionSettingsDetails collectionSettingsDetails;
+
+ /** The bill settings details. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillSettingsDetails extends StripeObject {
+ /** Calculation settings. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /** Invoice settings. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ /** Calculation settings. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation extends StripeObject {
+ /** Tax calculation settings. */
+ @SerializedName("tax")
+ Tax tax;
+
+ /** Tax calculation settings. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax extends StripeObject {
+ /**
+ * The type of tax calculation.
+ *
+ *
One of {@code automatic}, or {@code manual}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+
+ /** Invoice settings. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice extends StripeObject {
+ /** The number of time units before the invoice is past due. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ /** The number of time units before the invoice is past due. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue extends StripeObject {
+ /**
+ * The interval unit.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("interval")
+ String interval;
+
+ /** The number of intervals. */
+ @SerializedName("interval_count")
+ Long intervalCount;
+ }
+ }
+ }
+
+ /** The billing profile details. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingProfileDetails extends StripeObject {
+ /** The customer who pays for the contract invoice. */
+ @SerializedName("customer")
+ String customer;
+
+ /** The default payment method for the contract. */
+ @SerializedName("default_payment_method")
+ String defaultPaymentMethod;
+ }
+
+ /** The collection settings details. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CollectionSettingsDetails extends StripeObject {
+ /**
+ * The collection method.
+ *
+ *
One of {@code charge_automatically}, or {@code send_invoice}.
+ */
+ @SerializedName("collection_method")
+ String collectionMethod;
+
+ /** The payment method configuration. */
+ @SerializedName("payment_method_configuration")
+ String paymentMethodConfiguration;
+ }
+ }
+ }
+
+ /**
+ * For more details about ContractLineDetail, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ContractLineDetail extends StripeObject {
+ /** The ID of the contract line. */
+ @SerializedName("contract_line")
+ String contractLine;
+
+ /** The computed value details for the contract line. */
+ @SerializedName("contract_line_value_details")
+ ContractLineValueDetails contractLineValueDetails;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** Timestamp to indicate when the contract line ends. */
+ @SerializedName("ends_at")
+ EndsAt endsAt;
+
+ /** Set of key-value pairs that you can attach to an object. */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /** List of overrides applied to the contract line. */
+ @SerializedName("overrides")
+ List overrides;
+
+ /** The pricing configuration for the contract line. */
+ @SerializedName("pricing")
+ Pricing pricing;
+
+ /** Timestamp to indicate when the contract line starts. */
+ @SerializedName("starts_at")
+ StartsAt startsAt;
+
+ /** The computed value details for the contract line. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ContractLineValueDetails extends StripeObject {
+ /**
+ * Computed sum of all licensed fees. Represented as a decimal string in minor currency units.
+ */
+ @SerializedName("total")
+ String total;
+ }
+
+ /** Timestamp to indicate when the contract line ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndsAt extends StripeObject {
+ /** The timestamp when the item ends. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+
+ /**
+ * For more details about Override, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Override extends StripeObject {
+ /** Timestamp to indicate when the override ends. */
+ @SerializedName("ends_at")
+ EndsAt endsAt;
+
+ /** Service action override details. */
+ @SerializedName("service_action")
+ ServiceAction serviceAction;
+
+ /** Timestamp to indicate when the override starts. */
+ @SerializedName("starts_at")
+ StartsAt startsAt;
+
+ /**
+ * The type of the override.
+ *
+ * Equal to {@code service_action}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** Timestamp to indicate when the override ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndsAt extends StripeObject {
+ /** The timestamp when the item ends. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+
+ /** Service action override details. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ServiceAction extends StripeObject {
+ /** Parameters for adding a new service action. */
+ @SerializedName("add")
+ Add add;
+
+ /** Parameters for replacing an existing service action. */
+ @SerializedName("replace")
+ Replace replace;
+
+ /**
+ * The type of service action override.
+ *
+ *
One of {@code add}, or {@code replace}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** Parameters for adding a new service action. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Add extends StripeObject {
+ /** Details for the credit grant. Required if {@code type} is {@code credit_grant}. */
+ @SerializedName("credit_grant")
+ CreditGrant creditGrant;
+
+ /**
+ * The interval for assessing service.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("service_interval")
+ String serviceInterval;
+
+ /** The length of the interval for assessing service. */
+ @SerializedName("service_interval_count")
+ Long serviceIntervalCount;
+
+ /**
+ * The type of the service action.
+ *
+ *
Equal to {@code credit_grant}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** Details for the credit grant. Required if {@code type} is {@code credit_grant}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CreditGrant extends StripeObject {
+ /** The amount of the credit grant. */
+ @SerializedName("amount")
+ com.stripe.model.v2.billing.Contract.ContractLineDetail.Override.ServiceAction.Add
+ .CreditGrant.Amount
+ amount;
+
+ /** Defines the scope where the credit grant is applicable. */
+ @SerializedName("applicability_config")
+ ApplicabilityConfig applicabilityConfig;
+
+ /**
+ * The category of the credit grant.
+ *
+ *
One of {@code paid}, or {@code promotional}.
+ */
+ @SerializedName("category")
+ String category;
+
+ /** The expiry configuration for the credit grant. */
+ @SerializedName("expiry_config")
+ ExpiryConfig expiryConfig;
+
+ /** A descriptive name. */
+ @SerializedName("name")
+ String name;
+
+ /**
+ * The desired priority for applying this credit grant. The highest priority is 0 and
+ * the lowest is 100.
+ */
+ @SerializedName("priority")
+ Long priority;
+
+ /** The amount of the credit grant. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Amount extends StripeObject {
+ /**
+ * The monetary amount of the credit grant. Required if {@code type} is {@code
+ * monetary}.
+ */
+ @SerializedName("monetary")
+ com.stripe.v2.Amount monetary;
+
+ /**
+ * The type of the credit grant amount.
+ *
+ *
Equal to {@code monetary}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+
+ /** Defines the scope where the credit grant is applicable. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ApplicabilityConfig extends StripeObject {
+ /** The applicability scope of the credit grant. */
+ @SerializedName("scope")
+ Scope scope;
+
+ /** The applicability scope of the credit grant. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Scope extends StripeObject {
+ /** The billable items to apply the credit grant to. */
+ @SerializedName("billable_items")
+ List billableItems;
+
+ /**
+ * The price type that credit grants can apply to.
+ *
+ * Equal to {@code metered}.
+ */
+ @SerializedName("price_type")
+ String priceType;
+ }
+ }
+
+ /** The expiry configuration for the credit grant. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ExpiryConfig extends StripeObject {
+ /**
+ * The type of the expiry configuration.
+ *
+ *
Equal to {@code end_of_service_period}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+ }
+
+ /** Parameters for replacing an existing service action. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Replace extends StripeObject implements HasId {
+ /** Details for the credit grant. Required if {@code type} is {@code credit_grant}. */
+ @SerializedName("credit_grant")
+ CreditGrant creditGrant;
+
+ /** The ID of the service action to replace. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** The lookup key for the service action to replace. */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * The interval for assessing service.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("service_interval")
+ String serviceInterval;
+
+ /** The length of the interval for assessing service. */
+ @SerializedName("service_interval_count")
+ Long serviceIntervalCount;
+
+ /**
+ * The type of the service action.
+ *
+ *
Equal to {@code credit_grant}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** Details for the credit grant. Required if {@code type} is {@code credit_grant}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CreditGrant extends StripeObject {
+ /** The amount of the credit grant. */
+ @SerializedName("amount")
+ com.stripe.model.v2.billing.Contract.ContractLineDetail.Override.ServiceAction.Replace
+ .CreditGrant.Amount
+ amount;
+
+ /** Defines the scope where the credit grant is applicable. */
+ @SerializedName("applicability_config")
+ ApplicabilityConfig applicabilityConfig;
+
+ /**
+ * The category of the credit grant.
+ *
+ *
One of {@code paid}, or {@code promotional}.
+ */
+ @SerializedName("category")
+ String category;
+
+ /** The expiry configuration for the credit grant. */
+ @SerializedName("expiry_config")
+ ExpiryConfig expiryConfig;
+
+ /** A descriptive name. */
+ @SerializedName("name")
+ String name;
+
+ /**
+ * The desired priority for applying this credit grant. The highest priority is 0 and
+ * the lowest is 100.
+ */
+ @SerializedName("priority")
+ Long priority;
+
+ /** The amount of the credit grant. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Amount extends StripeObject {
+ /**
+ * The monetary amount of the credit grant. Required if {@code type} is {@code
+ * monetary}.
+ */
+ @SerializedName("monetary")
+ com.stripe.v2.Amount monetary;
+
+ /**
+ * The type of the credit grant amount.
+ *
+ *
Equal to {@code monetary}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+
+ /** Defines the scope where the credit grant is applicable. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ApplicabilityConfig extends StripeObject {
+ /** The applicability scope of the credit grant. */
+ @SerializedName("scope")
+ Scope scope;
+
+ /** The applicability scope of the credit grant. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Scope extends StripeObject {
+ /** The billable items to apply the credit grant to. */
+ @SerializedName("billable_items")
+ List billableItems;
+
+ /**
+ * The price type that credit grants can apply to.
+ *
+ * Equal to {@code metered}.
+ */
+ @SerializedName("price_type")
+ String priceType;
+ }
+ }
+
+ /** The expiry configuration for the credit grant. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ExpiryConfig extends StripeObject {
+ /**
+ * The type of the expiry configuration.
+ *
+ *
Equal to {@code end_of_service_period}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+ }
+ }
+
+ /** Timestamp to indicate when the override starts. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StartsAt extends StripeObject {
+ /** The timestamp when the item starts. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+ }
+
+ /** The pricing configuration for the contract line. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Pricing extends StripeObject {}
+
+ /** Timestamp to indicate when the contract line starts. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StartsAt extends StripeObject {
+ /** The timestamp when the item starts. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+ }
+
+ /** The computed total value of all contract lines. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ContractValueDetails extends StripeObject {
+ /** The total value represented as a decimal string in minor currency units. */
+ @SerializedName("total")
+ String total;
+ }
+
+ /**
+ * For more details about LicenseQuantity, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LicenseQuantity extends StripeObject {
+ /** The ID of the license pricing. */
+ @SerializedName("license_pricing_id")
+ String licensePricingId;
+
+ /**
+ * The type of the license pricing.
+ *
+ *
One of {@code license_fee}, or {@code price}.
+ */
+ @SerializedName("license_pricing_type")
+ String licensePricingType;
+
+ /** The ID of the pricing line associated with this license quantity. */
+ @SerializedName("pricing_line")
+ String pricingLine;
+
+ /** The current quantity of the license. */
+ @SerializedName("quantity")
+ Long quantity;
+ }
+
+ /**
+ * For more details about OneTimeFee, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class OneTimeFee extends StripeObject {
+ /** The resolved bill schedule for the fee. */
+ @SerializedName("bill_schedule")
+ List billSchedule;
+
+ /**
+ * The type of billable item that this fee references.
+ *
+ * Equal to {@code product}.
+ */
+ @SerializedName("billable_item_type")
+ String billableItemType;
+
+ /**
+ * Details for a product billable target. Set when {@code billable_item_type} is {@code
+ * product}.
+ */
+ @SerializedName("product_details")
+ ProductDetails productDetails;
+
+ /**
+ * For more details about BillSchedule, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillSchedule extends StripeObject {
+ /** When this entry will be billed. */
+ @SerializedName("bill_at")
+ BillAt billAt;
+
+ /** The amount to bill for this entry, in the smallest currency unit. */
+ @SerializedName("value")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long value;
+
+ /** When this entry will be billed. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillAt extends StripeObject {
+ /**
+ * The datetime at which the entry will be billed. Set when {@code type} is {@code
+ * datetime}.
+ */
+ @SerializedName("timestamp")
+ Instant timestamp;
+
+ /**
+ * The type of the bill_at.
+ *
+ *
One of {@code contract_start}, or {@code datetime}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+
+ /**
+ * Details for a product billable target. Set when {@code billable_item_type} is {@code
+ * product}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ProductDetails extends StripeObject {
+ /** The ID of the v1 Product. */
+ @SerializedName("product")
+ String product;
+ }
+ }
+
+ /**
+ * For more details about PricingLine, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PricingLine extends StripeObject {
+ /** Resolved timestamp when the pricing line ends. */
+ @SerializedName("ends_at")
+ EndsAt endsAt;
+
+ /** The user-provided lookup key for the pricing line. */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /** Set of key-value pairs that you can attach to an object. */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /** The pricing configuration for the pricing line. */
+ @SerializedName("pricing")
+ Pricing pricing;
+
+ /** The ID of the pricing line. */
+ @SerializedName("pricing_line")
+ String pricingLine;
+
+ /** Resolved timestamp when the pricing line starts. */
+ @SerializedName("starts_at")
+ StartsAt startsAt;
+
+ /** Resolved timestamp when the pricing line ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndsAt extends StripeObject {
+ /** The timestamp when the item ends. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+
+ /** The pricing configuration for the pricing line. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Pricing extends StripeObject {
+ /** V1 price details. Present when {@code type} is {@code price}. */
+ @SerializedName("price_details")
+ PriceDetails priceDetails;
+
+ /**
+ * The type of pricing.
+ *
+ * Equal to {@code price}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** V1 price details. Present when {@code type} is {@code price}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PriceDetails extends StripeObject {
+ /** The ID of the V1 price. */
+ @SerializedName("price")
+ String price;
+ }
+ }
+
+ /** Resolved timestamp when the pricing line starts. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StartsAt extends StripeObject {
+ /** The timestamp when the item starts. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+ }
+
+ /**
+ * For more details about PricingOverride, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PricingOverride extends StripeObject {
+ /** Resolved timestamp when the pricing override ends. */
+ @SerializedName("ends_at")
+ EndsAt endsAt;
+
+ /** The user-provided lookup key for the pricing override. */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /** Details for a multiplier override. */
+ @SerializedName("multiplier")
+ Multiplier multiplier;
+
+ /** Details for an overwrite_price override. */
+ @SerializedName("overwrite_price")
+ OverwritePrice overwritePrice;
+
+ /** The ID of the pricing override. */
+ @SerializedName("pricing_override")
+ String pricingOverride;
+
+ /** The priority of this override relative to others. Lower number = higher priority. */
+ @SerializedName("priority")
+ Long priority;
+
+ /** Resolved timestamp when the pricing override starts. */
+ @SerializedName("starts_at")
+ StartsAt startsAt;
+
+ /**
+ * The type of pricing override.
+ *
+ *
One of {@code multiplier}, or {@code overwrite_price}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** Resolved timestamp when the pricing override ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndsAt extends StripeObject {
+ /** The timestamp when the item ends. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+
+ /** Details for a multiplier override. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Multiplier extends StripeObject {
+ /** Criteria determining which rates the multiplier applies to. */
+ @SerializedName("criteria")
+ List criteria;
+
+ /**
+ * The multiplier factor, represented as a decimal string. e.g. "0.8" for a 20%
+ * reduction.
+ */
+ @SerializedName("factor")
+ String factor;
+
+ /**
+ * For more details about Criterion, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Criterion extends StripeObject {
+ /** Filter by billable item IDs. */
+ @SerializedName("billable_item_ids")
+ List billableItemIds;
+
+ /** Filter by billable item lookup keys. */
+ @SerializedName("billable_item_lookup_keys")
+ List billableItemLookupKeys;
+
+ /** Filter by billable item type. */
+ @SerializedName("billable_item_types")
+ List billableItemTypes;
+
+ /** Filter by metadata conditions. */
+ @SerializedName("metadata_conditions")
+ List metadataConditions;
+
+ /** Filter by rate card IDs. Only applicable for {@code multiplier} overrides. */
+ @SerializedName("rate_card_ids")
+ List rateCardIds;
+
+ /**
+ * Whether to include or exclude items matching these criteria.
+ *
+ * One of {@code exclude}, or {@code include}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about MetadataCondition, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MetadataCondition extends StripeObject {
+ /** All of these key-value conditions must match. */
+ @SerializedName("all_of")
+ List allOf;
+
+ /**
+ * For more details about AllOf, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AllOf extends StripeObject {
+ /** The metadata key. */
+ @SerializedName("key")
+ String key;
+
+ /** The metadata value. */
+ @SerializedName("value")
+ String value;
+ }
+ }
+ }
+ }
+
+ /** Details for an overwrite_price override. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class OverwritePrice extends StripeObject {
+ /** The ID of the V1 price to overwrite. */
+ @SerializedName("price")
+ String price;
+
+ /**
+ * Defines whether the tiered price should be graduated or volume-based.
+ *
+ * One of {@code graduated}, or {@code volume}.
+ */
+ @SerializedName("tiering_mode")
+ String tieringMode;
+
+ /** Each element represents a pricing tier. */
+ @SerializedName("tiers")
+ List tiers;
+
+ /**
+ * The per-unit amount to be charged, represented as a decimal string in minor currency units.
+ */
+ @SerializedName("unit_amount")
+ String unitAmount;
+
+ /**
+ * For more details about Tier, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tier extends StripeObject {
+ /** Price for the entire tier, represented as a decimal string in minor currency units. */
+ @SerializedName("flat_amount")
+ String flatAmount;
+
+ /**
+ * Per-unit price for units included in this tier, represented as a decimal string in minor
+ * currency units.
+ */
+ @SerializedName("unit_amount")
+ String unitAmount;
+
+ /** Up to and including this quantity will be contained in the tier. */
+ @SerializedName("up_to_decimal")
+ BigDecimal upToDecimal;
+
+ /**
+ * No upper bound to this tier.
+ *
+ * Equal to {@code inf}.
+ */
+ @SerializedName("up_to_inf")
+ String upToInf;
+ }
+ }
+
+ /** Resolved timestamp when the pricing override starts. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StartsAt extends StripeObject {
+ /** The timestamp when the item starts. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+ }
+ }
+
+ /** Information about the contract status transitions. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StatusDetails extends StripeObject {
+ /** Details of the active contract status. */
+ @SerializedName("active")
+ Active active;
+
+ /** Details of the canceled contract status. */
+ @SerializedName("canceled")
+ Canceled canceled;
+
+ /** Details of the active contract status. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Active extends StripeObject {
+ /** The timestamp when the contract was activated. */
+ @SerializedName("activated_at")
+ Instant activatedAt;
+ }
+
+ /** Details of the canceled contract status. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Canceled extends StripeObject {
+ /** The timestamp when the contract was canceled. */
+ @SerializedName("canceled_at")
+ Instant canceledAt;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/billing/ContractLicensePricingQuantityChange.java b/src/main/java/com/stripe/model/v2/billing/ContractLicensePricingQuantityChange.java
new file mode 100644
index 00000000000..e7cb3464a4b
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/ContractLicensePricingQuantityChange.java
@@ -0,0 +1,65 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** A license pricing quantity change object returned by ListContractLicenseQuantityChanges. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class ContractLicensePricingQuantityChange extends StripeObject implements HasId {
+ /** The timestamp when this quantity change object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** The timestamp when this quantity change takes effect. */
+ @SerializedName("effective_at")
+ Instant effectiveAt;
+
+ /** The ID of the quantity change object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** The ID of the license pricing. */
+ @SerializedName("license_pricing_id")
+ String licensePricingId;
+
+ /**
+ * The type of the license pricing.
+ *
+ *
One of {@code license_fee}, or {@code price}.
+ */
+ @SerializedName("license_pricing_type")
+ String licensePricingType;
+
+ /**
+ * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
+ * object exists in test mode.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ *
Equal to {@code v2.billing.contract_license_pricing_quantity_change}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** The ID of the pricing line associated with this quantity change. */
+ @SerializedName("pricing_line")
+ String pricingLine;
+
+ /** The quantity at the effective time. */
+ @SerializedName("quantity")
+ Long quantity;
+}
diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java
index c964e6ddca0..88e48569a33 100644
--- a/src/main/java/com/stripe/param/InvoiceCreateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java
@@ -2289,13 +2289,6 @@ public static class PaymentMethodOptions {
@SerializedName("us_bank_account")
Object usBankAccount;
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- @SerializedName("wechat_pay")
- Object wechatPay;
-
private PaymentMethodOptions(
Object acssDebit,
Object bancontact,
@@ -2311,8 +2304,7 @@ private PaymentMethodOptions(
Object pix,
Object sepaDebit,
Object upi,
- Object usBankAccount,
- Object wechatPay) {
+ Object usBankAccount) {
this.acssDebit = acssDebit;
this.bancontact = bancontact;
this.bizum = bizum;
@@ -2328,7 +2320,6 @@ private PaymentMethodOptions(
this.sepaDebit = sepaDebit;
this.upi = upi;
this.usBankAccount = usBankAccount;
- this.wechatPay = wechatPay;
}
public static Builder builder() {
@@ -2366,8 +2357,6 @@ public static class Builder {
private Object usBankAccount;
- private Object wechatPay;
-
/** Finalize and obtain parameter instance from this builder. */
public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() {
return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions(
@@ -2385,8 +2374,7 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() {
this.pix,
this.sepaDebit,
this.upi,
- this.usBankAccount,
- this.wechatPay);
+ this.usBankAccount);
}
/**
@@ -2680,25 +2668,6 @@ public Builder setUsBankAccount(EmptyParam usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
-
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- public Builder setWechatPay(
- InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
-
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- public Builder setWechatPay(EmptyParam wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
}
@Getter
@@ -5151,122 +5120,6 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam {
}
}
}
-
- @Getter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- String appId;
-
- /** The client type that the end customer will pay from. */
- @SerializedName("client")
- Client client;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private WechatPay(String appId, Client client, Map extraParams) {
- this.appId = appId;
- this.client = client;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String appId;
-
- private Client client;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay build() {
- return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay(
- this.appId, this.client, this.extraParams);
- }
-
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or
- * {@code android}.
- */
- public Builder setAppId(String appId) {
- this.appId = appId;
- return this;
- }
-
- /** The client type that the end customer will pay from. */
- public Builder setClient(
- InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay.Client client) {
- this.client = client;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams} for the
- * field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams} for the
- * field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
-
- public enum Client implements ApiRequestParams.EnumParam {
- @SerializedName("android")
- ANDROID("android"),
-
- @SerializedName("ios")
- IOS("ios"),
-
- @SerializedName("mobile_web")
- MOBILE_WEB("mobile_web"),
-
- @SerializedName("web")
- WEB("web");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Client(String value) {
- this.value = value;
- }
- }
- }
}
public enum PaymentMethodType implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java
index 5e10a40539b..1195dc0e815 100644
--- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java
@@ -2283,13 +2283,6 @@ public static class PaymentMethodOptions {
@SerializedName("us_bank_account")
Object usBankAccount;
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- @SerializedName("wechat_pay")
- Object wechatPay;
-
private PaymentMethodOptions(
Object acssDebit,
Object bancontact,
@@ -2305,8 +2298,7 @@ private PaymentMethodOptions(
Object pix,
Object sepaDebit,
Object upi,
- Object usBankAccount,
- Object wechatPay) {
+ Object usBankAccount) {
this.acssDebit = acssDebit;
this.bancontact = bancontact;
this.bizum = bizum;
@@ -2322,7 +2314,6 @@ private PaymentMethodOptions(
this.sepaDebit = sepaDebit;
this.upi = upi;
this.usBankAccount = usBankAccount;
- this.wechatPay = wechatPay;
}
public static Builder builder() {
@@ -2360,8 +2351,6 @@ public static class Builder {
private Object usBankAccount;
- private Object wechatPay;
-
/** Finalize and obtain parameter instance from this builder. */
public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() {
return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions(
@@ -2379,8 +2368,7 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() {
this.pix,
this.sepaDebit,
this.upi,
- this.usBankAccount,
- this.wechatPay);
+ this.usBankAccount);
}
/**
@@ -2674,25 +2662,6 @@ public Builder setUsBankAccount(EmptyParam usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
-
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- public Builder setWechatPay(
- InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
-
- /**
- * If paying by {@code wechat_pay}, this sub-hash contains details about the WeChat Pay
- * payment method options to pass to the invoice’s PaymentIntent.
- */
- public Builder setWechatPay(EmptyParam wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
}
@Getter
@@ -5189,131 +5158,6 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam {
}
}
}
-
- @Getter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- Object appId;
-
- /** The client type that the end customer will pay from. */
- @SerializedName("client")
- Client client;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private WechatPay(Object appId, Client client, Map extraParams) {
- this.appId = appId;
- this.client = client;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object appId;
-
- private Client client;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay build() {
- return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay(
- this.appId, this.client, this.extraParams);
- }
-
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or
- * {@code android}.
- */
- public Builder setAppId(String appId) {
- this.appId = appId;
- return this;
- }
-
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or
- * {@code android}.
- */
- public Builder setAppId(EmptyParam appId) {
- this.appId = appId;
- return this;
- }
-
- /** The client type that the end customer will pay from. */
- public Builder setClient(
- InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay.Client client) {
- this.client = client;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams} for the
- * field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams} for the
- * field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
-
- public enum Client implements ApiRequestParams.EnumParam {
- @SerializedName("android")
- ANDROID("android"),
-
- @SerializedName("ios")
- IOS("ios"),
-
- @SerializedName("mobile_web")
- MOBILE_WEB("mobile_web"),
-
- @SerializedName("web")
- WEB("web");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Client(String value) {
- this.value = value;
- }
- }
- }
}
public enum PaymentMethodType implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index 2c20482b6de..2d2ccaac314 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -29341,6 +29341,13 @@ public Builder putAllExtraParam(Map map) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class AccountFunding {
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ @SerializedName("digital_asset_category")
+ DigitalAssetCategory digitalAssetCategory;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName}
@@ -29360,7 +29367,11 @@ public static class AccountFunding {
Wallet wallet;
private AccountFunding(
- Map extraParams, Object liquidAsset, Wallet wallet) {
+ DigitalAssetCategory digitalAssetCategory,
+ Map extraParams,
+ Object liquidAsset,
+ Wallet wallet) {
+ this.digitalAssetCategory = digitalAssetCategory;
this.extraParams = extraParams;
this.liquidAsset = liquidAsset;
this.wallet = wallet;
@@ -29371,6 +29382,8 @@ public static Builder builder() {
}
public static class Builder {
+ private DigitalAssetCategory digitalAssetCategory;
+
private Map extraParams;
private Object liquidAsset;
@@ -29382,7 +29395,20 @@ public static class Builder {
.MoneyServices.AccountFunding
build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.PaymentDetails
- .MoneyServices.AccountFunding(this.extraParams, this.liquidAsset, this.wallet);
+ .MoneyServices.AccountFunding(
+ this.digitalAssetCategory, this.extraParams, this.liquidAsset, this.wallet);
+ }
+
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ public Builder setDigitalAssetCategory(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Card.PaymentDetails.MoneyServices
+ .AccountFunding.DigitalAssetCategory
+ digitalAssetCategory) {
+ this.digitalAssetCategory = digitalAssetCategory;
+ return this;
}
/**
@@ -29951,6 +29977,27 @@ public Builder setName(String name) {
}
}
}
+
+ public enum DigitalAssetCategory implements ApiRequestParams.EnumParam {
+ @SerializedName("blockchain_native")
+ BLOCKCHAIN_NATIVE("blockchain_native"),
+
+ @SerializedName("nft")
+ NFT("nft"),
+
+ @SerializedName("other_non_fiat")
+ OTHER_NON_FIAT("other_non_fiat"),
+
+ @SerializedName("stablecoin")
+ STABLECOIN("stablecoin");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ DigitalAssetCategory(String value) {
+ this.value = value;
+ }
+ }
}
}
}
@@ -31346,6 +31393,13 @@ public Builder putAllExtraParam(Map map) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class AccountFunding {
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ @SerializedName("digital_asset_category")
+ DigitalAssetCategory digitalAssetCategory;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName}
@@ -31365,7 +31419,11 @@ public static class AccountFunding {
Wallet wallet;
private AccountFunding(
- Map extraParams, Object liquidAsset, Wallet wallet) {
+ DigitalAssetCategory digitalAssetCategory,
+ Map extraParams,
+ Object liquidAsset,
+ Wallet wallet) {
+ this.digitalAssetCategory = digitalAssetCategory;
this.extraParams = extraParams;
this.liquidAsset = liquidAsset;
this.wallet = wallet;
@@ -31376,6 +31434,8 @@ public static Builder builder() {
}
public static class Builder {
+ private DigitalAssetCategory digitalAssetCategory;
+
private Map extraParams;
private Object liquidAsset;
@@ -31388,7 +31448,19 @@ public static class Builder {
build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent
.PaymentDetails.MoneyServices.AccountFunding(
- this.extraParams, this.liquidAsset, this.wallet);
+ this.digitalAssetCategory, this.extraParams, this.liquidAsset, this.wallet);
+ }
+
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ public Builder setDigitalAssetCategory(
+ PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.PaymentDetails
+ .MoneyServices.AccountFunding.DigitalAssetCategory
+ digitalAssetCategory) {
+ this.digitalAssetCategory = digitalAssetCategory;
+ return this;
}
/**
@@ -31959,6 +32031,27 @@ public Builder setName(String name) {
}
}
}
+
+ public enum DigitalAssetCategory implements ApiRequestParams.EnumParam {
+ @SerializedName("blockchain_native")
+ BLOCKCHAIN_NATIVE("blockchain_native"),
+
+ @SerializedName("nft")
+ NFT("nft"),
+
+ @SerializedName("other_non_fiat")
+ OTHER_NON_FIAT("other_non_fiat"),
+
+ @SerializedName("stablecoin")
+ STABLECOIN("stablecoin");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ DigitalAssetCategory(String value) {
+ this.value = value;
+ }
+ }
}
}
}
diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
index 22c107764be..36293e04952 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
@@ -29818,6 +29818,13 @@ public Builder putAllExtraParam(Map map) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class AccountFunding {
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ @SerializedName("digital_asset_category")
+ DigitalAssetCategory digitalAssetCategory;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName}
@@ -29837,7 +29844,11 @@ public static class AccountFunding {
Wallet wallet;
private AccountFunding(
- Map extraParams, Object liquidAsset, Wallet wallet) {
+ DigitalAssetCategory digitalAssetCategory,
+ Map extraParams,
+ Object liquidAsset,
+ Wallet wallet) {
+ this.digitalAssetCategory = digitalAssetCategory;
this.extraParams = extraParams;
this.liquidAsset = liquidAsset;
this.wallet = wallet;
@@ -29848,6 +29859,8 @@ public static Builder builder() {
}
public static class Builder {
+ private DigitalAssetCategory digitalAssetCategory;
+
private Map extraParams;
private Object liquidAsset;
@@ -29859,7 +29872,20 @@ public static class Builder {
.MoneyServices.AccountFunding
build() {
return new PaymentIntentCreateParams.PaymentMethodOptions.Card.PaymentDetails
- .MoneyServices.AccountFunding(this.extraParams, this.liquidAsset, this.wallet);
+ .MoneyServices.AccountFunding(
+ this.digitalAssetCategory, this.extraParams, this.liquidAsset, this.wallet);
+ }
+
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ public Builder setDigitalAssetCategory(
+ PaymentIntentCreateParams.PaymentMethodOptions.Card.PaymentDetails.MoneyServices
+ .AccountFunding.DigitalAssetCategory
+ digitalAssetCategory) {
+ this.digitalAssetCategory = digitalAssetCategory;
+ return this;
}
/**
@@ -30428,6 +30454,27 @@ public Builder setName(String name) {
}
}
}
+
+ public enum DigitalAssetCategory implements ApiRequestParams.EnumParam {
+ @SerializedName("blockchain_native")
+ BLOCKCHAIN_NATIVE("blockchain_native"),
+
+ @SerializedName("nft")
+ NFT("nft"),
+
+ @SerializedName("other_non_fiat")
+ OTHER_NON_FIAT("other_non_fiat"),
+
+ @SerializedName("stablecoin")
+ STABLECOIN("stablecoin");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ DigitalAssetCategory(String value) {
+ this.value = value;
+ }
+ }
}
}
}
@@ -31822,6 +31869,13 @@ public Builder putAllExtraParam(Map map) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class AccountFunding {
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ @SerializedName("digital_asset_category")
+ DigitalAssetCategory digitalAssetCategory;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName}
@@ -31841,7 +31895,11 @@ public static class AccountFunding {
Wallet wallet;
private AccountFunding(
- Map extraParams, Object liquidAsset, Wallet wallet) {
+ DigitalAssetCategory digitalAssetCategory,
+ Map extraParams,
+ Object liquidAsset,
+ Wallet wallet) {
+ this.digitalAssetCategory = digitalAssetCategory;
this.extraParams = extraParams;
this.liquidAsset = liquidAsset;
this.wallet = wallet;
@@ -31852,6 +31910,8 @@ public static Builder builder() {
}
public static class Builder {
+ private DigitalAssetCategory digitalAssetCategory;
+
private Map extraParams;
private Object liquidAsset;
@@ -31863,7 +31923,20 @@ public static class Builder {
.MoneyServices.AccountFunding
build() {
return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.PaymentDetails
- .MoneyServices.AccountFunding(this.extraParams, this.liquidAsset, this.wallet);
+ .MoneyServices.AccountFunding(
+ this.digitalAssetCategory, this.extraParams, this.liquidAsset, this.wallet);
+ }
+
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ public Builder setDigitalAssetCategory(
+ PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.PaymentDetails
+ .MoneyServices.AccountFunding.DigitalAssetCategory
+ digitalAssetCategory) {
+ this.digitalAssetCategory = digitalAssetCategory;
+ return this;
}
/**
@@ -32433,6 +32506,27 @@ public Builder setName(String name) {
}
}
}
+
+ public enum DigitalAssetCategory implements ApiRequestParams.EnumParam {
+ @SerializedName("blockchain_native")
+ BLOCKCHAIN_NATIVE("blockchain_native"),
+
+ @SerializedName("nft")
+ NFT("nft"),
+
+ @SerializedName("other_non_fiat")
+ OTHER_NON_FIAT("other_non_fiat"),
+
+ @SerializedName("stablecoin")
+ STABLECOIN("stablecoin");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ DigitalAssetCategory(String value) {
+ this.value = value;
+ }
+ }
}
}
}
@@ -50174,15 +50268,15 @@ public static class PaymentsOrchestration {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Payment-level details for the orchestrated payment. */
- @SerializedName("payment_details")
- PaymentDetails paymentDetails;
+ /** Merchant-provided reference for this payment, used for reconciliation. */
+ @SerializedName("payment_reference")
+ String paymentReference;
private PaymentsOrchestration(
- Boolean enabled, Map extraParams, PaymentDetails paymentDetails) {
+ Boolean enabled, Map extraParams, String paymentReference) {
this.enabled = enabled;
this.extraParams = extraParams;
- this.paymentDetails = paymentDetails;
+ this.paymentReference = paymentReference;
}
public static Builder builder() {
@@ -50194,12 +50288,12 @@ public static class Builder {
private Map extraParams;
- private PaymentDetails paymentDetails;
+ private String paymentReference;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentCreateParams.PaymentsOrchestration build() {
return new PaymentIntentCreateParams.PaymentsOrchestration(
- this.enabled, this.extraParams, this.paymentDetails);
+ this.enabled, this.extraParams, this.paymentReference);
}
/** Required. Whether this feature is enabled. */
@@ -50235,85 +50329,10 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Payment-level details for the orchestrated payment. */
- public Builder setPaymentDetails(
- PaymentIntentCreateParams.PaymentsOrchestration.PaymentDetails paymentDetails) {
- this.paymentDetails = paymentDetails;
- return this;
- }
- }
-
- @Getter
- @EqualsAndHashCode(callSuper = false)
- public static class PaymentDetails {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
/** Merchant-provided reference for this payment, used for reconciliation. */
- @SerializedName("reference")
- String reference;
-
- private PaymentDetails(Map extraParams, String reference) {
- this.extraParams = extraParams;
- this.reference = reference;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private String reference;
-
- /** Finalize and obtain parameter instance from this builder. */
- public PaymentIntentCreateParams.PaymentsOrchestration.PaymentDetails build() {
- return new PaymentIntentCreateParams.PaymentsOrchestration.PaymentDetails(
- this.extraParams, this.reference);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * PaymentIntentCreateParams.PaymentsOrchestration.PaymentDetails#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * PaymentIntentCreateParams.PaymentsOrchestration.PaymentDetails#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** Merchant-provided reference for this payment, used for reconciliation. */
- public Builder setReference(String reference) {
- this.reference = reference;
- return this;
- }
+ public Builder setPaymentReference(String paymentReference) {
+ this.paymentReference = paymentReference;
+ return this;
}
}
}
diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
index 2cc84db45c1..88cd8658e26 100644
--- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
@@ -31075,6 +31075,13 @@ public Builder putAllExtraParam(Map map) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class AccountFunding {
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ @SerializedName("digital_asset_category")
+ DigitalAssetCategory digitalAssetCategory;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName}
@@ -31094,7 +31101,11 @@ public static class AccountFunding {
Wallet wallet;
private AccountFunding(
- Map extraParams, Object liquidAsset, Wallet wallet) {
+ DigitalAssetCategory digitalAssetCategory,
+ Map extraParams,
+ Object liquidAsset,
+ Wallet wallet) {
+ this.digitalAssetCategory = digitalAssetCategory;
this.extraParams = extraParams;
this.liquidAsset = liquidAsset;
this.wallet = wallet;
@@ -31105,6 +31116,8 @@ public static Builder builder() {
}
public static class Builder {
+ private DigitalAssetCategory digitalAssetCategory;
+
private Map extraParams;
private Object liquidAsset;
@@ -31116,7 +31129,20 @@ public static class Builder {
.MoneyServices.AccountFunding
build() {
return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.PaymentDetails
- .MoneyServices.AccountFunding(this.extraParams, this.liquidAsset, this.wallet);
+ .MoneyServices.AccountFunding(
+ this.digitalAssetCategory, this.extraParams, this.liquidAsset, this.wallet);
+ }
+
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ public Builder setDigitalAssetCategory(
+ PaymentIntentUpdateParams.PaymentMethodOptions.Card.PaymentDetails.MoneyServices
+ .AccountFunding.DigitalAssetCategory
+ digitalAssetCategory) {
+ this.digitalAssetCategory = digitalAssetCategory;
+ return this;
}
/**
@@ -31709,6 +31735,27 @@ public Builder setName(EmptyParam name) {
}
}
}
+
+ public enum DigitalAssetCategory implements ApiRequestParams.EnumParam {
+ @SerializedName("blockchain_native")
+ BLOCKCHAIN_NATIVE("blockchain_native"),
+
+ @SerializedName("nft")
+ NFT("nft"),
+
+ @SerializedName("other_non_fiat")
+ OTHER_NON_FIAT("other_non_fiat"),
+
+ @SerializedName("stablecoin")
+ STABLECOIN("stablecoin");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ DigitalAssetCategory(String value) {
+ this.value = value;
+ }
+ }
}
}
}
@@ -33190,6 +33237,13 @@ public Builder putAllExtraParam(Map map) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class AccountFunding {
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ @SerializedName("digital_asset_category")
+ DigitalAssetCategory digitalAssetCategory;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName}
@@ -33209,7 +33263,11 @@ public static class AccountFunding {
Wallet wallet;
private AccountFunding(
- Map extraParams, Object liquidAsset, Wallet wallet) {
+ DigitalAssetCategory digitalAssetCategory,
+ Map extraParams,
+ Object liquidAsset,
+ Wallet wallet) {
+ this.digitalAssetCategory = digitalAssetCategory;
this.extraParams = extraParams;
this.liquidAsset = liquidAsset;
this.wallet = wallet;
@@ -33220,6 +33278,8 @@ public static Builder builder() {
}
public static class Builder {
+ private DigitalAssetCategory digitalAssetCategory;
+
private Map extraParams;
private Object liquidAsset;
@@ -33231,7 +33291,20 @@ public static class Builder {
.MoneyServices.AccountFunding
build() {
return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.PaymentDetails
- .MoneyServices.AccountFunding(this.extraParams, this.liquidAsset, this.wallet);
+ .MoneyServices.AccountFunding(
+ this.digitalAssetCategory, this.extraParams, this.liquidAsset, this.wallet);
+ }
+
+ /**
+ * The category of digital asset being acquired through this account funding
+ * transaction.
+ */
+ public Builder setDigitalAssetCategory(
+ PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.PaymentDetails
+ .MoneyServices.AccountFunding.DigitalAssetCategory
+ digitalAssetCategory) {
+ this.digitalAssetCategory = digitalAssetCategory;
+ return this;
}
/**
@@ -33825,6 +33898,27 @@ public Builder setName(EmptyParam name) {
}
}
}
+
+ public enum DigitalAssetCategory implements ApiRequestParams.EnumParam {
+ @SerializedName("blockchain_native")
+ BLOCKCHAIN_NATIVE("blockchain_native"),
+
+ @SerializedName("nft")
+ NFT("nft"),
+
+ @SerializedName("other_non_fiat")
+ OTHER_NON_FIAT("other_non_fiat"),
+
+ @SerializedName("stablecoin")
+ STABLECOIN("stablecoin");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ DigitalAssetCategory(String value) {
+ this.value = value;
+ }
+ }
}
}
}
diff --git a/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java b/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java
index 0928ba0505c..fb4eb033b8e 100644
--- a/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java
+++ b/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java
@@ -26,7 +26,9 @@ public class PaymentLocationCapabilityListParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Required. The location for which the capabilities enable functionality. */
+ /**
+ * Required. The payment location that the capabilities enable functionality for.
+ */
@SerializedName("location")
String location;
@@ -105,7 +107,10 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Required. The location for which the capabilities enable functionality. */
+ /**
+ * Required. The payment location that the capabilities enable functionality
+ * for.
+ */
public Builder setLocation(String location) {
this.location = location;
return this;
diff --git a/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java b/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java
index bf24731a0aa..b3baea5f478 100644
--- a/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java
+++ b/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java
@@ -27,7 +27,7 @@ public class PaymentLocationCapabilityRetrieveParams extends ApiRequestParams {
Map extraParams;
/**
- * Required. The payment location for which the capability enables functionality.
+ * Required. The payment location that the capability enables functionality for.
*/
@SerializedName("location")
String location;
@@ -109,8 +109,8 @@ public Builder putAllExtraParam(Map map) {
}
/**
- * Required. The payment location for which the capability enables
- * functionality.
+ * Required. The payment location that the capability enables functionality
+ * for.
*/
public Builder setLocation(String location) {
this.location = location;
diff --git a/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java b/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java
index 154ad13f7fb..b964a086884 100644
--- a/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java
@@ -27,7 +27,7 @@ public class PaymentLocationCapabilityUpdateParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Required. The location for which the capability enables functionality. */
+ /** Required. The location that the capability enables functionality for. */
@SerializedName("location")
Object location;
@@ -117,13 +117,13 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Required. The location for which the capability enables functionality. */
+ /** Required. The location that the capability enables functionality for. */
public Builder setLocation(String location) {
this.location = location;
return this;
}
- /** Required. The location for which the capability enables functionality. */
+ /** Required. The location that the capability enables functionality for. */
public Builder setLocation(EmptyParam location) {
this.location = location;
return this;
diff --git a/src/main/java/com/stripe/param/PaymentLocationListParams.java b/src/main/java/com/stripe/param/PaymentLocationListParams.java
index 176017026c2..6154d51be5c 100644
--- a/src/main/java/com/stripe/param/PaymentLocationListParams.java
+++ b/src/main/java/com/stripe/param/PaymentLocationListParams.java
@@ -13,6 +13,15 @@
@Getter
@EqualsAndHashCode(callSuper = false)
public class PaymentLocationListParams extends ApiRequestParams {
+ /**
+ * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, starting with
+ * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
+ * fetch the previous page of the list.
+ */
+ @SerializedName("ending_before")
+ String endingBefore;
+
/** Specifies which fields in the response should be expanded. */
@SerializedName("expand")
List expand;
@@ -26,9 +35,33 @@ public class PaymentLocationListParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- private PaymentLocationListParams(List expand, Map extraParams) {
+ /**
+ * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
+ * default is 10.
+ */
+ @SerializedName("limit")
+ Long limit;
+
+ /**
+ * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, ending with
+ * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to
+ * fetch the next page of the list.
+ */
+ @SerializedName("starting_after")
+ String startingAfter;
+
+ private PaymentLocationListParams(
+ String endingBefore,
+ List expand,
+ Map extraParams,
+ Long limit,
+ String startingAfter) {
+ this.endingBefore = endingBefore;
this.expand = expand;
this.extraParams = extraParams;
+ this.limit = limit;
+ this.startingAfter = startingAfter;
}
public static Builder builder() {
@@ -36,13 +69,31 @@ public static Builder builder() {
}
public static class Builder {
+ private String endingBefore;
+
private List expand;
private Map extraParams;
+ private Long limit;
+
+ private String startingAfter;
+
/** Finalize and obtain parameter instance from this builder. */
public PaymentLocationListParams build() {
- return new PaymentLocationListParams(this.expand, this.extraParams);
+ return new PaymentLocationListParams(
+ this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter);
+ }
+
+ /**
+ * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, starting with
+ * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
+ * fetch the previous page of the list.
+ */
+ public Builder setEndingBefore(String endingBefore) {
+ this.endingBefore = endingBefore;
+ return this;
}
/**
@@ -96,5 +147,25 @@ public Builder putAllExtraParam(Map map) {
this.extraParams.putAll(map);
return this;
}
+
+ /**
+ * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
+ * default is 10.
+ */
+ public Builder setLimit(Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
+ * place in the list. For instance, if you make a list request and receive 100 objects, ending
+ * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
+ * order to fetch the next page of the list.
+ */
+ public Builder setStartingAfter(String startingAfter) {
+ this.startingAfter = startingAfter;
+ return this;
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentLocationUpdateParams.java b/src/main/java/com/stripe/param/PaymentLocationUpdateParams.java
index 59e7b3cc84f..89add8c6176 100644
--- a/src/main/java/com/stripe/param/PaymentLocationUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentLocationUpdateParams.java
@@ -40,9 +40,9 @@ public class PaymentLocationUpdateParams extends ApiRequestParams {
Map extraParams;
/**
- * Pass true when updating location fields that will trigger onboarding review for any of the
- * location's active location capabilities. If this parameter is not set to true, updates that
- * would trigger onboarding review will fail. Only applicable for locations with active location
+ * Pass true when updating location fields that trigger onboarding review for any of the
+ * location's active location capabilities. If this parameter isn't set to true, updates that
+ * would trigger onboarding review fail. Only applicable for locations with active location
* capabilities.
*/
@SerializedName("onboarding_data_update_acknowledged")
@@ -169,9 +169,9 @@ public Builder putAllExtraParam(Map map) {
}
/**
- * Pass true when updating location fields that will trigger onboarding review for any of the
- * location's active location capabilities. If this parameter is not set to true, updates that
- * would trigger onboarding review will fail. Only applicable for locations with active location
+ * Pass true when updating location fields that trigger onboarding review for any of the
+ * location's active location capabilities. If this parameter isn't set to true, updates that
+ * would trigger onboarding review fail. Only applicable for locations with active location
* capabilities.
*/
public Builder setOnboardingDataUpdateAcknowledged(Boolean onboardingDataUpdateAcknowledged) {
diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java
index eb1603b35ad..61a2d71b142 100644
--- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java
@@ -6404,13 +6404,6 @@ public static class PaymentMethodOptions {
@SerializedName("us_bank_account")
Object usBankAccount;
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to the
- * invoice’s PaymentIntent.
- */
- @SerializedName("wechat_pay")
- Object wechatPay;
-
private PaymentMethodOptions(
Object acssDebit,
Object bancontact,
@@ -6426,8 +6419,7 @@ private PaymentMethodOptions(
Object pix,
Object sepaDebit,
Object upi,
- Object usBankAccount,
- Object wechatPay) {
+ Object usBankAccount) {
this.acssDebit = acssDebit;
this.bancontact = bancontact;
this.bizum = bizum;
@@ -6443,7 +6435,6 @@ private PaymentMethodOptions(
this.sepaDebit = sepaDebit;
this.upi = upi;
this.usBankAccount = usBankAccount;
- this.wechatPay = wechatPay;
}
public static Builder builder() {
@@ -6481,8 +6472,6 @@ public static class Builder {
private Object usBankAccount;
- private Object wechatPay;
-
/** Finalize and obtain parameter instance from this builder. */
public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() {
return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions(
@@ -6500,8 +6489,7 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() {
this.pix,
this.sepaDebit,
this.upi,
- this.usBankAccount,
- this.wechatPay);
+ this.usBankAccount);
}
/**
@@ -6802,25 +6790,6 @@ public Builder setUsBankAccount(EmptyParam usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
-
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to the
- * invoice’s PaymentIntent.
- */
- public Builder setWechatPay(
- SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
-
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to the
- * invoice’s PaymentIntent.
- */
- public Builder setWechatPay(EmptyParam wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
}
@Getter
@@ -9606,123 +9575,6 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam {
}
}
}
-
- @Getter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- String appId;
-
- /** The client type that the end customer will pay from. */
- @SerializedName("client")
- Client client;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private WechatPay(String appId, Client client, Map extraParams) {
- this.appId = appId;
- this.client = client;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String appId;
-
- private Client client;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay build() {
- return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay(
- this.appId, this.client, this.extraParams);
- }
-
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or
- * {@code android}.
- */
- public Builder setAppId(String appId) {
- this.appId = appId;
- return this;
- }
-
- /** The client type that the end customer will pay from. */
- public Builder setClient(
- SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay.Client
- client) {
- this.client = client;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams}
- * for the field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams}
- * for the field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
-
- public enum Client implements ApiRequestParams.EnumParam {
- @SerializedName("android")
- ANDROID("android"),
-
- @SerializedName("ios")
- IOS("ios"),
-
- @SerializedName("mobile_web")
- MOBILE_WEB("mobile_web"),
-
- @SerializedName("web")
- WEB("web");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Client(String value) {
- this.value = value;
- }
- }
- }
}
public enum PaymentMethodType implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java
index 6b11cd25d44..566888d4a76 100644
--- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java
@@ -6489,13 +6489,6 @@ public static class PaymentMethodOptions {
@SerializedName("us_bank_account")
Object usBankAccount;
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to the
- * invoice’s PaymentIntent.
- */
- @SerializedName("wechat_pay")
- Object wechatPay;
-
private PaymentMethodOptions(
Object acssDebit,
Object bancontact,
@@ -6511,8 +6504,7 @@ private PaymentMethodOptions(
Object pix,
Object sepaDebit,
Object upi,
- Object usBankAccount,
- Object wechatPay) {
+ Object usBankAccount) {
this.acssDebit = acssDebit;
this.bancontact = bancontact;
this.bizum = bizum;
@@ -6528,7 +6520,6 @@ private PaymentMethodOptions(
this.sepaDebit = sepaDebit;
this.upi = upi;
this.usBankAccount = usBankAccount;
- this.wechatPay = wechatPay;
}
public static Builder builder() {
@@ -6566,8 +6557,6 @@ public static class Builder {
private Object usBankAccount;
- private Object wechatPay;
-
/** Finalize and obtain parameter instance from this builder. */
public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() {
return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions(
@@ -6585,8 +6574,7 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() {
this.pix,
this.sepaDebit,
this.upi,
- this.usBankAccount,
- this.wechatPay);
+ this.usBankAccount);
}
/**
@@ -6887,25 +6875,6 @@ public Builder setUsBankAccount(EmptyParam usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
-
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to the
- * invoice’s PaymentIntent.
- */
- public Builder setWechatPay(
- SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
-
- /**
- * This sub-hash contains details about the WeChat Pay payment method options to pass to the
- * invoice’s PaymentIntent.
- */
- public Builder setWechatPay(EmptyParam wechatPay) {
- this.wechatPay = wechatPay;
- return this;
- }
}
@Getter
@@ -9753,132 +9722,6 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam {
}
}
}
-
- @Getter
- @EqualsAndHashCode(callSuper = false)
- public static class WechatPay {
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or {@code
- * android}.
- */
- @SerializedName("app_id")
- Object appId;
-
- /** The client type that the end customer will pay from. */
- @SerializedName("client")
- Client client;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private WechatPay(Object appId, Client client, Map extraParams) {
- this.appId = appId;
- this.client = client;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object appId;
-
- private Client client;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay build() {
- return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay(
- this.appId, this.client, this.extraParams);
- }
-
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or
- * {@code android}.
- */
- public Builder setAppId(String appId) {
- this.appId = appId;
- return this;
- }
-
- /**
- * The app ID registered with WeChat Pay. Only required when client is {@code ios} or
- * {@code android}.
- */
- public Builder setAppId(EmptyParam appId) {
- this.appId = appId;
- return this;
- }
-
- /** The client type that the end customer will pay from. */
- public Builder setClient(
- SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay.Client
- client) {
- this.client = client;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams}
- * for the field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link
- * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.WechatPay#extraParams}
- * for the field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
-
- public enum Client implements ApiRequestParams.EnumParam {
- @SerializedName("android")
- ANDROID("android"),
-
- @SerializedName("ios")
- IOS("ios"),
-
- @SerializedName("mobile_web")
- MOBILE_WEB("mobile_web"),
-
- @SerializedName("web")
- WEB("web");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Client(String value) {
- this.value = value;
- }
- }
- }
}
public enum PaymentMethodType implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionListOrdersParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionListOrdersParams.java
new file mode 100644
index 00000000000..4aa3d0d246a
--- /dev/null
+++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionListOrdersParams.java
@@ -0,0 +1,171 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.delegatedcheckout;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class RequestedSessionListOrdersParams extends ApiRequestParams {
+ /**
+ * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, starting with
+ * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
+ * fetch the previous page of the list.
+ */
+ @SerializedName("ending_before")
+ String endingBefore;
+
+ /** Specifies which fields in the response should be expanded. */
+ @SerializedName("expand")
+ List expand;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
+ * default is 10.
+ */
+ @SerializedName("limit")
+ Long limit;
+
+ /**
+ * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, ending with
+ * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to
+ * fetch the next page of the list.
+ */
+ @SerializedName("starting_after")
+ String startingAfter;
+
+ private RequestedSessionListOrdersParams(
+ String endingBefore,
+ List expand,
+ Map extraParams,
+ Long limit,
+ String startingAfter) {
+ this.endingBefore = endingBefore;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.limit = limit;
+ this.startingAfter = startingAfter;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String endingBefore;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private Long limit;
+
+ private String startingAfter;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RequestedSessionListOrdersParams build() {
+ return new RequestedSessionListOrdersParams(
+ this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter);
+ }
+
+ /**
+ * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, starting with
+ * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
+ * fetch the previous page of the list.
+ */
+ public Builder setEndingBefore(String endingBefore) {
+ this.endingBefore = endingBefore;
+ return this;
+ }
+
+ /**
+ * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * RequestedSessionListOrdersParams#expand} for the field documentation.
+ */
+ public Builder addExpand(String element) {
+ if (this.expand == null) {
+ this.expand = new ArrayList<>();
+ }
+ this.expand.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * RequestedSessionListOrdersParams#expand} for the field documentation.
+ */
+ public Builder addAllExpand(List elements) {
+ if (this.expand == null) {
+ this.expand = new ArrayList<>();
+ }
+ this.expand.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * RequestedSessionListOrdersParams#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link RequestedSessionListOrdersParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
+ * default is 10.
+ */
+ public Builder setLimit(Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
+ * place in the list. For instance, if you make a list request and receive 100 objects, ending
+ * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
+ * order to fetch the next page of the list.
+ */
+ public Builder setStartingAfter(String startingAfter) {
+ this.startingAfter = startingAfter;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionOrderListParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionOrderListParams.java
new file mode 100644
index 00000000000..ac470588ce9
--- /dev/null
+++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionOrderListParams.java
@@ -0,0 +1,171 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.delegatedcheckout;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class RequestedSessionOrderListParams extends ApiRequestParams {
+ /**
+ * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, starting with
+ * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
+ * fetch the previous page of the list.
+ */
+ @SerializedName("ending_before")
+ String endingBefore;
+
+ /** Specifies which fields in the response should be expanded. */
+ @SerializedName("expand")
+ List expand;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
+ * default is 10.
+ */
+ @SerializedName("limit")
+ Long limit;
+
+ /**
+ * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, ending with
+ * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to
+ * fetch the next page of the list.
+ */
+ @SerializedName("starting_after")
+ String startingAfter;
+
+ private RequestedSessionOrderListParams(
+ String endingBefore,
+ List expand,
+ Map extraParams,
+ Long limit,
+ String startingAfter) {
+ this.endingBefore = endingBefore;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.limit = limit;
+ this.startingAfter = startingAfter;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String endingBefore;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private Long limit;
+
+ private String startingAfter;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RequestedSessionOrderListParams build() {
+ return new RequestedSessionOrderListParams(
+ this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter);
+ }
+
+ /**
+ * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
+ * in the list. For instance, if you make a list request and receive 100 objects, starting with
+ * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
+ * fetch the previous page of the list.
+ */
+ public Builder setEndingBefore(String endingBefore) {
+ this.endingBefore = endingBefore;
+ return this;
+ }
+
+ /**
+ * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * RequestedSessionOrderListParams#expand} for the field documentation.
+ */
+ public Builder addExpand(String element) {
+ if (this.expand == null) {
+ this.expand = new ArrayList<>();
+ }
+ this.expand.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * RequestedSessionOrderListParams#expand} for the field documentation.
+ */
+ public Builder addAllExpand(List elements) {
+ if (this.expand == null) {
+ this.expand = new ArrayList<>();
+ }
+ this.expand.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * RequestedSessionOrderListParams#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link RequestedSessionOrderListParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
+ * default is 10.
+ */
+ public Builder setLimit(Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
+ * place in the list. For instance, if you make a list request and receive 100 objects, ending
+ * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
+ * order to fetch the next page of the list.
+ */
+ public Builder setStartingAfter(String startingAfter) {
+ this.startingAfter = startingAfter;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java
index ad6d1f306c8..8bb816c2691 100644
--- a/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java
+++ b/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java
@@ -617,7 +617,7 @@ public static class CardDetails {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** The last 4 digits of the card number. */
+ /** Required. The last 4 digits of the card number. */
@SerializedName("last4")
String last4;
@@ -732,7 +732,7 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** The last 4 digits of the card number. */
+ /** Required. The last 4 digits of the card number. */
public Builder setLast4(String last4) {
this.last4 = last4;
return this;
diff --git a/src/main/java/com/stripe/param/v2/billing/ContractActivateParams.java b/src/main/java/com/stripe/param/v2/billing/ContractActivateParams.java
new file mode 100644
index 00000000000..795831c4c25
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/ContractActivateParams.java
@@ -0,0 +1,125 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class ContractActivateParams extends ApiRequestParams {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Additional fields to include in the response. */
+ @SerializedName("include")
+ List include;
+
+ private ContractActivateParams(
+ Map extraParams, List include) {
+ this.extraParams = extraParams;
+ this.include = include;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private List include;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractActivateParams build() {
+ return new ContractActivateParams(this.extraParams, this.include);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractActivateParams#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractActivateParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * ContractActivateParams#include} for the field documentation.
+ */
+ public Builder addInclude(ContractActivateParams.Include element) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `include` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * ContractActivateParams#include} for the field documentation.
+ */
+ public Builder addAllInclude(List elements) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.addAll(elements);
+ return this;
+ }
+ }
+
+ public enum Include implements ApiRequestParams.EnumParam {
+ @SerializedName("contract_line_details")
+ CONTRACT_LINE_DETAILS("contract_line_details"),
+
+ @SerializedName("license_quantities")
+ LICENSE_QUANTITIES("license_quantities"),
+
+ @SerializedName("one_time_fees")
+ ONE_TIME_FEES("one_time_fees"),
+
+ @SerializedName("pricing_lines")
+ PRICING_LINES("pricing_lines"),
+
+ @SerializedName("pricing_overrides")
+ PRICING_OVERRIDES("pricing_overrides");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Include(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/ContractCancelParams.java b/src/main/java/com/stripe/param/v2/billing/ContractCancelParams.java
new file mode 100644
index 00000000000..d0bfe358305
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/ContractCancelParams.java
@@ -0,0 +1,125 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class ContractCancelParams extends ApiRequestParams {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Additional fields to include in the response. */
+ @SerializedName("include")
+ List include;
+
+ private ContractCancelParams(
+ Map extraParams, List include) {
+ this.extraParams = extraParams;
+ this.include = include;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private List include;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCancelParams build() {
+ return new ContractCancelParams(this.extraParams, this.include);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractCancelParams#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractCancelParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * ContractCancelParams#include} for the field documentation.
+ */
+ public Builder addInclude(ContractCancelParams.Include element) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `include` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCancelParams#include} for the field documentation.
+ */
+ public Builder addAllInclude(List elements) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.addAll(elements);
+ return this;
+ }
+ }
+
+ public enum Include implements ApiRequestParams.EnumParam {
+ @SerializedName("contract_line_details")
+ CONTRACT_LINE_DETAILS("contract_line_details"),
+
+ @SerializedName("license_quantities")
+ LICENSE_QUANTITIES("license_quantities"),
+
+ @SerializedName("one_time_fees")
+ ONE_TIME_FEES("one_time_fees"),
+
+ @SerializedName("pricing_lines")
+ PRICING_LINES("pricing_lines"),
+
+ @SerializedName("pricing_overrides")
+ PRICING_OVERRIDES("pricing_overrides");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Include(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/ContractCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ContractCreateParams.java
new file mode 100644
index 00000000000..7b9e57dba91
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/ContractCreateParams.java
@@ -0,0 +1,6224 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.StringInt64TypeAdapter;
+import com.stripe.net.ApiRequestParams;
+import java.math.BigDecimal;
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class ContractCreateParams extends ApiRequestParams {
+ /** The billing settings for the contract. */
+ @SerializedName("billing_settings")
+ BillingSettings billingSettings;
+
+ /** Required. A list of contract lines to create with the contract. */
+ @SerializedName("contract_lines")
+ List contractLines;
+
+ /** Required. A unique user-provided contract number e.g. C-2026-0001. */
+ @SerializedName("contract_number")
+ String contractNumber;
+
+ /** Required. Currency of the contract. */
+ @SerializedName("currency")
+ String currency;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Additional fields to include in the response. */
+ @SerializedName("include")
+ List include;
+
+ /** Required. A list of license quantity actions to create with the contract. */
+ @SerializedName("license_quantity_actions")
+ List licenseQuantityActions;
+
+ /** Set of key-value pairs that you can attach to an object. */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /**
+ * A list of one-time fees to create with the contract. Each fee is billed as individual invoice
+ * items per its bill_schedule.
+ */
+ @SerializedName("one_time_fees")
+ List oneTimeFees;
+
+ /** Required. A list of pricing lines to create with the contract. */
+ @SerializedName("pricing_lines")
+ List pricingLines;
+
+ /** Required. A list of pricing overrides to create with the contract. */
+ @SerializedName("pricing_overrides")
+ List pricingOverrides;
+
+ private ContractCreateParams(
+ BillingSettings billingSettings,
+ List contractLines,
+ String contractNumber,
+ String currency,
+ Map extraParams,
+ List include,
+ List licenseQuantityActions,
+ Map metadata,
+ List oneTimeFees,
+ List pricingLines,
+ List pricingOverrides) {
+ this.billingSettings = billingSettings;
+ this.contractLines = contractLines;
+ this.contractNumber = contractNumber;
+ this.currency = currency;
+ this.extraParams = extraParams;
+ this.include = include;
+ this.licenseQuantityActions = licenseQuantityActions;
+ this.metadata = metadata;
+ this.oneTimeFees = oneTimeFees;
+ this.pricingLines = pricingLines;
+ this.pricingOverrides = pricingOverrides;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private BillingSettings billingSettings;
+
+ private List contractLines;
+
+ private String contractNumber;
+
+ private String currency;
+
+ private Map extraParams;
+
+ private List include;
+
+ private List licenseQuantityActions;
+
+ private Map metadata;
+
+ private List oneTimeFees;
+
+ private List pricingLines;
+
+ private List pricingOverrides;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams build() {
+ return new ContractCreateParams(
+ this.billingSettings,
+ this.contractLines,
+ this.contractNumber,
+ this.currency,
+ this.extraParams,
+ this.include,
+ this.licenseQuantityActions,
+ this.metadata,
+ this.oneTimeFees,
+ this.pricingLines,
+ this.pricingOverrides);
+ }
+
+ /** The billing settings for the contract. */
+ public Builder setBillingSettings(ContractCreateParams.BillingSettings billingSettings) {
+ this.billingSettings = billingSettings;
+ return this;
+ }
+
+ /**
+ * Add an element to `contractLines` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#contractLines} for the field documentation.
+ */
+ public Builder addContractLine(ContractCreateParams.ContractLine element) {
+ if (this.contractLines == null) {
+ this.contractLines = new ArrayList<>();
+ }
+ this.contractLines.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `contractLines` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#contractLines} for the field documentation.
+ */
+ public Builder addAllContractLine(List elements) {
+ if (this.contractLines == null) {
+ this.contractLines = new ArrayList<>();
+ }
+ this.contractLines.addAll(elements);
+ return this;
+ }
+
+ /** Required. A unique user-provided contract number e.g. C-2026-0001. */
+ public Builder setContractNumber(String contractNumber) {
+ this.contractNumber = contractNumber;
+ return this;
+ }
+
+ /** Required. Currency of the contract. */
+ public Builder setCurrency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractCreateParams#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractCreateParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#include} for the field documentation.
+ */
+ public Builder addInclude(ContractCreateParams.Include element) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `include` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#include} for the field documentation.
+ */
+ public Builder addAllInclude(List elements) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add an element to `licenseQuantityActions` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link ContractCreateParams#licenseQuantityActions} for the field documentation.
+ */
+ public Builder addLicenseQuantityAction(ContractCreateParams.LicenseQuantityAction element) {
+ if (this.licenseQuantityActions == null) {
+ this.licenseQuantityActions = new ArrayList<>();
+ }
+ this.licenseQuantityActions.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `licenseQuantityActions` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link ContractCreateParams#licenseQuantityActions} for the field documentation.
+ */
+ public Builder addAllLicenseQuantityAction(
+ List elements) {
+ if (this.licenseQuantityActions == null) {
+ this.licenseQuantityActions = new ArrayList<>();
+ }
+ this.licenseQuantityActions.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
+ * and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractCreateParams#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `metadata` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractCreateParams#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `oneTimeFees` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#oneTimeFees} for the field documentation.
+ */
+ public Builder addOneTimeFee(ContractCreateParams.OneTimeFee element) {
+ if (this.oneTimeFees == null) {
+ this.oneTimeFees = new ArrayList<>();
+ }
+ this.oneTimeFees.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `oneTimeFees` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#oneTimeFees} for the field documentation.
+ */
+ public Builder addAllOneTimeFee(List elements) {
+ if (this.oneTimeFees == null) {
+ this.oneTimeFees = new ArrayList<>();
+ }
+ this.oneTimeFees.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add an element to `pricingLines` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#pricingLines} for the field documentation.
+ */
+ public Builder addPricingLine(ContractCreateParams.PricingLine element) {
+ if (this.pricingLines == null) {
+ this.pricingLines = new ArrayList<>();
+ }
+ this.pricingLines.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `pricingLines` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#pricingLines} for the field documentation.
+ */
+ public Builder addAllPricingLine(List elements) {
+ if (this.pricingLines == null) {
+ this.pricingLines = new ArrayList<>();
+ }
+ this.pricingLines.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add an element to `pricingOverrides` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#pricingOverrides} for the field documentation.
+ */
+ public Builder addPricingOverride(ContractCreateParams.PricingOverride element) {
+ if (this.pricingOverrides == null) {
+ this.pricingOverrides = new ArrayList<>();
+ }
+ this.pricingOverrides.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `pricingOverrides` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams#pricingOverrides} for the field documentation.
+ */
+ public Builder addAllPricingOverride(List elements) {
+ if (this.pricingOverrides == null) {
+ this.pricingOverrides = new ArrayList<>();
+ }
+ this.pricingOverrides.addAll(elements);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingSettings {
+ /** Billing settings details for the contract. */
+ @SerializedName("contract_billing_details")
+ ContractBillingDetails contractBillingDetails;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private BillingSettings(
+ ContractBillingDetails contractBillingDetails, Map extraParams) {
+ this.contractBillingDetails = contractBillingDetails;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private ContractBillingDetails contractBillingDetails;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings build() {
+ return new ContractCreateParams.BillingSettings(
+ this.contractBillingDetails, this.extraParams);
+ }
+
+ /** Billing settings details for the contract. */
+ public Builder setContractBillingDetails(
+ ContractCreateParams.BillingSettings.ContractBillingDetails contractBillingDetails) {
+ this.contractBillingDetails = contractBillingDetails;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractCreateParams.BillingSettings#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractCreateParams.BillingSettings#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ContractBillingDetails {
+ /** The bill settings details. */
+ @SerializedName("bill_settings_details")
+ BillSettingsDetails billSettingsDetails;
+
+ /** Required. The billing profile details. */
+ @SerializedName("billing_profile_details")
+ BillingProfileDetails billingProfileDetails;
+
+ /** Required. The collection settings details. */
+ @SerializedName("collection_settings_details")
+ CollectionSettingsDetails collectionSettingsDetails;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private ContractBillingDetails(
+ BillSettingsDetails billSettingsDetails,
+ BillingProfileDetails billingProfileDetails,
+ CollectionSettingsDetails collectionSettingsDetails,
+ Map extraParams) {
+ this.billSettingsDetails = billSettingsDetails;
+ this.billingProfileDetails = billingProfileDetails;
+ this.collectionSettingsDetails = collectionSettingsDetails;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private BillSettingsDetails billSettingsDetails;
+
+ private BillingProfileDetails billingProfileDetails;
+
+ private CollectionSettingsDetails collectionSettingsDetails;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails(
+ this.billSettingsDetails,
+ this.billingProfileDetails,
+ this.collectionSettingsDetails,
+ this.extraParams);
+ }
+
+ /** The bill settings details. */
+ public Builder setBillSettingsDetails(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ billSettingsDetails) {
+ this.billSettingsDetails = billSettingsDetails;
+ return this;
+ }
+
+ /** Required. The billing profile details. */
+ public Builder setBillingProfileDetails(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillingProfileDetails
+ billingProfileDetails) {
+ this.billingProfileDetails = billingProfileDetails;
+ return this;
+ }
+
+ /** Required. The collection settings details. */
+ public Builder setCollectionSettingsDetails(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.CollectionSettingsDetails
+ collectionSettingsDetails) {
+ this.collectionSettingsDetails = collectionSettingsDetails;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.BillingSettings.ContractBillingDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.BillingSettings.ContractBillingDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillSettingsDetails {
+ /** Calculation settings. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Invoice settings. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ private BillSettingsDetails(
+ Calculation calculation, Map extraParams, Invoice invoice) {
+ this.calculation = calculation;
+ this.extraParams = extraParams;
+ this.invoice = invoice;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Calculation calculation;
+
+ private Map extraParams;
+
+ private Invoice invoice;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .BillSettingsDetails(this.calculation, this.extraParams, this.invoice);
+ }
+
+ /** Calculation settings. */
+ public Builder setCalculation(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Calculation
+ calculation) {
+ this.calculation = calculation;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Invoice settings. */
+ public Builder setInvoice(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Invoice
+ invoice) {
+ this.invoice = invoice;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Tax calculation settings. */
+ @SerializedName("tax")
+ Tax tax;
+
+ private Calculation(Map extraParams, Tax tax) {
+ this.extraParams = extraParams;
+ this.tax = tax;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Tax tax;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Calculation
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .BillSettingsDetails.Calculation(this.extraParams, this.tax);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Calculation#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Calculation#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Tax calculation settings. */
+ public Builder setTax(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Calculation.Tax
+ tax) {
+ this.tax = tax;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName}
+ * value. Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The type of tax calculation. */
+ @SerializedName("type")
+ Type type;
+
+ private Tax(Map extraParams, Type type) {
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Calculation.Tax
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .BillSettingsDetails.Calculation.Tax(this.extraParams, this.type);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Calculation.Tax#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the
+ * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Calculation.Tax#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The type of tax calculation. */
+ public Builder setType(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Calculation.Tax.Type
+ type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("manual")
+ MANUAL("manual");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** The number of time units before the invoice is past due. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ private Invoice(Map extraParams, TimeUntilDue timeUntilDue) {
+ this.extraParams = extraParams;
+ this.timeUntilDue = timeUntilDue;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private TimeUntilDue timeUntilDue;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Invoice
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .BillSettingsDetails.Invoice(this.extraParams, this.timeUntilDue);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Invoice#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Invoice#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** The number of time units before the invoice is past due. */
+ public Builder setTimeUntilDue(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Invoice.TimeUntilDue
+ timeUntilDue) {
+ this.timeUntilDue = timeUntilDue;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName}
+ * value. Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The interval unit. */
+ @SerializedName("interval")
+ Interval interval;
+
+ /** Required. The number of intervals. */
+ @SerializedName("interval_count")
+ Long intervalCount;
+
+ private TimeUntilDue(
+ Map extraParams, Interval interval, Long intervalCount) {
+ this.extraParams = extraParams;
+ this.interval = interval;
+ this.intervalCount = intervalCount;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Interval interval;
+
+ private Long intervalCount;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Invoice.TimeUntilDue
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .BillSettingsDetails.Invoice.TimeUntilDue(
+ this.extraParams, this.interval, this.intervalCount);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Invoice.TimeUntilDue#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the
+ * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails.Invoice.TimeUntilDue#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The interval unit. */
+ public Builder setInterval(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.BillSettingsDetails
+ .Invoice.TimeUntilDue.Interval
+ interval) {
+ this.interval = interval;
+ return this;
+ }
+
+ /** Required. The number of intervals. */
+ public Builder setIntervalCount(Long intervalCount) {
+ this.intervalCount = intervalCount;
+ return this;
+ }
+ }
+
+ public enum Interval implements ApiRequestParams.EnumParam {
+ @SerializedName("day")
+ DAY("day"),
+
+ @SerializedName("month")
+ MONTH("month"),
+
+ @SerializedName("week")
+ WEEK("week"),
+
+ @SerializedName("year")
+ YEAR("year");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Interval(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingProfileDetails {
+ /** Required. The customer who pays for the contract invoice. */
+ @SerializedName("customer")
+ String customer;
+
+ /** The default payment method for the contract. */
+ @SerializedName("default_payment_method")
+ String defaultPaymentMethod;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private BillingProfileDetails(
+ String customer, String defaultPaymentMethod, Map extraParams) {
+ this.customer = customer;
+ this.defaultPaymentMethod = defaultPaymentMethod;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String customer;
+
+ private String defaultPaymentMethod;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails.BillingProfileDetails
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .BillingProfileDetails(this.customer, this.defaultPaymentMethod, this.extraParams);
+ }
+
+ /** Required. The customer who pays for the contract invoice. */
+ public Builder setCustomer(String customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /** The default payment method for the contract. */
+ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) {
+ this.defaultPaymentMethod = defaultPaymentMethod;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillingProfileDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.BillingProfileDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CollectionSettingsDetails {
+ /** Required. The collection method. */
+ @SerializedName("collection_method")
+ CollectionMethod collectionMethod;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** The payment method configuration. */
+ @SerializedName("payment_method_configuration")
+ String paymentMethodConfiguration;
+
+ private CollectionSettingsDetails(
+ CollectionMethod collectionMethod,
+ Map extraParams,
+ String paymentMethodConfiguration) {
+ this.collectionMethod = collectionMethod;
+ this.extraParams = extraParams;
+ this.paymentMethodConfiguration = paymentMethodConfiguration;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private CollectionMethod collectionMethod;
+
+ private Map extraParams;
+
+ private String paymentMethodConfiguration;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.BillingSettings.ContractBillingDetails
+ .CollectionSettingsDetails
+ build() {
+ return new ContractCreateParams.BillingSettings.ContractBillingDetails
+ .CollectionSettingsDetails(
+ this.collectionMethod, this.extraParams, this.paymentMethodConfiguration);
+ }
+
+ /** Required. The collection method. */
+ public Builder setCollectionMethod(
+ ContractCreateParams.BillingSettings.ContractBillingDetails.CollectionSettingsDetails
+ .CollectionMethod
+ collectionMethod) {
+ this.collectionMethod = collectionMethod;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.CollectionSettingsDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ContractCreateParams.BillingSettings.ContractBillingDetails.CollectionSettingsDetails#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** The payment method configuration. */
+ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) {
+ this.paymentMethodConfiguration = paymentMethodConfiguration;
+ return this;
+ }
+ }
+
+ public enum CollectionMethod implements ApiRequestParams.EnumParam {
+ @SerializedName("charge_automatically")
+ CHARGE_AUTOMATICALLY("charge_automatically"),
+
+ @SerializedName("send_invoice")
+ SEND_INVOICE("send_invoice");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ CollectionMethod(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ContractLine {
+ /** Required. Timestamp to indicate when the contract line ends. */
+ @SerializedName("ends_at")
+ EndsAt endsAt;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Set of key-value pairs that you can attach to an object. */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /**
+ * Required. List of overrides. Later overrides in the list override earlier
+ * ones.
+ */
+ @SerializedName("overrides")
+ List overrides;
+
+ /** Required. The pricing configuration for the contract line. */
+ @SerializedName("pricing")
+ Pricing pricing;
+
+ /** Required. Timestamp to indicate when the contract line starts. */
+ @SerializedName("starts_at")
+ StartsAt startsAt;
+
+ private ContractLine(
+ EndsAt endsAt,
+ Map extraParams,
+ Map metadata,
+ List overrides,
+ Pricing pricing,
+ StartsAt startsAt) {
+ this.endsAt = endsAt;
+ this.extraParams = extraParams;
+ this.metadata = metadata;
+ this.overrides = overrides;
+ this.pricing = pricing;
+ this.startsAt = startsAt;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private EndsAt endsAt;
+
+ private Map extraParams;
+
+ private Map metadata;
+
+ private List overrides;
+
+ private Pricing pricing;
+
+ private StartsAt startsAt;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.ContractLine build() {
+ return new ContractCreateParams.ContractLine(
+ this.endsAt,
+ this.extraParams,
+ this.metadata,
+ this.overrides,
+ this.pricing,
+ this.startsAt);
+ }
+
+ /** Required. Timestamp to indicate when the contract line ends. */
+ public Builder setEndsAt(ContractCreateParams.ContractLine.EndsAt endsAt) {
+ this.endsAt = endsAt;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractCreateParams.ContractLine#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractCreateParams.ContractLine#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * ContractCreateParams.ContractLine#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `metadata` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link ContractCreateParams.ContractLine#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `overrides` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams.ContractLine#overrides} for the field documentation.
+ */
+ public Builder addOverride(ContractCreateParams.ContractLine.Override element) {
+ if (this.overrides == null) {
+ this.overrides = new ArrayList<>();
+ }
+ this.overrides.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `overrides` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * ContractCreateParams.ContractLine#overrides} for the field documentation.
+ */
+ public Builder addAllOverride(List elements) {
+ if (this.overrides == null) {
+ this.overrides = new ArrayList<>();
+ }
+ this.overrides.addAll(elements);
+ return this;
+ }
+
+ /** Required. The pricing configuration for the contract line. */
+ public Builder setPricing(ContractCreateParams.ContractLine.Pricing pricing) {
+ this.pricing = pricing;
+ return this;
+ }
+
+ /** Required. Timestamp to indicate when the contract line starts. */
+ public Builder setStartsAt(ContractCreateParams.ContractLine.StartsAt startsAt) {
+ this.startsAt = startsAt;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndsAt {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The timestamp when the item ends. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+
+ private EndsAt(Map extraParams, Instant timestamp) {
+ this.extraParams = extraParams;
+ this.timestamp = timestamp;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Instant timestamp;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.ContractLine.EndsAt build() {
+ return new ContractCreateParams.ContractLine.EndsAt(this.extraParams, this.timestamp);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.EndsAt#extraParams} for the field
+ * documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.EndsAt#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The timestamp when the item ends. */
+ public Builder setTimestamp(Instant timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Override {
+ /** Required. Timestamp to indicate when the override ends. */
+ @SerializedName("ends_at")
+ EndsAt endsAt;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Service action override parameters. Required if {@code type} is {@code service_action}. */
+ @SerializedName("service_action")
+ ServiceAction serviceAction;
+
+ /** Required. Timestamp to indicate when the override starts. */
+ @SerializedName("starts_at")
+ StartsAt startsAt;
+
+ /** Required. The type of the override. */
+ @SerializedName("type")
+ Type type;
+
+ private Override(
+ EndsAt endsAt,
+ Map extraParams,
+ ServiceAction serviceAction,
+ StartsAt startsAt,
+ Type type) {
+ this.endsAt = endsAt;
+ this.extraParams = extraParams;
+ this.serviceAction = serviceAction;
+ this.startsAt = startsAt;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private EndsAt endsAt;
+
+ private Map extraParams;
+
+ private ServiceAction serviceAction;
+
+ private StartsAt startsAt;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.ContractLine.Override build() {
+ return new ContractCreateParams.ContractLine.Override(
+ this.endsAt, this.extraParams, this.serviceAction, this.startsAt, this.type);
+ }
+
+ /** Required. Timestamp to indicate when the override ends. */
+ public Builder setEndsAt(ContractCreateParams.ContractLine.Override.EndsAt endsAt) {
+ this.endsAt = endsAt;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.Override#extraParams} for the field
+ * documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.Override#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Service action override parameters. Required if {@code type} is {@code service_action}.
+ */
+ public Builder setServiceAction(
+ ContractCreateParams.ContractLine.Override.ServiceAction serviceAction) {
+ this.serviceAction = serviceAction;
+ return this;
+ }
+
+ /** Required. Timestamp to indicate when the override starts. */
+ public Builder setStartsAt(ContractCreateParams.ContractLine.Override.StartsAt startsAt) {
+ this.startsAt = startsAt;
+ return this;
+ }
+
+ /** Required. The type of the override. */
+ public Builder setType(ContractCreateParams.ContractLine.Override.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndsAt {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The timestamp when the item ends. */
+ @SerializedName("timestamp")
+ Instant timestamp;
+
+ private EndsAt(Map extraParams, Instant timestamp) {
+ this.extraParams = extraParams;
+ this.timestamp = timestamp;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Instant timestamp;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.ContractLine.Override.EndsAt build() {
+ return new ContractCreateParams.ContractLine.Override.EndsAt(
+ this.extraParams, this.timestamp);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.Override.EndsAt#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.Override.EndsAt#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The timestamp when the item ends. */
+ public Builder setTimestamp(Instant timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ServiceAction {
+ /** Parameters for adding a new service action. */
+ @SerializedName("add")
+ Add add;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Parameters for replacing an existing service action. */
+ @SerializedName("replace")
+ Replace replace;
+
+ /** Required. The type of service action override. */
+ @SerializedName("type")
+ Type type;
+
+ private ServiceAction(
+ Add add, Map extraParams, Replace replace, Type type) {
+ this.add = add;
+ this.extraParams = extraParams;
+ this.replace = replace;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Add add;
+
+ private Map extraParams;
+
+ private Replace replace;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.ContractLine.Override.ServiceAction build() {
+ return new ContractCreateParams.ContractLine.Override.ServiceAction(
+ this.add, this.extraParams, this.replace, this.type);
+ }
+
+ /** Parameters for adding a new service action. */
+ public Builder setAdd(ContractCreateParams.ContractLine.Override.ServiceAction.Add add) {
+ this.add = add;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.Override.ServiceAction#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ContractCreateParams.ContractLine.Override.ServiceAction#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Parameters for replacing an existing service action. */
+ public Builder setReplace(
+ ContractCreateParams.ContractLine.Override.ServiceAction.Replace replace) {
+ this.replace = replace;
+ return this;
+ }
+
+ /** Required. The type of service action override. */
+ public Builder setType(
+ ContractCreateParams.ContractLine.Override.ServiceAction.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Add {
+ /** Details for the credit grant. Required if {@code type} is {@code credit_grant}. */
+ @SerializedName("credit_grant")
+ CreditGrant creditGrant;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The interval for assessing service. */
+ @SerializedName("service_interval")
+ ServiceInterval serviceInterval;
+
+ /** Required. The length of the interval for assessing service. */
+ @SerializedName("service_interval_count")
+ Long serviceIntervalCount;
+
+ /** Required. The type of the service action. */
+ @SerializedName("type")
+ Type type;
+
+ private Add(
+ CreditGrant creditGrant,
+ Map extraParams,
+ ServiceInterval serviceInterval,
+ Long serviceIntervalCount,
+ Type type) {
+ this.creditGrant = creditGrant;
+ this.extraParams = extraParams;
+ this.serviceInterval = serviceInterval;
+ this.serviceIntervalCount = serviceIntervalCount;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private CreditGrant creditGrant;
+
+ private Map extraParams;
+
+ private ServiceInterval serviceInterval;
+
+ private Long serviceIntervalCount;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ContractCreateParams.ContractLine.Override.ServiceAction.Add build() {
+ return new ContractCreateParams.ContractLine.Override.ServiceAction.Add(
+ this.creditGrant,
+ this.extraParams,
+ this.serviceInterval,
+ this.serviceIntervalCount,
+ this.type);
+ }
+
+ /** Details for the credit grant. Required if {@code type} is {@code credit_grant}. */
+ public Builder setCreditGrant(
+ ContractCreateParams.ContractLine.Override.ServiceAction.Add.CreditGrant
+ creditGrant) {
+ this.creditGrant = creditGrant;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.ContractLine.Override.ServiceAction.Add#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * ContractCreateParams.ContractLine.Override.ServiceAction.Add#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map