One of {@code license_fee_subscription_details}, {@code rate_card_subscription_details},
+ * One of {@code pricing_plan_subscription_details}, {@code rate_card_subscription_details},
* {@code schedule_details}, or {@code subscription_details}.
*/
@SerializedName("type")
String type;
/**
- * For more details about LicenseFeeSubscriptionDetails, please refer to the API Reference.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
- public static class LicenseFeeSubscriptionDetails extends StripeObject {
- /** The license fee subscription that generated this invoice item. */
- @SerializedName("license_fee_subscription")
- String licenseFeeSubscription;
-
- /** The license fee version that generated this invoice item. */
- @SerializedName("license_fee_version")
- String licenseFeeVersion;
-
- /** The pricing plan subscription that manages the license fee subscription. */
+ public static class PricingPlanSubscriptionDetails extends StripeObject {
+ /** The pricing plan subscription that manages this charge. */
@SerializedName("pricing_plan_subscription")
String pricingPlanSubscription;
- /** The pricing plan version at the time this invoice item was generated. */
+ /** The pricing plan version at the time this charge was generated. */
@SerializedName("pricing_plan_version")
String pricingPlanVersion;
}
@@ -604,14 +596,6 @@ public static class LicenseFeeSubscriptionDetails extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class RateCardSubscriptionDetails extends StripeObject {
- /** The pricing plan subscription that manages the rate card subscription. */
- @SerializedName("pricing_plan_subscription")
- String pricingPlanSubscription;
-
- /** The pricing plan version at the time this invoice item was generated. */
- @SerializedName("pricing_plan_version")
- String pricingPlanVersion;
-
/** The rate card subscription that generated this invoice item. */
@SerializedName("rate_card_subscription")
String rateCardSubscription;
diff --git a/src/main/java/com/stripe/model/InvoiceLineItem.java b/src/main/java/com/stripe/model/InvoiceLineItem.java
index 6bedb4053c7..18eae958ab1 100644
--- a/src/main/java/com/stripe/model/InvoiceLineItem.java
+++ b/src/main/java/com/stripe/model/InvoiceLineItem.java
@@ -401,9 +401,9 @@ public static class Parent extends StripeObject {
@SerializedName("invoice_item_details")
InvoiceItemDetails invoiceItemDetails;
- /** Details about the license fee subscription that generated this line item. */
- @SerializedName("license_fee_subscription_details")
- LicenseFeeSubscriptionDetails licenseFeeSubscriptionDetails;
+ /** Details about the pricing plan subscription that generated this line item. */
+ @SerializedName("pricing_plan_subscription_details")
+ PricingPlanSubscriptionDetails pricingPlanSubscriptionDetails;
/** Details about the rate card subscription that generated this line item. */
@SerializedName("rate_card_subscription_details")
@@ -420,7 +420,7 @@ public static class Parent extends StripeObject {
/**
* The type of parent that generated this line item
*
- *
One of {@code invoice_item_details}, {@code license_fee_subscription_details}, {@code
+ *
One of {@code invoice_item_details}, {@code pricing_plan_subscription_details}, {@code
* rate_card_subscription_details}, {@code schedule_details}, or {@code
* subscription_item_details}.
*/
@@ -486,30 +486,22 @@ public static class CreditedItems extends StripeObject {
}
/**
- * For more details about LicenseFeeSubscriptionDetails, please refer to the API Reference.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
- public static class LicenseFeeSubscriptionDetails extends StripeObject {
+ public static class PricingPlanSubscriptionDetails extends StripeObject {
/** The invoice item that generated this line item. */
@SerializedName("invoice_item")
String invoiceItem;
- /** The license fee subscription that generated this line item. */
- @SerializedName("license_fee_subscription")
- String licenseFeeSubscription;
-
- /** The license fee version at the time this line item was generated. */
- @SerializedName("license_fee_version")
- String licenseFeeVersion;
-
- /** The pricing plan subscription that manages the license fee subscription. */
+ /** The pricing plan subscription that manages this charge. */
@SerializedName("pricing_plan_subscription")
String pricingPlanSubscription;
- /** The pricing plan version at the time this line item was generated. */
+ /** The pricing plan version at the time this charge was generated. */
@SerializedName("pricing_plan_version")
String pricingPlanVersion;
}
@@ -526,14 +518,6 @@ public static class RateCardSubscriptionDetails extends StripeObject {
@SerializedName("invoice_item")
String invoiceItem;
- /** The pricing plan subscription that manages the rate card subscription. */
- @SerializedName("pricing_plan_subscription")
- String pricingPlanSubscription;
-
- /** The pricing plan version at the time this line item was generated. */
- @SerializedName("pricing_plan_version")
- String pricingPlanVersion;
-
/** The rate card subscription that generated this line item. */
@SerializedName("rate_card_subscription")
String rateCardSubscription;
diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java
index 753f31823de..5115659da61 100644
--- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java
+++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java
@@ -10,6 +10,12 @@
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.PaymentAttemptRecordListParams;
+import com.stripe.param.PaymentAttemptRecordReportAuthenticatedParams;
+import com.stripe.param.PaymentAttemptRecordReportCanceledParams;
+import com.stripe.param.PaymentAttemptRecordReportFailedParams;
+import com.stripe.param.PaymentAttemptRecordReportGuaranteedParams;
+import com.stripe.param.PaymentAttemptRecordReportInformationalParams;
+import com.stripe.param.PaymentAttemptRecordReportRefundParams;
import com.stripe.param.PaymentAttemptRecordRetrieveParams;
import java.util.List;
import java.util.Map;
@@ -167,6 +173,306 @@ public static PaymentAttemptRecordCollection list(
return getGlobalResponseGetter().request(request, PaymentAttemptRecordCollection.class);
}
+ /** Report that the specified Payment Attempt Record was authenticated. */
+ public PaymentAttemptRecord reportAuthenticated() throws StripeException {
+ return reportAuthenticated((Map) null, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was authenticated. */
+ public PaymentAttemptRecord reportAuthenticated(RequestOptions options) throws StripeException {
+ return reportAuthenticated((Map) null, options);
+ }
+
+ /** Report that the specified Payment Attempt Record was authenticated. */
+ public PaymentAttemptRecord reportAuthenticated(Map params)
+ throws StripeException {
+ return reportAuthenticated(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was authenticated. */
+ public PaymentAttemptRecord reportAuthenticated(
+ Map params, RequestOptions options) throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_authenticated",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was authenticated. */
+ public PaymentAttemptRecord reportAuthenticated(
+ PaymentAttemptRecordReportAuthenticatedParams params) throws StripeException {
+ return reportAuthenticated(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was authenticated. */
+ public PaymentAttemptRecord reportAuthenticated(
+ PaymentAttemptRecordReportAuthenticatedParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_authenticated",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was canceled. */
+ public PaymentAttemptRecord reportCanceled() throws StripeException {
+ return reportCanceled((Map) null, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was canceled. */
+ public PaymentAttemptRecord reportCanceled(RequestOptions options) throws StripeException {
+ return reportCanceled((Map) null, options);
+ }
+
+ /** Report that the specified Payment Attempt Record was canceled. */
+ public PaymentAttemptRecord reportCanceled(Map params) throws StripeException {
+ return reportCanceled(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was canceled. */
+ public PaymentAttemptRecord reportCanceled(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_canceled",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was canceled. */
+ public PaymentAttemptRecord reportCanceled(PaymentAttemptRecordReportCanceledParams params)
+ throws StripeException {
+ return reportCanceled(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was canceled. */
+ public PaymentAttemptRecord reportCanceled(
+ PaymentAttemptRecordReportCanceledParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_canceled",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record failed. */
+ public PaymentAttemptRecord reportFailed() throws StripeException {
+ return reportFailed((Map) null, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record failed. */
+ public PaymentAttemptRecord reportFailed(RequestOptions options) throws StripeException {
+ return reportFailed((Map) null, options);
+ }
+
+ /** Report that the specified Payment Attempt Record failed. */
+ public PaymentAttemptRecord reportFailed(Map params) throws StripeException {
+ return reportFailed(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record failed. */
+ public PaymentAttemptRecord reportFailed(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_failed", ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record failed. */
+ public PaymentAttemptRecord reportFailed(PaymentAttemptRecordReportFailedParams params)
+ throws StripeException {
+ return reportFailed(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record failed. */
+ public PaymentAttemptRecord reportFailed(
+ PaymentAttemptRecordReportFailedParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_failed", ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was guaranteed. */
+ public PaymentAttemptRecord reportGuaranteed() throws StripeException {
+ return reportGuaranteed((Map) null, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was guaranteed. */
+ public PaymentAttemptRecord reportGuaranteed(RequestOptions options) throws StripeException {
+ return reportGuaranteed((Map) null, options);
+ }
+
+ /** Report that the specified Payment Attempt Record was guaranteed. */
+ public PaymentAttemptRecord reportGuaranteed(Map params) throws StripeException {
+ return reportGuaranteed(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was guaranteed. */
+ public PaymentAttemptRecord reportGuaranteed(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_guaranteed",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was guaranteed. */
+ public PaymentAttemptRecord reportGuaranteed(PaymentAttemptRecordReportGuaranteedParams params)
+ throws StripeException {
+ return reportGuaranteed(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was guaranteed. */
+ public PaymentAttemptRecord reportGuaranteed(
+ PaymentAttemptRecordReportGuaranteedParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_guaranteed",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report informational updates on the specified Payment Attempt Record. */
+ public PaymentAttemptRecord reportInformational() throws StripeException {
+ return reportInformational((Map) null, (RequestOptions) null);
+ }
+
+ /** Report informational updates on the specified Payment Attempt Record. */
+ public PaymentAttemptRecord reportInformational(RequestOptions options) throws StripeException {
+ return reportInformational((Map) null, options);
+ }
+
+ /** Report informational updates on the specified Payment Attempt Record. */
+ public PaymentAttemptRecord reportInformational(Map params)
+ throws StripeException {
+ return reportInformational(params, (RequestOptions) null);
+ }
+
+ /** Report informational updates on the specified Payment Attempt Record. */
+ public PaymentAttemptRecord reportInformational(
+ Map params, RequestOptions options) throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_informational",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report informational updates on the specified Payment Attempt Record. */
+ public PaymentAttemptRecord reportInformational(
+ PaymentAttemptRecordReportInformationalParams params) throws StripeException {
+ return reportInformational(params, (RequestOptions) null);
+ }
+
+ /** Report informational updates on the specified Payment Attempt Record. */
+ public PaymentAttemptRecord reportInformational(
+ PaymentAttemptRecordReportInformationalParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_informational",
+ ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was refunded. */
+ public PaymentAttemptRecord reportRefund(Map params) throws StripeException {
+ return reportRefund(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was refunded. */
+ public PaymentAttemptRecord reportRefund(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_refund", ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
+ /** Report that the specified Payment Attempt Record was refunded. */
+ public PaymentAttemptRecord reportRefund(PaymentAttemptRecordReportRefundParams params)
+ throws StripeException {
+ return reportRefund(params, (RequestOptions) null);
+ }
+
+ /** Report that the specified Payment Attempt Record was refunded. */
+ public PaymentAttemptRecord reportRefund(
+ PaymentAttemptRecordReportRefundParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_attempt_records/%s/report_refund", ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentAttemptRecord.class);
+ }
+
/** Retrieves a Payment Attempt Record with the given ID. */
public static PaymentAttemptRecord retrieve(String id) throws StripeException {
return retrieve(id, (Map) null, (RequestOptions) null);
diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java
index f6b686675e2..685007cc099 100644
--- a/src/main/java/com/stripe/model/PaymentRecord.java
+++ b/src/main/java/com/stripe/model/PaymentRecord.java
@@ -241,6 +241,16 @@ public PaymentRecord reportPaymentAttempt(
return getResponseGetter().request(request, PaymentRecord.class);
}
+ /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
+ public PaymentRecord reportPaymentAttemptCanceled() throws StripeException {
+ return reportPaymentAttemptCanceled((Map) null, (RequestOptions) null);
+ }
+
+ /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
+ public PaymentRecord reportPaymentAttemptCanceled(RequestOptions options) throws StripeException {
+ return reportPaymentAttemptCanceled((Map) null, options);
+ }
+
/** Report that the most recent payment attempt on the specified Payment Record was canceled. */
public PaymentRecord reportPaymentAttemptCanceled(Map params)
throws StripeException {
@@ -284,6 +294,20 @@ public PaymentRecord reportPaymentAttemptCanceled(
return getResponseGetter().request(request, PaymentRecord.class);
}
+ /**
+ * Report that the most recent payment attempt on the specified Payment Record failed or errored.
+ */
+ public PaymentRecord reportPaymentAttemptFailed() throws StripeException {
+ return reportPaymentAttemptFailed((Map) null, (RequestOptions) null);
+ }
+
+ /**
+ * Report that the most recent payment attempt on the specified Payment Record failed or errored.
+ */
+ public PaymentRecord reportPaymentAttemptFailed(RequestOptions options) throws StripeException {
+ return reportPaymentAttemptFailed((Map) null, options);
+ }
+
/**
* Report that the most recent payment attempt on the specified Payment Record failed or errored.
*/
@@ -335,6 +359,17 @@ public PaymentRecord reportPaymentAttemptFailed(
return getResponseGetter().request(request, PaymentRecord.class);
}
+ /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
+ public PaymentRecord reportPaymentAttemptGuaranteed() throws StripeException {
+ return reportPaymentAttemptGuaranteed((Map) null, (RequestOptions) null);
+ }
+
+ /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
+ public PaymentRecord reportPaymentAttemptGuaranteed(RequestOptions options)
+ throws StripeException {
+ return reportPaymentAttemptGuaranteed((Map) null, options);
+ }
+
/** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
public PaymentRecord reportPaymentAttemptGuaranteed(Map params)
throws StripeException {
diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java
index 01565a2a2cd..9cbc0bffc0d 100644
--- a/src/main/java/com/stripe/model/checkout/Session.java
+++ b/src/main/java/com/stripe/model/checkout/Session.java
@@ -26,6 +26,7 @@
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.checkout.SessionApproveParams;
import com.stripe.param.checkout.SessionCreateParams;
import com.stripe.param.checkout.SessionExpireParams;
import com.stripe.param.checkout.SessionListLineItemsParams;
@@ -82,6 +83,20 @@ public class Session extends ApiResource implements HasId, MetadataStoreDefault is {@code auto}, when the customer's attempt to pay is approved automatically with
+ * no action required on your server.
+ *
+ * When set to {@code manual}, you must approve the customer's attempt to pay by calling approve from your server.
+ *
+ *
One of {@code auto}, or {@code manual}.
+ */
+ @SerializedName("approval_method")
+ String approvalMethod;
+
@SerializedName("automatic_tax")
AutomaticTax automaticTax;
@@ -158,6 +173,13 @@ public class Session extends ApiResource implements HasId, MetadataStore(expandableObject.getId(), expandableObject);
}
+ /**
+ * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to
+ * {@code manual}.
+ */
+ public Session approve(Map params) throws StripeException {
+ return approve(params, (RequestOptions) null);
+ }
+
+ /**
+ * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to
+ * {@code manual}.
+ */
+ public Session approve(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format("/v1/checkout/sessions/%s/approve", ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, Session.class);
+ }
+
+ /**
+ * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to
+ * {@code manual}.
+ */
+ public Session approve(SessionApproveParams params) throws StripeException {
+ return approve(params, (RequestOptions) null);
+ }
+
+ /**
+ * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to
+ * {@code manual}.
+ */
+ public Session approve(SessionApproveParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format("/v1/checkout/sessions/%s/approve", ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, Session.class);
+ }
+
/** Creates a Checkout Session object. */
public static Session create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -1432,6 +1502,191 @@ public static class CurrencyConversion extends StripeObject {
String sourceCurrency;
}
+ /**
+ * For more details about CurrentAttempt, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CurrentAttempt extends StripeObject implements HasId {
+ /** The customer's billing information, if provided. */
+ @SerializedName("billing_details")
+ BillingDetails billingDetails;
+
+ /** The customer's email. */
+ @SerializedName("email")
+ String email;
+
+ /**
+ * The attempt ID you will pass to the Checkout Session
+ * approve endpoint to approve the attempt.
+ */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** Information about the payment method the customer is attempting to pay with. */
+ @SerializedName("payment_method_details")
+ PaymentMethodDetails paymentMethodDetails;
+
+ /** The customer's phone number. */
+ @SerializedName("phone")
+ String phone;
+
+ /** The customer's shipping information, if provided. */
+ @SerializedName("shipping_details")
+ ShippingDetails shippingDetails;
+
+ /**
+ * For more details about BillingDetails, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingDetails extends StripeObject {
+ @SerializedName("address")
+ Address address;
+
+ /** Customer name. */
+ @SerializedName("name")
+ String name;
+ }
+
+ /**
+ * For more details about PaymentMethodDetails, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentMethodDetails extends StripeObject {
+ /**
+ * Indicates whether this payment method can be shown again to its customer in a checkout
+ * flow.
+ *
+ * One of {@code always}, {@code limited}, or {@code unspecified}.
+ */
+ @SerializedName("allow_redisplay")
+ String allowRedisplay;
+
+ @SerializedName("card")
+ Card card;
+
+ /**
+ * The type of payment method the customer is attempting to pay with. An additional hash is
+ * included in the payment method details with a name matching this value. It contains
+ * additional information specific to the payment method type.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about Card, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Card extends StripeObject {
+ /**
+ * The brand of the card, accounting for customer's brand choice on dual-branded cards.
+ *
+ *
One of {@code accel}, {@code amex}, {@code carnet}, {@code cartes_bancaires}, {@code
+ * conecs}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code elo}, {@code
+ * girocard}, {@code interac}, {@code jcb}, {@code link}, {@code maestro}, {@code
+ * mastercard}, {@code nyce}, {@code pulse}, {@code rupay}, {@code star}, {@code unionpay},
+ * {@code unknown}, or {@code visa}.
+ */
+ @SerializedName("brand")
+ String brand;
+
+ /**
+ * Two-letter ISO code representing the country of the card. You could use this attribute to
+ * get a sense of the international breakdown of cards you've collected.
+ */
+ @SerializedName("country")
+ String country;
+
+ /** Two-digit number representing the card's expiration month. */
+ @SerializedName("exp_month")
+ Long expMonth;
+
+ /** Four-digit number representing the card's expiration year. */
+ @SerializedName("exp_year")
+ Long expYear;
+
+ /**
+ * Uniquely identifies this particular card number. You can use this attribute to check
+ * whether two customers who’ve signed up with you are using the same card number, for
+ * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
+ * tokenized number might be provided instead of the underlying card number.
+ *
+ *
As of May 1, 2021, card fingerprint in India for Connect changed to allow two
+ * fingerprints for the same card---one for India and one for the rest of the world.
+ */
+ @SerializedName("fingerprint")
+ String fingerprint;
+
+ /**
+ * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
+ * unknown}.
+ */
+ @SerializedName("funding")
+ String funding;
+
+ /**
+ * Issuer identification number of the card. (For internal use only and not typically
+ * available in standard API requests.)
+ */
+ @SerializedName("iin")
+ String iin;
+
+ /** The last four digits of the card. */
+ @SerializedName("last4")
+ String last4;
+
+ /** If this Card is part of a card wallet, this contains the details of the card wallet. */
+ @SerializedName("wallet")
+ Wallet wallet;
+
+ /**
+ * For more details about Wallet, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Wallet extends StripeObject {
+ /**
+ * The type of the wallet, one of {@code amex_express_checkout}, {@code apple_pay}, {@code
+ * google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, {@code
+ * meta_pay}, or {@code link}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+ }
+
+ /**
+ * For more details about ShippingDetails, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ShippingDetails extends StripeObject {
+ @SerializedName("address")
+ Address address;
+
+ /** Customer name. */
+ @SerializedName("name")
+ String name;
+ }
+ }
+
/**
* For more details about CustomField, please refer to the API Reference.
@@ -4730,6 +4985,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(consent, responseGetter);
trySetResponseGetter(consentCollection, responseGetter);
trySetResponseGetter(currencyConversion, responseGetter);
+ trySetResponseGetter(currentAttempt, responseGetter);
trySetResponseGetter(customText, responseGetter);
trySetResponseGetter(customer, responseGetter);
trySetResponseGetter(customerDetails, responseGetter);
diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java
index 80c1efef7f7..4e48b8d3bbd 100644
--- a/src/main/java/com/stripe/model/issuing/Authorization.java
+++ b/src/main/java/com/stripe/model/issuing/Authorization.java
@@ -214,6 +214,9 @@ public class Authorization extends ApiResource
@Setter(lombok.AccessLevel.NONE)
ExpandableField token;
+ @SerializedName("token_details")
+ TokenDetails tokenDetails;
+
/**
* List of transactions associated
* with this authorization.
@@ -1158,6 +1161,203 @@ public static class AmountDetails extends StripeObject {
}
}
+ /**
+ * For more details about TokenDetails, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TokenDetails extends StripeObject {
+ /** The card associated with this token. */
+ @SerializedName("card")
+ String card;
+
+ /** Time at which the object was created. Measured in seconds since the Unix epoch. */
+ @SerializedName("created")
+ Long created;
+
+ /** The hashed ID derived from the device ID from the card network associated with the token. */
+ @SerializedName("device_fingerprint")
+ String deviceFingerprint;
+
+ @SerializedName("network_data")
+ NetworkData networkData;
+
+ /**
+ * For more details about NetworkData, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class NetworkData extends StripeObject {
+ @SerializedName("device")
+ Device device;
+
+ @SerializedName("mastercard")
+ Mastercard mastercard;
+
+ /**
+ * The card network for this token.
+ *
+ * One of {@code mastercard}, or {@code visa}.
+ */
+ @SerializedName("type")
+ String type;
+
+ @SerializedName("visa")
+ Visa visa;
+
+ @SerializedName("wallet_provider")
+ WalletProvider walletProvider;
+
+ /**
+ * For more details about Device, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Device extends StripeObject {
+ /** The IP address of the device at provisioning time. */
+ @SerializedName("ip_address")
+ String ipAddress;
+
+ /**
+ * The ISO 639-1 language code of the device associated with the tokenization request.
+ *
+ *
One of {@code aa}, {@code ab}, {@code ae}, {@code af}, {@code ak}, {@code am}, {@code
+ * an}, {@code ar}, {@code as}, {@code av}, {@code ay}, {@code az}, {@code ba}, {@code be},
+ * {@code bg}, {@code bi}, {@code bm}, {@code bn}, {@code bo}, {@code br}, {@code bs},
+ * {@code ca}, {@code ce}, {@code ch}, {@code co}, {@code cr}, {@code cs}, {@code cu},
+ * {@code cv}, {@code cy}, {@code da}, {@code de}, {@code dv}, {@code dz}, {@code ee},
+ * {@code el}, {@code en}, {@code eo}, {@code es}, {@code et}, {@code eu}, {@code fa},
+ * {@code ff}, {@code fi}, {@code fj}, {@code fo}, {@code fr}, {@code fy}, {@code ga},
+ * {@code gd}, {@code gl}, {@code gn}, {@code gu}, {@code gv}, {@code ha}, {@code he},
+ * {@code hi}, {@code ho}, {@code hr}, {@code ht}, {@code hu}, {@code hy}, {@code hz},
+ * {@code ia}, {@code id}, {@code ie}, {@code ig}, {@code ii}, {@code ik}, {@code io},
+ * {@code is}, {@code it}, {@code iu}, {@code ja}, {@code jv}, {@code ka}, {@code kg},
+ * {@code ki}, {@code kj}, {@code kk}, {@code kl}, {@code km}, {@code kn}, {@code ko},
+ * {@code kr}, {@code ks}, {@code ku}, {@code kv}, {@code kw}, {@code ky}, {@code la},
+ * {@code lb}, {@code lg}, {@code li}, {@code ln}, {@code lo}, {@code lt}, {@code lu},
+ * {@code lv}, {@code mg}, {@code mh}, {@code mi}, {@code mk}, {@code ml}, {@code mn},
+ * {@code mr}, {@code ms}, {@code mt}, {@code my}, {@code na}, {@code nb}, {@code nd},
+ * {@code ne}, {@code ng}, {@code nl}, {@code nn}, {@code no}, {@code nr}, {@code nv},
+ * {@code ny}, {@code oc}, {@code oj}, {@code om}, {@code or}, {@code os}, {@code pa},
+ * {@code pi}, {@code pl}, {@code ps}, {@code pt}, {@code qu}, {@code rm}, {@code rn},
+ * {@code ro}, {@code ru}, {@code rw}, {@code sa}, {@code sc}, {@code sd}, {@code se},
+ * {@code sg}, {@code si}, {@code sk}, {@code sl}, {@code sm}, {@code sn}, {@code so},
+ * {@code sq}, {@code sr}, {@code ss}, {@code st}, {@code su}, {@code sv}, {@code sw},
+ * {@code ta}, {@code te}, {@code tg}, {@code th}, {@code ti}, {@code tk}, {@code tl},
+ * {@code tn}, {@code to}, {@code tr}, {@code ts}, {@code tt}, {@code tw}, {@code ty},
+ * {@code ug}, {@code uk}, {@code ur}, {@code uz}, {@code ve}, {@code vi}, {@code vo},
+ * {@code wa}, {@code wo}, {@code xh}, {@code yi}, {@code yo}, {@code za}, {@code zh}, or
+ * {@code zu}.
+ */
+ @SerializedName("language")
+ String language;
+
+ /** The phone number of the device used for tokenization. */
+ @SerializedName("phone_number")
+ String phoneNumber;
+ }
+
+ /**
+ * For more details about Mastercard, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Mastercard extends StripeObject {
+ /** A unique reference ID from the network to represent the card account number. */
+ @SerializedName("card_reference_id")
+ String cardReferenceId;
+
+ /** The network-unique identifier for the token. */
+ @SerializedName("token_reference_id")
+ String tokenReferenceId;
+
+ /** The ID of the entity requesting tokenization. */
+ @SerializedName("token_requestor_id")
+ String tokenRequestorId;
+ }
+
+ /**
+ * For more details about Visa, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Visa extends StripeObject {
+ /** A unique reference ID from the network to represent the card account number. */
+ @SerializedName("card_reference_id")
+ String cardReferenceId;
+
+ /** The network-unique identifier for the token. */
+ @SerializedName("token_reference_id")
+ String tokenReferenceId;
+
+ /** The ID of the entity requesting tokenization. */
+ @SerializedName("token_requestor_id")
+ String tokenRequestorId;
+
+ /**
+ * Degree of risk associated with the token between {@code 01} and {@code 99}, with higher
+ * number indicating higher risk. A {@code 00} value indicates the token was not scored by
+ * Visa.
+ */
+ @SerializedName("token_risk_score")
+ String tokenRiskScore;
+ }
+
+ /**
+ * For more details about WalletProvider, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class WalletProvider extends StripeObject {
+ /**
+ * An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher
+ * score indicates more trustworthy.
+ */
+ @SerializedName("account_trust_score")
+ Long accountTrustScore;
+
+ /**
+ * The method used for tokenizing a card.
+ *
+ *
One of {@code app}, {@code manual}, {@code on_file}, or {@code other}.
+ */
+ @SerializedName("card_number_source")
+ String cardNumberSource;
+
+ /**
+ * An evaluation on the trustworthiness of the device. A higher score indicates more
+ * trustworthy.
+ */
+ @SerializedName("device_trust_score")
+ Long deviceTrustScore;
+
+ /** The reasons for suggested tokenization given by the card network. */
+ @SerializedName("reason_codes")
+ List reasonCodes;
+
+ /**
+ * The recommendation on responding to the tokenization request.
+ *
+ * One of {@code approve}, {@code decline}, or {@code require_auth}.
+ */
+ @SerializedName("suggested_decision")
+ String suggestedDecision;
+ }
+ }
+ }
+
/**
* For more details about Treasury, please refer to the API
* Reference.
@@ -1642,6 +1842,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(networkData, responseGetter);
trySetResponseGetter(pendingRequest, responseGetter);
trySetResponseGetter(token, responseGetter);
+ trySetResponseGetter(tokenDetails, responseGetter);
trySetResponseGetter(treasury, responseGetter);
trySetResponseGetter(verificationData, responseGetter);
}
diff --git a/src/main/java/com/stripe/model/orchestration/PaymentAttempt.java b/src/main/java/com/stripe/model/orchestration/PaymentAttempt.java
new file mode 100644
index 00000000000..ba82c1ab212
--- /dev/null
+++ b/src/main/java/com/stripe/model/orchestration/PaymentAttempt.java
@@ -0,0 +1,87 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.orchestration;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+import com.stripe.model.HasId;
+import com.stripe.net.ApiRequest;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.net.ApiResource;
+import com.stripe.net.BaseAddress;
+import com.stripe.net.RequestOptions;
+import com.stripe.param.orchestration.PaymentAttemptRetrieveParams;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** Represents orchestration information for a payment attempt record (e.g. return url). */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class PaymentAttempt extends ApiResource implements HasId {
+ /** 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 orchestration.payment_attempt}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** If present, the return URL for this payment attempt. */
+ @SerializedName("return_url")
+ String returnUrl;
+
+ /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */
+ public static PaymentAttempt retrieve(String paymentAttemptRecord) throws StripeException {
+ return retrieve(paymentAttemptRecord, (Map) null, (RequestOptions) null);
+ }
+
+ /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */
+ public static PaymentAttempt retrieve(String paymentAttemptRecord, RequestOptions options)
+ throws StripeException {
+ return retrieve(paymentAttemptRecord, (Map) null, options);
+ }
+
+ /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */
+ public static PaymentAttempt retrieve(
+ String paymentAttemptRecord, Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/orchestration/payment_attempts/%s", ApiResource.urlEncodeId(paymentAttemptRecord));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
+ return getGlobalResponseGetter().request(request, PaymentAttempt.class);
+ }
+
+ /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */
+ public static PaymentAttempt retrieve(
+ String paymentAttemptRecord, PaymentAttemptRetrieveParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/orchestration/payment_attempts/%s", ApiResource.urlEncodeId(paymentAttemptRecord));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, PaymentAttempt.class);
+ }
+}
diff --git a/src/main/java/com/stripe/model/radar/CustomerEvaluation.java b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java
new file mode 100644
index 00000000000..27c22cadc9a
--- /dev/null
+++ b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java
@@ -0,0 +1,242 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.radar;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import com.stripe.net.ApiRequest;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.net.ApiResource;
+import com.stripe.net.BaseAddress;
+import com.stripe.net.RequestOptions;
+import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.radar.CustomerEvaluationCreateParams;
+import com.stripe.param.radar.CustomerEvaluationUpdateParams;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** Customer Evaluation resource returned by the Radar Customer Evaluations API. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class CustomerEvaluation extends ApiResource implements HasId {
+ /** Time at which the object was created. Measured in seconds since the Unix epoch. */
+ @SerializedName("created_at")
+ Long createdAt;
+
+ /** The ID of the Stripe customer the customer evaluation is associated with. */
+ @SerializedName("customer")
+ String customer;
+
+ /** The type of evaluation event. */
+ @SerializedName("event_type")
+ String eventType;
+
+ /** A list of events that have been reported on this customer evaluation. */
+ @SerializedName("events")
+ List events;
+
+ /** 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 radar.customer_evaluation}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** A hash of signal objects providing Radar's evaluation for the lifecycle event. */
+ @SerializedName("signals")
+ Signals signals;
+
+ /** Creates a new {@code CustomerEvaluation} object. */
+ public static CustomerEvaluation create(Map params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /** Creates a new {@code CustomerEvaluation} object. */
+ public static CustomerEvaluation create(Map params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/radar/customer_evaluations";
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getGlobalResponseGetter().request(request, CustomerEvaluation.class);
+ }
+
+ /** Creates a new {@code CustomerEvaluation} object. */
+ public static CustomerEvaluation create(CustomerEvaluationCreateParams params)
+ throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /** Creates a new {@code CustomerEvaluation} object. */
+ public static CustomerEvaluation create(
+ CustomerEvaluationCreateParams params, RequestOptions options) throws StripeException {
+ String path = "/v1/radar/customer_evaluations";
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, CustomerEvaluation.class);
+ }
+
+ /** Reports an event on a {@code CustomerEvaluation} object. */
+ public CustomerEvaluation update(Map params) throws StripeException {
+ return update(params, (RequestOptions) null);
+ }
+
+ /** Reports an event on a {@code CustomerEvaluation} object. */
+ public CustomerEvaluation update(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/radar/customer_evaluations/%s/report", ApiResource.urlEncodeId(this.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, CustomerEvaluation.class);
+ }
+
+ /** Reports an event on a {@code CustomerEvaluation} object. */
+ public CustomerEvaluation update(CustomerEvaluationUpdateParams params) throws StripeException {
+ return update(params, (RequestOptions) null);
+ }
+
+ /** Reports an event on a {@code CustomerEvaluation} object. */
+ public CustomerEvaluation update(CustomerEvaluationUpdateParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/radar/customer_evaluations/%s/report", ApiResource.urlEncodeId(this.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, CustomerEvaluation.class);
+ }
+
+ /** Event object representing an event reported for a Customer Evaluation via the report API. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Event extends StripeObject {
+ /** Data about a failed login event. */
+ @SerializedName("login_failed")
+ LoginFailed loginFailed;
+
+ /** Time at which the event occurred. Measured in seconds since the Unix epoch. */
+ @SerializedName("occurred_at")
+ Long occurredAt;
+
+ /** Data about a failed registration event. */
+ @SerializedName("registration_failed")
+ RegistrationFailed registrationFailed;
+
+ /** The type of event that occurred. */
+ @SerializedName("type")
+ String type;
+
+ /** Data about a failed login event. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LoginFailed extends StripeObject {
+ /** The reason why this login failed. */
+ @SerializedName("reason")
+ String reason;
+ }
+
+ /** Data about a failed registration event. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class RegistrationFailed extends StripeObject {
+ /** The reason why this registration failed. */
+ @SerializedName("reason")
+ String reason;
+ }
+ }
+
+ /** Customer Evaluation Signals resource returned by the Radar Customer Evaluations API. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Signals extends StripeObject {
+ @SerializedName("account_sharing")
+ AccountSharing accountSharing;
+
+ @SerializedName("multi_accounting")
+ MultiAccounting multiAccounting;
+
+ /**
+ * For more details about AccountSharing, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AccountSharing extends StripeObject {
+ /** Time at which the signal was evaluated. Measured in seconds since the Unix epoch. */
+ @SerializedName("evaluated_at")
+ Long evaluatedAt;
+
+ /** The risk level for this signal. */
+ @SerializedName("risk_level")
+ String riskLevel;
+
+ /** Score for this signal (float between 0.0-100.0). */
+ @SerializedName("score")
+ BigDecimal score;
+ }
+
+ /**
+ * For more details about MultiAccounting, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MultiAccounting extends StripeObject {
+ /** Time at which the signal was evaluated. Measured in seconds since the Unix epoch. */
+ @SerializedName("evaluated_at")
+ Long evaluatedAt;
+
+ /** The risk level for this signal. */
+ @SerializedName("risk_level")
+ String riskLevel;
+
+ /** Score for this signal (float between 0.0-100.0). */
+ @SerializedName("score")
+ BigDecimal score;
+ }
+ }
+
+ @Override
+ public void setResponseGetter(StripeResponseGetter responseGetter) {
+ super.setResponseGetter(responseGetter);
+ trySetResponseGetter(signals, responseGetter);
+ }
+}
diff --git a/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java b/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java
index 0464af5bbb1..b1111d327e8 100644
--- a/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java
+++ b/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java
@@ -26,7 +26,7 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class IssuingAuthorizationEvaluation extends ApiResource implements HasId {
- /** Details about the authorization transaction. */
+ /** Details about the authorization. */
@SerializedName("authorization_details")
AuthorizationDetails authorizationDetails;
@@ -50,7 +50,10 @@ public class IssuingAuthorizationEvaluation extends ApiResource implements HasId
@SerializedName("livemode")
Boolean livemode;
- /** Details about the merchant where the authorization occurred. */
+ /**
+ * Details about the seller (grocery store, e-commerce website, etc.) where the card authorization
+ * happened.
+ */
@SerializedName("merchant_details")
MerchantDetails merchantDetails;
@@ -61,7 +64,7 @@ public class IssuingAuthorizationEvaluation extends ApiResource implements HasId
@SerializedName("metadata")
Map metadata;
- /** Details about the card network processing. */
+ /** Details about the authorization, such as identifiers, set by the card network. */
@SerializedName("network_details")
NetworkDetails networkDetails;
@@ -77,11 +80,11 @@ public class IssuingAuthorizationEvaluation extends ApiResource implements HasId
@SerializedName("signals")
Signals signals;
- /** Details about the token, if a tokenized payment method was used. */
+ /** Details about the token, if a tokenized payment method was used for the authorization. */
@SerializedName("token_details")
TokenDetails tokenDetails;
- /** Details about verification checks performed. */
+ /** Details about verification data for the authorization. */
@SerializedName("verification_details")
VerificationDetails verificationDetails;
@@ -122,17 +125,20 @@ public static IssuingAuthorizationEvaluation create(
return getGlobalResponseGetter().request(request, IssuingAuthorizationEvaluation.class);
}
- /** Details about the authorization transaction. */
+ /** Details about the authorization. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AuthorizationDetails extends StripeObject {
- /** The authorization amount in the smallest currency unit. */
+ /**
+ * The total amount of the authorization in the smallest currency unit.
+ */
@SerializedName("amount")
Long amount;
/**
- * The method used for authorization.
+ * How the card details were provided.
*
* One of {@code chip}, {@code contactless}, {@code keyed_in}, {@code online}, or {@code
* swipe}.
@@ -140,12 +146,16 @@ public static class AuthorizationDetails extends StripeObject {
@SerializedName("authorization_method")
String authorizationMethod;
- /** Three-letter ISO currency code in lowercase. */
+ /**
+ * Three-letter ISO currency
+ * code, in lowercase. Must be a supported
+ * currency.
+ */
@SerializedName("currency")
String currency;
/**
- * The card entry mode.
+ * Defines how the card's information was entered for the authorization.
*
*
One of {@code contactless}, {@code contactless_magstripe}, {@code credential_on_file},
* {@code integrated_circuit_card}, {@code magstripe}, {@code magstripe_no_cvv}, {@code manual},
@@ -154,16 +164,16 @@ public static class AuthorizationDetails extends StripeObject {
@SerializedName("entry_mode")
String entryMode;
- /** The raw code for the card entry mode. */
+ /** Raw code indicating the entry mode from the network message. */
@SerializedName("entry_mode_raw_code")
String entryModeRawCode;
- /** The time when the authorization was initiated. */
+ /** The timestamp of the authorization initiated in seconds. */
@SerializedName("initiated_at")
Long initiatedAt;
/**
- * The point of sale condition.
+ * Defines how the card was read at the point of sale.
*
*
One of {@code account_verification}, {@code card_not_present}, {@code card_present},
* {@code e_commerce}, {@code key_entered_pos}, {@code missing}, {@code moto}, {@code other},
@@ -172,11 +182,13 @@ public static class AuthorizationDetails extends StripeObject {
@SerializedName("point_of_sale_condition")
String pointOfSaleCondition;
- /** The raw code for the point of sale condition. */
+ /** Raw code indicating the point of sale condition from the network message. */
@SerializedName("point_of_sale_condition_raw_code")
String pointOfSaleConditionRawCode;
- /** External reference for the authorization. */
+ /**
+ * User's specified unique ID for this authorization attempt (e.g., RRN or internal reference).
+ */
@SerializedName("reference")
String reference;
}
@@ -190,19 +202,19 @@ public static class CardDetails extends StripeObject {
@SerializedName("bin")
String bin;
- /** The country code associated with the card BIN. */
+ /** The two-letter country code of the BIN issuer. */
@SerializedName("bin_country")
String binCountry;
/**
- * The type of card (physical or virtual).
+ * The type of the card.
*
*
One of {@code physical}, or {@code virtual}.
*/
@SerializedName("card_type")
String cardType;
- /** The time when the card was created. */
+ /** The timestamp when the card was created. */
@SerializedName("created_at")
Long createdAt;
@@ -210,7 +222,10 @@ public static class CardDetails extends StripeObject {
@SerializedName("last4")
String last4;
- /** External reference for the card. */
+ /**
+ * User's specified unique ID of the card for this authorization attempt (e.g., RRN or internal
+ * reference).
+ */
@SerializedName("reference")
String reference;
}
@@ -220,52 +235,64 @@ public static class CardDetails extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CardholderDetails extends StripeObject {
- /** The time when the cardholder was created. */
+ /** The timestamp when the cardholder was created. */
@SerializedName("created_at")
Long createdAt;
- /** External reference for the cardholder. */
+ /**
+ * User's specified unique ID of the cardholder for this authorization attempt (e.g., RRN or
+ * internal reference).
+ */
@SerializedName("reference")
String reference;
}
- /** Details about the merchant where the authorization occurred. */
+ /**
+ * Details about the seller (grocery store, e-commerce website, etc.) where the card authorization
+ * happened.
+ */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MerchantDetails extends StripeObject {
- /** The merchant category code (MCC). */
+ /** The merchant category code for the seller's business. */
@SerializedName("category_code")
String categoryCode;
- /** The merchant country code. */
+ /** Country where the seller is located. */
@SerializedName("country")
String country;
- /** The merchant name. */
+ /** Name of the seller. */
@SerializedName("name")
String name;
- /** The merchant identifier from the card network. */
+ /**
+ * Identifier assigned to the seller by the card network. Different card networks may assign
+ * different network_id fields to the same merchant.
+ */
@SerializedName("network_id")
String networkId;
- /** The terminal identifier. */
+ /** An ID assigned by the seller to the location of the sale. */
@SerializedName("terminal_id")
String terminalId;
}
- /** Details about the card network processing. */
+ /** Details about the authorization, such as identifiers, set by the card network. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class NetworkDetails extends StripeObject {
- /** The acquiring institution identifier. */
+ /**
+ * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided
+ * by the network; in this case, the value will be null.
+ */
@SerializedName("acquiring_institution_id")
String acquiringInstitutionId;
/**
- * The card network that processed the authorization.
+ * The card network over which Stripe received the authorization.
*
*
One of {@code cirrus}, {@code interlink}, {@code maestro}, {@code mastercard}, {@code
* other}, {@code plus}, or {@code visa}.
@@ -332,35 +359,37 @@ public static class Data extends StripeObject {
}
}
- /** Details about the token, if a tokenized payment method was used. */
+ /** Details about the token, if a tokenized payment method was used for the authorization. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TokenDetails extends StripeObject {
- /** The time when the token was created. */
+ /** The timestamp when the network token was created. */
@SerializedName("created_at")
Long createdAt;
- /** External reference for the token. */
+ /**
+ * User's specified unique ID of the card token for this authorization attempt (e.g., RRN or
+ * internal reference).
+ */
@SerializedName("reference")
String reference;
/**
- * The wallet provider, if applicable.
- *
- *
One of {@code apple_pay}, {@code google_pay}, or {@code samsung_pay}.
+ * The digital wallet used for this transaction. One of {@code apple_pay}, {@code google_pay},
+ * or {@code samsung_pay}.
*/
@SerializedName("wallet")
String wallet;
}
- /** Details about verification checks performed. */
+ /** Details about verification data for the authorization. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class VerificationDetails extends StripeObject {
/**
- * The result of the 3D Secure verification.
+ * The outcome of the 3D Secure authentication request.
*
*
One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code
* failed}, or {@code required}.
diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java
index c6b684df3f3..8546c0f8ca9 100644
--- a/src/main/java/com/stripe/model/tax/Registration.java
+++ b/src/main/java/com/stripe/model/tax/Registration.java
@@ -2895,6 +2895,9 @@ public static class Us extends StripeObject {
@SerializedName("gross_receipts_tax")
GrossReceiptsTax grossReceiptsTax;
+ @SerializedName("home_rule_tax")
+ HomeRuleTax homeRuleTax;
+
@SerializedName("hospitality_tax")
HospitalityTax hospitalityTax;
@@ -2927,9 +2930,10 @@ public static class Us extends StripeObject {
* Type of registration in the US.
*
*
One of {@code admissions_tax}, {@code attendance_tax}, {@code entertainment_tax}, {@code
- * gross_receipts_tax}, {@code hospitality_tax}, {@code local_amusement_tax}, {@code
- * local_lease_tax}, {@code luxury_tax}, {@code resort_tax}, {@code state_communications_tax},
- * {@code state_retail_delivery_fee}, {@code state_sales_tax}, or {@code tourism_tax}.
+ * gross_receipts_tax}, {@code home_rule_tax}, {@code hospitality_tax}, {@code
+ * local_amusement_tax}, {@code local_lease_tax}, {@code luxury_tax}, {@code resort_tax},
+ * {@code state_communications_tax}, {@code state_retail_delivery_fee}, {@code
+ * state_sales_tax}, or {@code tourism_tax}.
*/
@SerializedName("type")
String type;
@@ -3002,6 +3006,23 @@ public static class GrossReceiptsTax extends StripeObject {
String jurisdiction;
}
+ /**
+ * For more details about HomeRuleTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class HomeRuleTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
/**
* For more details about HospitalityTax, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java
index f665af59399..0024fda7cac 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java
@@ -108,7 +108,7 @@ public class ReceivedDebit extends StripeObject implements HasId {
StripeBalancePayment stripeBalancePayment;
/**
- * Open enum, the type of the received debit.
+ * Open Enum. The type of the ReceivedDebit.
*
*
One of {@code balance_transfer}, {@code bank_transfer}, {@code card_spend}, {@code
* external_debit}, or {@code stripe_balance_payment}.
diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java
index 20e79ef289a..58e266ee965 100644
--- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java
@@ -2852,7 +2852,7 @@ public static class CheckScanning {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** An empty list, because this embedded component has no features. */
+ /** The list of features enabled in the embedded component. */
@SerializedName("features")
Features features;
@@ -2913,7 +2913,7 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** An empty list, because this embedded component has no features. */
+ /** The list of features enabled in the embedded component. */
public Builder setFeatures(
AccountSessionCreateParams.Components.CheckScanning.Features features) {
this.features = features;
@@ -2924,6 +2924,9 @@ public Builder setFeatures(
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Features {
+ @SerializedName("create_us_paper_check_on_application")
+ Boolean createUsPaperCheckOnApplication;
+
/**
* 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.
@@ -2934,7 +2937,8 @@ public static class Features {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- private Features(Map extraParams) {
+ private Features(Boolean createUsPaperCheckOnApplication, Map extraParams) {
+ this.createUsPaperCheckOnApplication = createUsPaperCheckOnApplication;
this.extraParams = extraParams;
}
@@ -2943,12 +2947,20 @@ public static Builder builder() {
}
public static class Builder {
+ private Boolean createUsPaperCheckOnApplication;
+
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public AccountSessionCreateParams.Components.CheckScanning.Features build() {
return new AccountSessionCreateParams.Components.CheckScanning.Features(
- this.extraParams);
+ this.createUsPaperCheckOnApplication, this.extraParams);
+ }
+
+ public Builder setCreateUsPaperCheckOnApplication(
+ Boolean createUsPaperCheckOnApplication) {
+ this.createUsPaperCheckOnApplication = createUsPaperCheckOnApplication;
+ return this;
}
/**
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java
new file mode 100644
index 00000000000..90b00a720fe
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java
@@ -0,0 +1,180 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+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 PaymentAttemptRecordReportAuthenticatedParams extends ApiRequestParams {
+ /** When the reported payment was authenticated. Measured in seconds since the Unix epoch. */
+ @SerializedName("authenticated_at")
+ Long authenticatedAt;
+
+ /** 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;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys can
+ * be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Object metadata;
+
+ private PaymentAttemptRecordReportAuthenticatedParams(
+ Long authenticatedAt, List expand, Map extraParams, Object metadata) {
+ this.authenticatedAt = authenticatedAt;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.metadata = metadata;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long authenticatedAt;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private Object metadata;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportAuthenticatedParams build() {
+ return new PaymentAttemptRecordReportAuthenticatedParams(
+ this.authenticatedAt, this.expand, this.extraParams, this.metadata);
+ }
+
+ /** When the reported payment was authenticated. Measured in seconds since the Unix epoch. */
+ public Builder setAuthenticatedAt(Long authenticatedAt) {
+ this.authenticatedAt = authenticatedAt;
+ 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
+ * PaymentAttemptRecordReportAuthenticatedParams#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
+ * PaymentAttemptRecordReportAuthenticatedParams#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
+ * PaymentAttemptRecordReportAuthenticatedParams#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 PaymentAttemptRecordReportAuthenticatedParams#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
+ * PaymentAttemptRecordReportAuthenticatedParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) 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 PaymentAttemptRecordReportAuthenticatedParams#metadata} for the field
+ * documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java
new file mode 100644
index 00000000000..4dfdf8cd7fd
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java
@@ -0,0 +1,178 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+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 PaymentAttemptRecordReportCanceledParams extends ApiRequestParams {
+ /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
+ @SerializedName("canceled_at")
+ Long canceledAt;
+
+ /** 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;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys can
+ * be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Object metadata;
+
+ private PaymentAttemptRecordReportCanceledParams(
+ Long canceledAt, List expand, Map extraParams, Object metadata) {
+ this.canceledAt = canceledAt;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.metadata = metadata;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long canceledAt;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private Object metadata;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportCanceledParams build() {
+ return new PaymentAttemptRecordReportCanceledParams(
+ this.canceledAt, this.expand, this.extraParams, this.metadata);
+ }
+
+ /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
+ public Builder setCanceledAt(Long canceledAt) {
+ this.canceledAt = canceledAt;
+ 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
+ * PaymentAttemptRecordReportCanceledParams#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
+ * PaymentAttemptRecordReportCanceledParams#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
+ * PaymentAttemptRecordReportCanceledParams#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 PaymentAttemptRecordReportCanceledParams#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
+ * PaymentAttemptRecordReportCanceledParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) 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 PaymentAttemptRecordReportCanceledParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java
new file mode 100644
index 00000000000..5cdb21a6ed5
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java
@@ -0,0 +1,216 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+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 PaymentAttemptRecordReportFailedParams extends ApiRequestParams {
+ /** 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;
+
+ /** When the reported payment failed. Measured in seconds since the Unix epoch. */
+ @SerializedName("failed_at")
+ Long failedAt;
+
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ @SerializedName("failure_code")
+ FailureCode failureCode;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys can
+ * be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Object metadata;
+
+ private PaymentAttemptRecordReportFailedParams(
+ List expand,
+ Map extraParams,
+ Long failedAt,
+ FailureCode failureCode,
+ Object metadata) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.failedAt = failedAt;
+ this.failureCode = failureCode;
+ this.metadata = metadata;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private Long failedAt;
+
+ private FailureCode failureCode;
+
+ private Object metadata;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportFailedParams build() {
+ return new PaymentAttemptRecordReportFailedParams(
+ this.expand, this.extraParams, this.failedAt, this.failureCode, this.metadata);
+ }
+
+ /**
+ * 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
+ * PaymentAttemptRecordReportFailedParams#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
+ * PaymentAttemptRecordReportFailedParams#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
+ * PaymentAttemptRecordReportFailedParams#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 PaymentAttemptRecordReportFailedParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** When the reported payment failed. Measured in seconds since the Unix epoch. */
+ public Builder setFailedAt(Long failedAt) {
+ this.failedAt = failedAt;
+ return this;
+ }
+
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ public Builder setFailureCode(PaymentAttemptRecordReportFailedParams.FailureCode failureCode) {
+ this.failureCode = failureCode;
+ 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
+ * PaymentAttemptRecordReportFailedParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) 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 PaymentAttemptRecordReportFailedParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+ }
+
+ public enum FailureCode implements ApiRequestParams.EnumParam {
+ @SerializedName("payment_method_customer_decline")
+ PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"),
+
+ @SerializedName("payment_method_provider_unknown_outcome")
+ PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ FailureCode(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java
new file mode 100644
index 00000000000..62648e04445
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java
@@ -0,0 +1,179 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+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 PaymentAttemptRecordReportGuaranteedParams extends ApiRequestParams {
+ /** 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;
+
+ /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */
+ @SerializedName("guaranteed_at")
+ Long guaranteedAt;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys can
+ * be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Object metadata;
+
+ private PaymentAttemptRecordReportGuaranteedParams(
+ List expand, Map extraParams, Long guaranteedAt, Object metadata) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.guaranteedAt = guaranteedAt;
+ this.metadata = metadata;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private Long guaranteedAt;
+
+ private Object metadata;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportGuaranteedParams build() {
+ return new PaymentAttemptRecordReportGuaranteedParams(
+ this.expand, this.extraParams, this.guaranteedAt, this.metadata);
+ }
+
+ /**
+ * 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
+ * PaymentAttemptRecordReportGuaranteedParams#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
+ * PaymentAttemptRecordReportGuaranteedParams#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
+ * PaymentAttemptRecordReportGuaranteedParams#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 PaymentAttemptRecordReportGuaranteedParams#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */
+ public Builder setGuaranteedAt(Long guaranteedAt) {
+ this.guaranteedAt = guaranteedAt;
+ 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
+ * PaymentAttemptRecordReportGuaranteedParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) 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 PaymentAttemptRecordReportGuaranteedParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java
new file mode 100644
index 00000000000..3e056e6fc89
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java
@@ -0,0 +1,606 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+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 PaymentAttemptRecordReportInformationalParams extends ApiRequestParams {
+ /** Customer information for this payment. */
+ @SerializedName("customer_details")
+ CustomerDetails customerDetails;
+
+ /** An arbitrary string attached to the object. Often useful for displaying to users. */
+ @SerializedName("description")
+ Object description;
+
+ /** 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;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys can
+ * be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Object metadata;
+
+ /** Shipping information for this payment. */
+ @SerializedName("shipping_details")
+ Object shippingDetails;
+
+ private PaymentAttemptRecordReportInformationalParams(
+ CustomerDetails customerDetails,
+ Object description,
+ List expand,
+ Map extraParams,
+ Object metadata,
+ Object shippingDetails) {
+ this.customerDetails = customerDetails;
+ this.description = description;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.metadata = metadata;
+ this.shippingDetails = shippingDetails;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private CustomerDetails customerDetails;
+
+ private Object description;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private Object metadata;
+
+ private Object shippingDetails;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportInformationalParams build() {
+ return new PaymentAttemptRecordReportInformationalParams(
+ this.customerDetails,
+ this.description,
+ this.expand,
+ this.extraParams,
+ this.metadata,
+ this.shippingDetails);
+ }
+
+ /** Customer information for this payment. */
+ public Builder setCustomerDetails(
+ PaymentAttemptRecordReportInformationalParams.CustomerDetails customerDetails) {
+ this.customerDetails = customerDetails;
+ return this;
+ }
+
+ /** An arbitrary string attached to the object. Often useful for displaying to users. */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** An arbitrary string attached to the object. Often useful for displaying to users. */
+ public Builder setDescription(EmptyParam description) {
+ this.description = description;
+ 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
+ * PaymentAttemptRecordReportInformationalParams#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
+ * PaymentAttemptRecordReportInformationalParams#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
+ * PaymentAttemptRecordReportInformationalParams#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 PaymentAttemptRecordReportInformationalParams#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
+ * PaymentAttemptRecordReportInformationalParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) 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 PaymentAttemptRecordReportInformationalParams#metadata} for the field
+ * documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /** Shipping information for this payment. */
+ public Builder setShippingDetails(
+ PaymentAttemptRecordReportInformationalParams.ShippingDetails shippingDetails) {
+ this.shippingDetails = shippingDetails;
+ return this;
+ }
+
+ /** Shipping information for this payment. */
+ public Builder setShippingDetails(EmptyParam shippingDetails) {
+ this.shippingDetails = shippingDetails;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CustomerDetails {
+ /** The customer who made the payment. */
+ @SerializedName("customer")
+ String customer;
+
+ /** The customer's phone number. */
+ @SerializedName("email")
+ String email;
+
+ /**
+ * 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 customer's name. */
+ @SerializedName("name")
+ String name;
+
+ /** The customer's phone number. */
+ @SerializedName("phone")
+ String phone;
+
+ private CustomerDetails(
+ String customer, String email, Map extraParams, String name, String phone) {
+ this.customer = customer;
+ this.email = email;
+ this.extraParams = extraParams;
+ this.name = name;
+ this.phone = phone;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String customer;
+
+ private String email;
+
+ private Map extraParams;
+
+ private String name;
+
+ private String phone;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportInformationalParams.CustomerDetails build() {
+ return new PaymentAttemptRecordReportInformationalParams.CustomerDetails(
+ this.customer, this.email, this.extraParams, this.name, this.phone);
+ }
+
+ /** The customer who made the payment. */
+ public Builder setCustomer(String customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /** The customer's phone number. */
+ public Builder setEmail(String email) {
+ this.email = email;
+ 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
+ * PaymentAttemptRecordReportInformationalParams.CustomerDetails#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 PaymentAttemptRecordReportInformationalParams.CustomerDetails#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 customer's name. */
+ public Builder setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /** The customer's phone number. */
+ public Builder setPhone(String phone) {
+ this.phone = phone;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ShippingDetails {
+ /** The physical shipping address. */
+ @SerializedName("address")
+ Address address;
+
+ /**
+ * 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 shipping recipient's name. */
+ @SerializedName("name")
+ String name;
+
+ /** The shipping recipient's phone number. */
+ @SerializedName("phone")
+ String phone;
+
+ private ShippingDetails(
+ Address address, Map extraParams, String name, String phone) {
+ this.address = address;
+ this.extraParams = extraParams;
+ this.name = name;
+ this.phone = phone;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Address address;
+
+ private Map extraParams;
+
+ private String name;
+
+ private String phone;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportInformationalParams.ShippingDetails build() {
+ return new PaymentAttemptRecordReportInformationalParams.ShippingDetails(
+ this.address, this.extraParams, this.name, this.phone);
+ }
+
+ /** The physical shipping address. */
+ public Builder setAddress(
+ PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address address) {
+ this.address = address;
+ 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
+ * PaymentAttemptRecordReportInformationalParams.ShippingDetails#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 PaymentAttemptRecordReportInformationalParams.ShippingDetails#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 shipping recipient's name. */
+ public Builder setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /** The shipping recipient's phone number. */
+ public Builder setPhone(String phone) {
+ this.phone = phone;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Address {
+ /** City, district, suburb, town, or village. */
+ @SerializedName("city")
+ String city;
+
+ /**
+ * Two-letter country code (ISO
+ * 3166-1 alpha-2).
+ */
+ @SerializedName("country")
+ String country;
+
+ /**
+ * 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;
+
+ /** Address line 1, such as the street, PO Box, or company name. */
+ @SerializedName("line1")
+ String line1;
+
+ /** Address line 2, such as the apartment, suite, unit, or building. */
+ @SerializedName("line2")
+ String line2;
+
+ /** ZIP or postal code. */
+ @SerializedName("postal_code")
+ String postalCode;
+
+ /**
+ * State, county, province, or region (ISO
+ * 3166-2).
+ */
+ @SerializedName("state")
+ String state;
+
+ private Address(
+ String city,
+ String country,
+ Map extraParams,
+ String line1,
+ String line2,
+ String postalCode,
+ String state) {
+ this.city = city;
+ this.country = country;
+ this.extraParams = extraParams;
+ this.line1 = line1;
+ this.line2 = line2;
+ this.postalCode = postalCode;
+ this.state = state;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String city;
+
+ private String country;
+
+ private Map extraParams;
+
+ private String line1;
+
+ private String line2;
+
+ private String postalCode;
+
+ private String state;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address build() {
+ return new PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address(
+ this.city,
+ this.country,
+ this.extraParams,
+ this.line1,
+ this.line2,
+ this.postalCode,
+ this.state);
+ }
+
+ /** City, district, suburb, town, or village. */
+ public Builder setCity(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * Two-letter country code (ISO
+ * 3166-1 alpha-2).
+ */
+ public Builder setCountry(String country) {
+ this.country = country;
+ 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
+ * PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address#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
+ * PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Address line 1, such as the street, PO Box, or company name. */
+ public Builder setLine1(String line1) {
+ this.line1 = line1;
+ return this;
+ }
+
+ /** Address line 2, such as the apartment, suite, unit, or building. */
+ public Builder setLine2(String line2) {
+ this.line2 = line2;
+ return this;
+ }
+
+ /** ZIP or postal code. */
+ public Builder setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ return this;
+ }
+
+ /**
+ * State, county, province, or region (ISO 3166-2).
+ */
+ public Builder setState(String state) {
+ this.state = state;
+ return this;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java
new file mode 100644
index 00000000000..4619c9197ae
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java
@@ -0,0 +1,628 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+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 PaymentAttemptRecordReportRefundParams extends ApiRequestParams {
+ /**
+ * A positive integer in the smallest
+ * currency unit representing how much of this payment to refund. Can refund only up to the
+ * remaining, unrefunded amount of the payment.
+ */
+ @SerializedName("amount")
+ Amount amount;
+
+ /** 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;
+
+ /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */
+ @SerializedName("initiated_at")
+ Long initiatedAt;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys can
+ * be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Object metadata;
+
+ /** Required. The outcome of the reported refund. */
+ @SerializedName("outcome")
+ Outcome outcome;
+
+ /** Required. Processor information for this refund. */
+ @SerializedName("processor_details")
+ ProcessorDetails processorDetails;
+
+ /** Information about the payment attempt refund. */
+ @SerializedName("refunded")
+ Refunded refunded;
+
+ private PaymentAttemptRecordReportRefundParams(
+ Amount amount,
+ List expand,
+ Map extraParams,
+ Long initiatedAt,
+ Object metadata,
+ Outcome outcome,
+ ProcessorDetails processorDetails,
+ Refunded refunded) {
+ this.amount = amount;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.initiatedAt = initiatedAt;
+ this.metadata = metadata;
+ this.outcome = outcome;
+ this.processorDetails = processorDetails;
+ this.refunded = refunded;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Amount amount;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private Long initiatedAt;
+
+ private Object metadata;
+
+ private Outcome outcome;
+
+ private ProcessorDetails processorDetails;
+
+ private Refunded refunded;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportRefundParams build() {
+ return new PaymentAttemptRecordReportRefundParams(
+ this.amount,
+ this.expand,
+ this.extraParams,
+ this.initiatedAt,
+ this.metadata,
+ this.outcome,
+ this.processorDetails,
+ this.refunded);
+ }
+
+ /**
+ * A positive integer in the smallest
+ * currency unit representing how much of this payment to refund. Can refund only up to the
+ * remaining, unrefunded amount of the payment.
+ */
+ public Builder setAmount(PaymentAttemptRecordReportRefundParams.Amount amount) {
+ this.amount = amount;
+ 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
+ * PaymentAttemptRecordReportRefundParams#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
+ * PaymentAttemptRecordReportRefundParams#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
+ * PaymentAttemptRecordReportRefundParams#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 PaymentAttemptRecordReportRefundParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */
+ public Builder setInitiatedAt(Long initiatedAt) {
+ this.initiatedAt = initiatedAt;
+ 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
+ * PaymentAttemptRecordReportRefundParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) 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 PaymentAttemptRecordReportRefundParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /** Required. The outcome of the reported refund. */
+ public Builder setOutcome(PaymentAttemptRecordReportRefundParams.Outcome outcome) {
+ this.outcome = outcome;
+ return this;
+ }
+
+ /** Required. Processor information for this refund. */
+ public Builder setProcessorDetails(
+ PaymentAttemptRecordReportRefundParams.ProcessorDetails processorDetails) {
+ this.processorDetails = processorDetails;
+ return this;
+ }
+
+ /** Information about the payment attempt refund. */
+ public Builder setRefunded(PaymentAttemptRecordReportRefundParams.Refunded refunded) {
+ this.refunded = refunded;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Amount {
+ /**
+ * Required. Three-letter ISO currency code, in lowercase.
+ * Must be a supported currency.
+ */
+ @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;
+
+ /**
+ * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code
+ * 100} can represent 1 USD or 100 JPY.
+ */
+ @SerializedName("value")
+ Long value;
+
+ private Amount(String currency, Map extraParams, Long value) {
+ this.currency = currency;
+ this.extraParams = extraParams;
+ this.value = value;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String currency;
+
+ private Map extraParams;
+
+ private Long value;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportRefundParams.Amount build() {
+ return new PaymentAttemptRecordReportRefundParams.Amount(
+ this.currency, this.extraParams, this.value);
+ }
+
+ /**
+ * Required. Three-letter ISO currency code, in
+ * lowercase. Must be a supported currency.
+ */
+ 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
+ * PaymentAttemptRecordReportRefundParams.Amount#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 PaymentAttemptRecordReportRefundParams.Amount#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. A positive integer representing the amount in the currency's minor unit. For example, {@code
+ * 100} can represent 1 USD or 100 JPY.
+ */
+ public Builder setValue(Long value) {
+ this.value = value;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ProcessorDetails {
+ /** Information about the custom processor used to make this refund. */
+ @SerializedName("custom")
+ Custom custom;
+
+ /**
+ * 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 the processor details. An additional hash is included
+ * on processor_details with a name matching this value. It contains additional information
+ * specific to the processor.
+ */
+ @SerializedName("type")
+ Type type;
+
+ private ProcessorDetails(Custom custom, Map extraParams, Type type) {
+ this.custom = custom;
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Custom custom;
+
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportRefundParams.ProcessorDetails build() {
+ return new PaymentAttemptRecordReportRefundParams.ProcessorDetails(
+ this.custom, this.extraParams, this.type);
+ }
+
+ /** Information about the custom processor used to make this refund. */
+ public Builder setCustom(
+ PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom custom) {
+ this.custom = custom;
+ 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
+ * PaymentAttemptRecordReportRefundParams.ProcessorDetails#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 PaymentAttemptRecordReportRefundParams.ProcessorDetails#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 the processor details. An additional hash is
+ * included on processor_details with a name matching this value. It contains additional
+ * information specific to the processor.
+ */
+ public Builder setType(PaymentAttemptRecordReportRefundParams.ProcessorDetails.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Custom {
+ /**
+ * 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. A reference to the external refund. This field must be unique
+ * across all refunds.
+ */
+ @SerializedName("refund_reference")
+ String refundReference;
+
+ private Custom(Map extraParams, String refundReference) {
+ this.extraParams = extraParams;
+ this.refundReference = refundReference;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String refundReference;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom build() {
+ return new PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom(
+ this.extraParams, this.refundReference);
+ }
+
+ /**
+ * 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
+ * PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom#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
+ * PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom#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. A reference to the external refund. This field must be unique
+ * across all refunds.
+ */
+ public Builder setRefundReference(String refundReference) {
+ this.refundReference = refundReference;
+ return this;
+ }
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("custom")
+ CUSTOM("custom");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Refunded {
+ /**
+ * 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. When the reported refund completed. Measured in seconds since the
+ * Unix epoch.
+ */
+ @SerializedName("refunded_at")
+ Long refundedAt;
+
+ private Refunded(Map extraParams, Long refundedAt) {
+ this.extraParams = extraParams;
+ this.refundedAt = refundedAt;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long refundedAt;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRecordReportRefundParams.Refunded build() {
+ return new PaymentAttemptRecordReportRefundParams.Refunded(
+ this.extraParams, this.refundedAt);
+ }
+
+ /**
+ * 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
+ * PaymentAttemptRecordReportRefundParams.Refunded#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 PaymentAttemptRecordReportRefundParams.Refunded#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. When the reported refund completed. Measured in seconds since
+ * the Unix epoch.
+ */
+ public Builder setRefundedAt(Long refundedAt) {
+ this.refundedAt = refundedAt;
+ return this;
+ }
+ }
+ }
+
+ public enum Outcome implements ApiRequestParams.EnumParam {
+ @SerializedName("refunded")
+ REFUNDED("refunded");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Outcome(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java
index 3b0884e6813..4930d6c02a3 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java
@@ -14,10 +14,7 @@
@Getter
@EqualsAndHashCode(callSuper = false)
public class PaymentRecordReportPaymentAttemptCanceledParams extends ApiRequestParams {
- /**
- * Required. When the reported payment was canceled. Measured in seconds since
- * the Unix epoch.
- */
+ /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
@SerializedName("canceled_at")
Long canceledAt;
@@ -70,10 +67,7 @@ public PaymentRecordReportPaymentAttemptCanceledParams build() {
this.canceledAt, this.expand, this.extraParams, this.metadata);
}
- /**
- * Required. When the reported payment was canceled. Measured in seconds since
- * the Unix epoch.
- */
+ /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
public Builder setCanceledAt(Long canceledAt) {
this.canceledAt = canceledAt;
return this;
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java
index 5b4bf31506f..714b8647cab 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java
@@ -27,13 +27,17 @@ public class PaymentRecordReportPaymentAttemptFailedParams extends ApiRequestPar
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * Required. When the reported payment failed. Measured in seconds since the Unix
- * epoch.
- */
+ /** When the reported payment failed. Measured in seconds since the Unix epoch. */
@SerializedName("failed_at")
Long failedAt;
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ @SerializedName("failure_code")
+ FailureCode failureCode;
+
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
@@ -44,10 +48,15 @@ public class PaymentRecordReportPaymentAttemptFailedParams extends ApiRequestPar
Object metadata;
private PaymentRecordReportPaymentAttemptFailedParams(
- List expand, Map extraParams, Long failedAt, Object metadata) {
+ List expand,
+ Map extraParams,
+ Long failedAt,
+ FailureCode failureCode,
+ Object metadata) {
this.expand = expand;
this.extraParams = extraParams;
this.failedAt = failedAt;
+ this.failureCode = failureCode;
this.metadata = metadata;
}
@@ -62,12 +71,14 @@ public static class Builder {
private Long failedAt;
+ private FailureCode failureCode;
+
private Object metadata;
/** Finalize and obtain parameter instance from this builder. */
public PaymentRecordReportPaymentAttemptFailedParams build() {
return new PaymentRecordReportPaymentAttemptFailedParams(
- this.expand, this.extraParams, this.failedAt, this.metadata);
+ this.expand, this.extraParams, this.failedAt, this.failureCode, this.metadata);
}
/**
@@ -123,15 +134,22 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /**
- * Required. When the reported payment failed. Measured in seconds since the
- * Unix epoch.
- */
+ /** When the reported payment failed. Measured in seconds since the Unix epoch. */
public Builder setFailedAt(Long failedAt) {
this.failedAt = failedAt;
return this;
}
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ public Builder setFailureCode(
+ PaymentRecordReportPaymentAttemptFailedParams.FailureCode failureCode) {
+ this.failureCode = failureCode;
+ 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
@@ -183,4 +201,19 @@ public Builder setMetadata(Map metadata) {
return this;
}
}
+
+ public enum FailureCode implements ApiRequestParams.EnumParam {
+ @SerializedName("payment_method_customer_decline")
+ PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"),
+
+ @SerializedName("payment_method_provider_unknown_outcome")
+ PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ FailureCode(String value) {
+ this.value = value;
+ }
+ }
}
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java
index ad95ccaf5bc..19149b01b96 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java
@@ -27,10 +27,7 @@ public class PaymentRecordReportPaymentAttemptGuaranteedParams extends ApiReques
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * Required. When the reported payment was guaranteed. Measured in seconds since
- * the Unix epoch.
- */
+ /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */
@SerializedName("guaranteed_at")
Long guaranteedAt;
@@ -123,10 +120,7 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /**
- * Required. When the reported payment was guaranteed. Measured in seconds
- * since the Unix epoch.
- */
+ /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */
public Builder setGuaranteedAt(Long guaranteedAt) {
this.guaranteedAt = guaranteedAt;
return this;
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java
index 8d960fabddc..cebd6f25e51 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java
@@ -299,9 +299,17 @@ public static class Failed {
@SerializedName("failed_at")
Long failedAt;
- private Failed(Map extraParams, Long failedAt) {
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ @SerializedName("failure_code")
+ FailureCode failureCode;
+
+ private Failed(Map extraParams, Long failedAt, FailureCode failureCode) {
this.extraParams = extraParams;
this.failedAt = failedAt;
+ this.failureCode = failureCode;
}
public static Builder builder() {
@@ -313,9 +321,12 @@ public static class Builder {
private Long failedAt;
+ private FailureCode failureCode;
+
/** Finalize and obtain parameter instance from this builder. */
public PaymentRecordReportPaymentAttemptParams.Failed build() {
- return new PaymentRecordReportPaymentAttemptParams.Failed(this.extraParams, this.failedAt);
+ return new PaymentRecordReportPaymentAttemptParams.Failed(
+ this.extraParams, this.failedAt, this.failureCode);
}
/**
@@ -353,6 +364,31 @@ public Builder setFailedAt(Long failedAt) {
this.failedAt = failedAt;
return this;
}
+
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ public Builder setFailureCode(
+ PaymentRecordReportPaymentAttemptParams.Failed.FailureCode failureCode) {
+ this.failureCode = failureCode;
+ return this;
+ }
+ }
+
+ public enum FailureCode implements ApiRequestParams.EnumParam {
+ @SerializedName("payment_method_customer_decline")
+ PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"),
+
+ @SerializedName("payment_method_provider_unknown_outcome")
+ PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ FailureCode(String value) {
+ this.value = value;
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java
index 2194f0f91db..a48a472b62a 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java
@@ -574,9 +574,17 @@ public static class Failed {
@SerializedName("failed_at")
Long failedAt;
- private Failed(Map extraParams, Long failedAt) {
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ @SerializedName("failure_code")
+ FailureCode failureCode;
+
+ private Failed(Map extraParams, Long failedAt, FailureCode failureCode) {
this.extraParams = extraParams;
this.failedAt = failedAt;
+ this.failureCode = failureCode;
}
public static Builder builder() {
@@ -588,9 +596,12 @@ public static class Builder {
private Long failedAt;
+ private FailureCode failureCode;
+
/** Finalize and obtain parameter instance from this builder. */
public PaymentRecordReportPaymentParams.Failed build() {
- return new PaymentRecordReportPaymentParams.Failed(this.extraParams, this.failedAt);
+ return new PaymentRecordReportPaymentParams.Failed(
+ this.extraParams, this.failedAt, this.failureCode);
}
/**
@@ -628,6 +639,31 @@ public Builder setFailedAt(Long failedAt) {
this.failedAt = failedAt;
return this;
}
+
+ /**
+ * The failure code for this payment attempt. Must be one of {@code
+ * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}.
+ */
+ public Builder setFailureCode(
+ PaymentRecordReportPaymentParams.Failed.FailureCode failureCode) {
+ this.failureCode = failureCode;
+ return this;
+ }
+ }
+
+ public enum FailureCode implements ApiRequestParams.EnumParam {
+ @SerializedName("payment_method_customer_decline")
+ PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"),
+
+ @SerializedName("payment_method_provider_unknown_outcome")
+ PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ FailureCode(String value) {
+ this.value = value;
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java
index 3d4f5354b69..1bc65013b6c 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java
@@ -56,7 +56,7 @@ public class PaymentRecordReportRefundParams extends ApiRequestParams {
@SerializedName("processor_details")
ProcessorDetails processorDetails;
- /** Required. Information about the payment attempt refund. */
+ /** Information about the payment attempt refund. */
@SerializedName("refunded")
Refunded refunded;
@@ -244,7 +244,7 @@ public Builder setProcessorDetails(
return this;
}
- /** Required. Information about the payment attempt refund. */
+ /** Information about the payment attempt refund. */
public Builder setRefunded(PaymentRecordReportRefundParams.Refunded refunded) {
this.refunded = refunded;
return this;
diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java
index 776baffb886..e7b0b75233b 100644
--- a/src/main/java/com/stripe/param/QuoteCreateParams.java
+++ b/src/main/java/com/stripe/param/QuoteCreateParams.java
@@ -9941,9 +9941,6 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("line_starts_at")
LINE_STARTS_AT("line_starts_at"),
- @SerializedName("now")
- NOW("now"),
-
@SerializedName("pause_collection_start")
PAUSE_COLLECTION_START("pause_collection_start"),
@@ -12079,9 +12076,6 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("line_starts_at")
LINE_STARTS_AT("line_starts_at"),
- @SerializedName("now")
- NOW("now"),
-
@SerializedName("pause_collection_start")
PAUSE_COLLECTION_START("pause_collection_start"),
diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java
index 7b38b277630..1a5d31097b8 100644
--- a/src/main/java/com/stripe/param/QuoteUpdateParams.java
+++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java
@@ -9943,9 +9943,6 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("line_starts_at")
LINE_STARTS_AT("line_starts_at"),
- @SerializedName("now")
- NOW("now"),
-
@SerializedName("pause_collection_start")
PAUSE_COLLECTION_START("pause_collection_start"),
@@ -12142,9 +12139,6 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("line_starts_at")
LINE_STARTS_AT("line_starts_at"),
- @SerializedName("now")
- NOW("now"),
-
@SerializedName("pause_collection_start")
PAUSE_COLLECTION_START("pause_collection_start"),
diff --git a/src/main/java/com/stripe/param/checkout/SessionApproveParams.java b/src/main/java/com/stripe/param/checkout/SessionApproveParams.java
new file mode 100644
index 00000000000..e6ceedeeee7
--- /dev/null
+++ b/src/main/java/com/stripe/param/checkout/SessionApproveParams.java
@@ -0,0 +1,354 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.checkout;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.math.BigDecimal;
+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 SessionApproveParams extends ApiRequestParams {
+ /** Required. The ID of the customer's attempt to pay to approve. */
+ @SerializedName("attempt")
+ String attempt;
+
+ /** 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 subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code
+ * payment} mode.
+ */
+ @SerializedName("payment_intent_data")
+ PaymentIntentData paymentIntentData;
+
+ /**
+ * The URL to redirect your customer back to after they authenticate or cancel their payment on
+ * the payment method's app or site. This parameter is allowed and required if and only if you did
+ * not set the return URL during Checkout Session creation or in {@code checkout.confirm()} in
+ * Stripe.js.
+ */
+ @SerializedName("return_url")
+ String returnUrl;
+
+ /**
+ * A subset of parameters to be passed to subscription creation for Checkout Sessions in {@code
+ * subscription} mode.
+ */
+ @SerializedName("subscription_data")
+ SubscriptionData subscriptionData;
+
+ private SessionApproveParams(
+ String attempt,
+ List expand,
+ Map extraParams,
+ PaymentIntentData paymentIntentData,
+ String returnUrl,
+ SubscriptionData subscriptionData) {
+ this.attempt = attempt;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.paymentIntentData = paymentIntentData;
+ this.returnUrl = returnUrl;
+ this.subscriptionData = subscriptionData;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String attempt;
+
+ private List expand;
+
+ private Map extraParams;
+
+ private PaymentIntentData paymentIntentData;
+
+ private String returnUrl;
+
+ private SubscriptionData subscriptionData;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SessionApproveParams build() {
+ return new SessionApproveParams(
+ this.attempt,
+ this.expand,
+ this.extraParams,
+ this.paymentIntentData,
+ this.returnUrl,
+ this.subscriptionData);
+ }
+
+ /** Required. The ID of the customer's attempt to pay to approve. */
+ public Builder setAttempt(String attempt) {
+ this.attempt = attempt;
+ 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
+ * SessionApproveParams#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
+ * SessionApproveParams#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
+ * SessionApproveParams#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 SessionApproveParams#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 subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code
+ * payment} mode.
+ */
+ public Builder setPaymentIntentData(SessionApproveParams.PaymentIntentData paymentIntentData) {
+ this.paymentIntentData = paymentIntentData;
+ return this;
+ }
+
+ /**
+ * The URL to redirect your customer back to after they authenticate or cancel their payment on
+ * the payment method's app or site. This parameter is allowed and required if and only if you
+ * did not set the return URL during Checkout Session creation or in {@code checkout.confirm()}
+ * in Stripe.js.
+ */
+ public Builder setReturnUrl(String returnUrl) {
+ this.returnUrl = returnUrl;
+ return this;
+ }
+
+ /**
+ * A subset of parameters to be passed to subscription creation for Checkout Sessions in {@code
+ * subscription} mode.
+ */
+ public Builder setSubscriptionData(SessionApproveParams.SubscriptionData subscriptionData) {
+ this.subscriptionData = subscriptionData;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentIntentData {
+ /**
+ * The amount of the application fee (if any) that will be requested to be applied to the
+ * payment and transferred to the application owner's Stripe account. The amount of the
+ * application fee collected will be capped at the total amount captured. For more information,
+ * see the PaymentIntents use case
+ * for connected accounts.
+ */
+ @SerializedName("application_fee_amount")
+ Long applicationFeeAmount;
+
+ /**
+ * 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 PaymentIntentData(Long applicationFeeAmount, Map extraParams) {
+ this.applicationFeeAmount = applicationFeeAmount;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long applicationFeeAmount;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SessionApproveParams.PaymentIntentData build() {
+ return new SessionApproveParams.PaymentIntentData(
+ this.applicationFeeAmount, this.extraParams);
+ }
+
+ /**
+ * The amount of the application fee (if any) that will be requested to be applied to the
+ * payment and transferred to the application owner's Stripe account. The amount of the
+ * application fee collected will be capped at the total amount captured. For more
+ * information, see the PaymentIntents use case for connected
+ * accounts.
+ */
+ public Builder setApplicationFeeAmount(Long applicationFeeAmount) {
+ this.applicationFeeAmount = applicationFeeAmount;
+ 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
+ * SessionApproveParams.PaymentIntentData#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 SessionApproveParams.PaymentIntentData#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 SubscriptionData {
+ /**
+ * A non-negative decimal between 0 and 100, with at most two decimal places. This represents
+ * the percentage of the subscription invoice total that will be transferred to the application
+ * owner's Stripe account. To use an application fee percent, the request must be made on behalf
+ * of another account, using the {@code Stripe-Account} header or an OAuth key. For more
+ * information, see the application fees documentation.
+ */
+ @SerializedName("application_fee_percent")
+ BigDecimal applicationFeePercent;
+
+ /**
+ * 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 SubscriptionData(BigDecimal applicationFeePercent, Map extraParams) {
+ this.applicationFeePercent = applicationFeePercent;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private BigDecimal applicationFeePercent;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SessionApproveParams.SubscriptionData build() {
+ return new SessionApproveParams.SubscriptionData(
+ this.applicationFeePercent, this.extraParams);
+ }
+
+ /**
+ * A non-negative decimal between 0 and 100, with at most two decimal places. This represents
+ * the percentage of the subscription invoice total that will be transferred to the
+ * application owner's Stripe account. To use an application fee percent, the request must be
+ * made on behalf of another account, using the {@code Stripe-Account} header or an OAuth key.
+ * For more information, see the application fees documentation.
+ */
+ public Builder setApplicationFeePercent(BigDecimal applicationFeePercent) {
+ this.applicationFeePercent = applicationFeePercent;
+ 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
+ * SessionApproveParams.SubscriptionData#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 SessionApproveParams.SubscriptionData#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
index 1b36c42cf63..f226a5e86fe 100644
--- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
+++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
@@ -33,6 +33,18 @@ public class SessionCreateParams extends ApiRequestParams {
@SerializedName("allow_promotion_codes")
Boolean allowPromotionCodes;
+ /**
+ * Determines whether the customer's attempt to pay must be manually approved.
+ *
+ * Default is {@code auto}, when the customer's attempt to pay is approved automatically with
+ * no action required on your server.
+ *
+ *
When set to {@code manual}, you must approve the customer's attempt to pay by calling approve from your server.
+ */
+ @SerializedName("approval_method")
+ ApprovalMethod approvalMethod;
+
/**
* Settings for automatic tax lookup for this session and resulting payments, invoices, and
* subscriptions.
@@ -449,6 +461,7 @@ private SessionCreateParams(
AdaptivePricing adaptivePricing,
AfterExpiration afterExpiration,
Boolean allowPromotionCodes,
+ ApprovalMethod approvalMethod,
AutomaticTax automaticTax,
BillingAddressCollection billingAddressCollection,
BrandingSettings brandingSettings,
@@ -501,6 +514,7 @@ private SessionCreateParams(
this.adaptivePricing = adaptivePricing;
this.afterExpiration = afterExpiration;
this.allowPromotionCodes = allowPromotionCodes;
+ this.approvalMethod = approvalMethod;
this.automaticTax = automaticTax;
this.billingAddressCollection = billingAddressCollection;
this.brandingSettings = brandingSettings;
@@ -563,6 +577,8 @@ public static class Builder {
private Boolean allowPromotionCodes;
+ private ApprovalMethod approvalMethod;
+
private AutomaticTax automaticTax;
private BillingAddressCollection billingAddressCollection;
@@ -667,6 +683,7 @@ public SessionCreateParams build() {
this.adaptivePricing,
this.afterExpiration,
this.allowPromotionCodes,
+ this.approvalMethod,
this.automaticTax,
this.billingAddressCollection,
this.brandingSettings,
@@ -742,6 +759,20 @@ public Builder setAllowPromotionCodes(Boolean allowPromotionCodes) {
return this;
}
+ /**
+ * Determines whether the customer's attempt to pay must be manually approved.
+ *
+ *
Default is {@code auto}, when the customer's attempt to pay is approved automatically with
+ * no action required on your server.
+ *
+ *
When set to {@code manual}, you must approve the customer's attempt to pay by calling approve from your server.
+ */
+ public Builder setApprovalMethod(SessionCreateParams.ApprovalMethod approvalMethod) {
+ this.approvalMethod = approvalMethod;
+ return this;
+ }
+
/**
* Settings for automatic tax lookup for this session and resulting payments, invoices, and
* subscriptions.
@@ -21812,6 +21843,21 @@ public enum Display implements ApiRequestParams.EnumParam {
}
}
+ public enum ApprovalMethod implements ApiRequestParams.EnumParam {
+ @SerializedName("auto")
+ AUTO("auto"),
+
+ @SerializedName("manual")
+ MANUAL("manual");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ ApprovalMethod(String value) {
+ this.value = value;
+ }
+ }
+
public enum BillingAddressCollection implements ApiRequestParams.EnumParam {
@SerializedName("auto")
AUTO("auto"),
diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java
index 9d5bd3cbe46..5210cf9fe65 100644
--- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java
+++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java
@@ -328,19 +328,27 @@ public static class FulfillmentDetails {
@SerializedName("selected_fulfillment_option")
SelectedFulfillmentOption selectedFulfillmentOption;
+ /** The fulfillment option overrides for specific line items. */
+ @SerializedName("selected_fulfillment_option_overrides")
+ List
+ selectedFulfillmentOptionOverrides;
+
private FulfillmentDetails(
Address address,
Object email,
Map extraParams,
Object name,
Object phone,
- SelectedFulfillmentOption selectedFulfillmentOption) {
+ SelectedFulfillmentOption selectedFulfillmentOption,
+ List
+ selectedFulfillmentOptionOverrides) {
this.address = address;
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
this.selectedFulfillmentOption = selectedFulfillmentOption;
+ this.selectedFulfillmentOptionOverrides = selectedFulfillmentOptionOverrides;
}
public static Builder builder() {
@@ -360,6 +368,10 @@ public static class Builder {
private SelectedFulfillmentOption selectedFulfillmentOption;
+ private List<
+ RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride>
+ selectedFulfillmentOptionOverrides;
+
/** Finalize and obtain parameter instance from this builder. */
public RequestedSessionUpdateParams.FulfillmentDetails build() {
return new RequestedSessionUpdateParams.FulfillmentDetails(
@@ -368,7 +380,8 @@ public RequestedSessionUpdateParams.FulfillmentDetails build() {
this.extraParams,
this.name,
this.phone,
- this.selectedFulfillmentOption);
+ this.selectedFulfillmentOption,
+ this.selectedFulfillmentOptionOverrides);
}
/** The customer's address. */
@@ -447,6 +460,40 @@ public Builder setSelectedFulfillmentOption(
this.selectedFulfillmentOption = selectedFulfillmentOption;
return this;
}
+
+ /**
+ * Add an element to `selectedFulfillmentOptionOverrides` list. A list is initialized for the
+ * first `add/addAll` call, and subsequent calls adds additional elements to the original
+ * list. See {@link
+ * RequestedSessionUpdateParams.FulfillmentDetails#selectedFulfillmentOptionOverrides} for the
+ * field documentation.
+ */
+ public Builder addSelectedFulfillmentOptionOverride(
+ RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride
+ element) {
+ if (this.selectedFulfillmentOptionOverrides == null) {
+ this.selectedFulfillmentOptionOverrides = new ArrayList<>();
+ }
+ this.selectedFulfillmentOptionOverrides.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `selectedFulfillmentOptionOverrides` list. A list is initialized for
+ * the first `add/addAll` call, and subsequent calls adds additional elements to the original
+ * list. See {@link
+ * RequestedSessionUpdateParams.FulfillmentDetails#selectedFulfillmentOptionOverrides} for the
+ * field documentation.
+ */
+ public Builder addAllSelectedFulfillmentOptionOverride(
+ List
+ elements) {
+ if (this.selectedFulfillmentOptionOverrides == null) {
+ this.selectedFulfillmentOptionOverrides = new ArrayList<>();
+ }
+ this.selectedFulfillmentOptionOverrides.addAll(elements);
+ return this;
+ }
}
@Getter
@@ -858,7 +905,7 @@ public static class Shipping {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Required. The shipping option identifer. */
+ /** Required. The shipping option identifier. */
@SerializedName("shipping_option")
Object shippingOption;
@@ -913,13 +960,336 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Required. The shipping option identifer. */
+ /** Required. The shipping option identifier. */
+ public Builder setShippingOption(String shippingOption) {
+ this.shippingOption = shippingOption;
+ return this;
+ }
+
+ /** Required. The shipping option identifier. */
+ public Builder setShippingOption(EmptyParam shippingOption) {
+ this.shippingOption = shippingOption;
+ return this;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class SelectedFulfillmentOptionOverride {
+ /** The digital fulfillment option. */
+ @SerializedName("digital")
+ Digital digital;
+
+ /**
+ * 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 line item keys that this fulfillment option override applies
+ * to.
+ */
+ @SerializedName("line_item_keys")
+ List lineItemKeys;
+
+ /** The shipping fulfillment option. */
+ @SerializedName("shipping")
+ Shipping shipping;
+
+ /** Required. The type of fulfillment option. */
+ @SerializedName("type")
+ Object type;
+
+ private SelectedFulfillmentOptionOverride(
+ Digital digital,
+ Map extraParams,
+ List lineItemKeys,
+ Shipping shipping,
+ Object type) {
+ this.digital = digital;
+ this.extraParams = extraParams;
+ this.lineItemKeys = lineItemKeys;
+ this.shipping = shipping;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Digital digital;
+
+ private Map extraParams;
+
+ private List lineItemKeys;
+
+ private Shipping shipping;
+
+ private Object type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride
+ build() {
+ return new RequestedSessionUpdateParams.FulfillmentDetails
+ .SelectedFulfillmentOptionOverride(
+ this.digital, this.extraParams, this.lineItemKeys, this.shipping, this.type);
+ }
+
+ /** The digital fulfillment option. */
+ public Builder setDigital(
+ RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride
+ .Digital
+ digital) {
+ this.digital = digital;
+ 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
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#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
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#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 `lineItemKeys` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#lineItemKeys}
+ * for the field documentation.
+ */
+ public Builder addLineItemKey(String element) {
+ if (this.lineItemKeys == null) {
+ this.lineItemKeys = new ArrayList<>();
+ }
+ this.lineItemKeys.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `lineItemKeys` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#lineItemKeys}
+ * for the field documentation.
+ */
+ public Builder addAllLineItemKey(List elements) {
+ if (this.lineItemKeys == null) {
+ this.lineItemKeys = new ArrayList<>();
+ }
+ this.lineItemKeys.addAll(elements);
+ return this;
+ }
+
+ /** The shipping fulfillment option. */
+ public Builder setShipping(
+ RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride
+ .Shipping
+ shipping) {
+ this.shipping = shipping;
+ return this;
+ }
+
+ /** Required. The type of fulfillment option. */
+ public Builder setType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /** Required. The type of fulfillment option. */
+ public Builder setType(EmptyParam type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Digital {
+ /** Required. The digital option identifier. */
+ @SerializedName("digital_option")
+ Object digitalOption;
+
+ /**
+ * 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 Digital(Object digitalOption, Map extraParams) {
+ this.digitalOption = digitalOption;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Object digitalOption;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride
+ .Digital
+ build() {
+ return new RequestedSessionUpdateParams.FulfillmentDetails
+ .SelectedFulfillmentOptionOverride.Digital(this.digitalOption, this.extraParams);
+ }
+
+ /** Required. The digital option identifier. */
+ public Builder setDigitalOption(String digitalOption) {
+ this.digitalOption = digitalOption;
+ return this;
+ }
+
+ /** Required. The digital option identifier. */
+ public Builder setDigitalOption(EmptyParam digitalOption) {
+ this.digitalOption = digitalOption;
+ 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
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Digital#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
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Digital#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 Shipping {
+ /**
+ * 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 shipping option identifier. */
+ @SerializedName("shipping_option")
+ Object shippingOption;
+
+ private Shipping(Map extraParams, Object shippingOption) {
+ this.extraParams = extraParams;
+ this.shippingOption = shippingOption;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object shippingOption;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride
+ .Shipping
+ build() {
+ return new RequestedSessionUpdateParams.FulfillmentDetails
+ .SelectedFulfillmentOptionOverride.Shipping(this.extraParams, this.shippingOption);
+ }
+
+ /**
+ * 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
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Shipping#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
+ * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Shipping#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 shipping option identifier. */
public Builder setShippingOption(String shippingOption) {
this.shippingOption = shippingOption;
return this;
}
- /** Required. The shipping option identifer. */
+ /** Required. The shipping option identifier. */
public Builder setShippingOption(EmptyParam shippingOption) {
this.shippingOption = shippingOption;
return this;
diff --git a/src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java b/src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java
new file mode 100644
index 00000000000..36a9f762258
--- /dev/null
+++ b/src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java
@@ -0,0 +1,100 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.orchestration;
+
+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 PaymentAttemptRetrieveParams extends ApiRequestParams {
+ /** 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;
+
+ private PaymentAttemptRetrieveParams(List expand, Map extraParams) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentAttemptRetrieveParams build() {
+ return new PaymentAttemptRetrieveParams(this.expand, this.extraParams);
+ }
+
+ /**
+ * 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
+ * PaymentAttemptRetrieveParams#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
+ * PaymentAttemptRetrieveParams#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
+ * PaymentAttemptRetrieveParams#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 PaymentAttemptRetrieveParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java
new file mode 100644
index 00000000000..a1cec0742c5
--- /dev/null
+++ b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java
@@ -0,0 +1,558 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.radar;
+
+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 CustomerEvaluationCreateParams extends ApiRequestParams {
+ /** Required. Array of context entries for the evaluation. */
+ @SerializedName("evaluation_context")
+ List evaluationContext;
+
+ /** Required. The type of evaluation event. */
+ @SerializedName("event_type")
+ EventType eventType;
+
+ /** 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;
+
+ private CustomerEvaluationCreateParams(
+ List evaluationContext,
+ EventType eventType,
+ List expand,
+ Map extraParams) {
+ this.evaluationContext = evaluationContext;
+ this.eventType = eventType;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List evaluationContext;
+
+ private EventType eventType;
+
+ private List expand;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CustomerEvaluationCreateParams build() {
+ return new CustomerEvaluationCreateParams(
+ this.evaluationContext, this.eventType, this.expand, this.extraParams);
+ }
+
+ /**
+ * Add an element to `evaluationContext` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * CustomerEvaluationCreateParams#evaluationContext} for the field documentation.
+ */
+ public Builder addEvaluationContext(CustomerEvaluationCreateParams.EvaluationContext element) {
+ if (this.evaluationContext == null) {
+ this.evaluationContext = new ArrayList<>();
+ }
+ this.evaluationContext.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `evaluationContext` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link CustomerEvaluationCreateParams#evaluationContext} for the field documentation.
+ */
+ public Builder addAllEvaluationContext(
+ List elements) {
+ if (this.evaluationContext == null) {
+ this.evaluationContext = new ArrayList<>();
+ }
+ this.evaluationContext.addAll(elements);
+ return this;
+ }
+
+ /** Required. The type of evaluation event. */
+ public Builder setEventType(CustomerEvaluationCreateParams.EventType eventType) {
+ this.eventType = eventType;
+ 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
+ * CustomerEvaluationCreateParams#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
+ * CustomerEvaluationCreateParams#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
+ * CustomerEvaluationCreateParams#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 CustomerEvaluationCreateParams#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 EvaluationContext {
+ /** Client details context. */
+ @SerializedName("client_details")
+ ClientDetails clientDetails;
+
+ /** Customer details context. */
+ @SerializedName("customer_details")
+ CustomerDetails customerDetails;
+
+ /**
+ * 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 context entry. */
+ @SerializedName("type")
+ Type type;
+
+ private EvaluationContext(
+ ClientDetails clientDetails,
+ CustomerDetails customerDetails,
+ Map extraParams,
+ Type type) {
+ this.clientDetails = clientDetails;
+ this.customerDetails = customerDetails;
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private ClientDetails clientDetails;
+
+ private CustomerDetails customerDetails;
+
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CustomerEvaluationCreateParams.EvaluationContext build() {
+ return new CustomerEvaluationCreateParams.EvaluationContext(
+ this.clientDetails, this.customerDetails, this.extraParams, this.type);
+ }
+
+ /** Client details context. */
+ public Builder setClientDetails(
+ CustomerEvaluationCreateParams.EvaluationContext.ClientDetails clientDetails) {
+ this.clientDetails = clientDetails;
+ return this;
+ }
+
+ /** Customer details context. */
+ public Builder setCustomerDetails(
+ CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails customerDetails) {
+ this.customerDetails = customerDetails;
+ 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
+ * CustomerEvaluationCreateParams.EvaluationContext#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 CustomerEvaluationCreateParams.EvaluationContext#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 context entry. */
+ public Builder setType(CustomerEvaluationCreateParams.EvaluationContext.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ClientDetails {
+ /**
+ * 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. ID for the Radar Session associated with the customer
+ * evaluation.
+ */
+ @SerializedName("radar_session")
+ String radarSession;
+
+ private ClientDetails(Map extraParams, String radarSession) {
+ this.extraParams = extraParams;
+ this.radarSession = radarSession;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String radarSession;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CustomerEvaluationCreateParams.EvaluationContext.ClientDetails build() {
+ return new CustomerEvaluationCreateParams.EvaluationContext.ClientDetails(
+ this.extraParams, this.radarSession);
+ }
+
+ /**
+ * 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
+ * CustomerEvaluationCreateParams.EvaluationContext.ClientDetails#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
+ * CustomerEvaluationCreateParams.EvaluationContext.ClientDetails#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. ID for the Radar Session associated with the customer
+ * evaluation.
+ */
+ public Builder setRadarSession(String radarSession) {
+ this.radarSession = radarSession;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CustomerDetails {
+ /** Stripe customer ID. */
+ @SerializedName("customer")
+ String customer;
+
+ /** Customer data. */
+ @SerializedName("customer_data")
+ CustomerData customerData;
+
+ /**
+ * 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 CustomerDetails(
+ String customer, CustomerData customerData, Map