smallest currency
diff --git a/src/main/java/com/stripe/model/PaymentLocationCapability.java b/src/main/java/com/stripe/model/PaymentLocationCapability.java
new file mode 100644
index 00000000000..34b2d7b2dc0
--- /dev/null
+++ b/src/main/java/com/stripe/model/PaymentLocationCapability.java
@@ -0,0 +1,270 @@
+// File generated from our OpenAPI spec
+package com.stripe.model;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+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.PaymentLocationCapabilityListParams;
+import com.stripe.param.PaymentLocationCapabilityRetrieveParams;
+import com.stripe.param.PaymentLocationCapabilityUpdateParams;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * A Payment Location Capability represents a capability for a Stripe account at a Payment Location.
+ */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class PaymentLocationCapability extends ApiResource {
+ /** The account for which the capability enables functionality. */
+ @SerializedName("account")
+ String account;
+
+ /**
+ * The identifier for the capability.
+ *
+ * Equal to {@code fr_meal_vouchers_conecs_payments}.
+ */
+ @SerializedName("capability")
+ String capability;
+
+ /**
+ * 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;
+
+ /** The payment location for which the capability enables functionality. */
+ @SerializedName("location")
+ String location;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value.
+ *
+ *
Equal to {@code payment_location_capability}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** Whether the capability has been requested. */
+ @SerializedName("requested")
+ Boolean requested;
+
+ /** Time at which the capability was requested. Measured in seconds since the Unix epoch. */
+ @SerializedName("requested_at")
+ Long requestedAt;
+
+ @SerializedName("requirements")
+ Requirements requirements;
+
+ /**
+ * The status of the capability.
+ *
+ *
One of {@code active}, {@code inactive}, {@code pending}, or {@code unrequested}.
+ */
+ @SerializedName("status")
+ String status;
+
+ /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ public static PaymentLocationCapabilityCollection list(Map params)
+ throws StripeException {
+ return list(params, (RequestOptions) null);
+ }
+
+ /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ public static PaymentLocationCapabilityCollection list(
+ Map params, RequestOptions options) throws StripeException {
+ String path = "/v1/payment_location_capabilities";
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
+ return getGlobalResponseGetter().request(request, PaymentLocationCapabilityCollection.class);
+ }
+
+ /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ public static PaymentLocationCapabilityCollection list(PaymentLocationCapabilityListParams params)
+ throws StripeException {
+ return list(params, (RequestOptions) null);
+ }
+
+ /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ public static PaymentLocationCapabilityCollection list(
+ PaymentLocationCapabilityListParams params, RequestOptions options) throws StripeException {
+ String path = "/v1/payment_location_capabilities";
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, PaymentLocationCapabilityCollection.class);
+ }
+
+ /** Retrieves information about the specified Payment Location Capability. */
+ public static PaymentLocationCapability retrieve(String capability) throws StripeException {
+ return retrieve(capability, (Map) null, (RequestOptions) null);
+ }
+
+ /** Retrieves information about the specified Payment Location Capability. */
+ public static PaymentLocationCapability retrieve(String capability, RequestOptions options)
+ throws StripeException {
+ return retrieve(capability, (Map) null, options);
+ }
+
+ /** Retrieves information about the specified Payment Location Capability. */
+ public static PaymentLocationCapability retrieve(
+ String capability, Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format("/v1/payment_location_capabilities/%s", ApiResource.urlEncodeId(capability));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
+ return getGlobalResponseGetter().request(request, PaymentLocationCapability.class);
+ }
+
+ /** Retrieves information about the specified Payment Location Capability. */
+ public static PaymentLocationCapability retrieve(
+ String capability, PaymentLocationCapabilityRetrieveParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format("/v1/payment_location_capabilities/%s", ApiResource.urlEncodeId(capability));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, PaymentLocationCapability.class);
+ }
+
+ /**
+ * Updates a specified Payment Location Capability. Request or remove a payment location
+ * capability by updating its {@code requested} parameter.
+ */
+ public PaymentLocationCapability update(Map params) throws StripeException {
+ return update(params, (RequestOptions) null);
+ }
+
+ /**
+ * Updates a specified Payment Location Capability. Request or remove a payment location
+ * capability by updating its {@code requested} parameter.
+ */
+ public PaymentLocationCapability update(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_location_capabilities/%s", ApiResource.urlEncodeId(this.getCapability()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getResponseGetter().request(request, PaymentLocationCapability.class);
+ }
+
+ /**
+ * Updates a specified Payment Location Capability. Request or remove a payment location
+ * capability by updating its {@code requested} parameter.
+ */
+ public PaymentLocationCapability update(PaymentLocationCapabilityUpdateParams params)
+ throws StripeException {
+ return update(params, (RequestOptions) null);
+ }
+
+ /**
+ * Updates a specified Payment Location Capability. Request or remove a payment location
+ * capability by updating its {@code requested} parameter.
+ */
+ public PaymentLocationCapability update(
+ PaymentLocationCapabilityUpdateParams params, RequestOptions options) throws StripeException {
+ String path =
+ String.format(
+ "/v1/payment_location_capabilities/%s", ApiResource.urlEncodeId(this.getCapability()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getResponseGetter().request(request, PaymentLocationCapability.class);
+ }
+
+ /**
+ * For more details about Requirements, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Requirements extends StripeObject {
+ /** Fields that need to be collected to keep the capability enabled. */
+ @SerializedName("currently_due")
+ List currentlyDue;
+
+ /**
+ * Description of why the capability is disabled.
+ *
+ * One of {@code account.capability_required}, {@code pending.onboarding}, {@code
+ * pending.review}, {@code rejected.other}, {@code rejected.unsupported_business}, or {@code
+ * requirements.fields_needed}.
+ */
+ @SerializedName("disabled_reason")
+ String disabledReason;
+
+ /**
+ * Fields that are {@code currently_due} and need to be collected again because validation or
+ * verification failed.
+ */
+ @SerializedName("errors")
+ List errors;
+
+ /**
+ * For more details about Errors, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Errors extends StripeObject {
+ /**
+ * The code for the type of error.
+ *
+ * One of {@code information_missing}, or {@code invalid_value_other}.
+ */
+ @SerializedName("code")
+ String code;
+
+ /**
+ * An informative message that indicates the error type and provides additional details about
+ * the error.
+ */
+ @SerializedName("reason")
+ String reason;
+
+ /**
+ * The specific user onboarding requirement field (in the requirements hash) that needs to be
+ * resolved.
+ */
+ @SerializedName("requirement")
+ String requirement;
+ }
+ }
+
+ @Override
+ public void setResponseGetter(StripeResponseGetter responseGetter) {
+ super.setResponseGetter(responseGetter);
+ trySetResponseGetter(requirements, responseGetter);
+ }
+}
diff --git a/src/main/java/com/stripe/model/PaymentLocationCapabilityCollection.java b/src/main/java/com/stripe/model/PaymentLocationCapabilityCollection.java
new file mode 100644
index 00000000000..d087c0887d6
--- /dev/null
+++ b/src/main/java/com/stripe/model/PaymentLocationCapabilityCollection.java
@@ -0,0 +1,5 @@
+// File generated from our OpenAPI spec
+package com.stripe.model;
+
+public class PaymentLocationCapabilityCollection
+ extends StripeCollection {}
diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java
index edd48179795..ac179cc64c7 100644
--- a/src/main/java/com/stripe/model/Subscription.java
+++ b/src/main/java/com/stripe/model/Subscription.java
@@ -386,10 +386,6 @@ public class Subscription extends ApiResource implements HasId, MetadataStore) null, (RequestOptions) null);
+ }
+
+ /**
+ * Pauses a subscription by transitioning it to the paused status. A paused subscription does not
+ * generate invoices and will not advance to new billing periods. The subscription can be resumed
+ * later using the resume endpoint. Cannot pause subscriptions with attached schedules.
+ */
+ public Subscription pause(RequestOptions options) throws StripeException {
+ return pause((Map) null, options);
+ }
+
/**
* Pauses a subscription by transitioning it to the paused status. A paused subscription does not
* generate invoices and will not advance to new billing periods. The subscription can be resumed
@@ -2691,55 +2705,6 @@ public static class PresentmentDetails extends StripeObject {
String presentmentCurrency;
}
- /** Describes changes to the subscription's status. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class StatusDetails extends StripeObject {
- /** Indicates when and why the subscription transitioned to the paused status. */
- @SerializedName("paused")
- Paused paused;
-
- /** Indicates when and why the subscription transitioned to the paused status. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Paused extends StripeObject {
- /** Information on the {@code type=subscription} pause. */
- @SerializedName("subscription")
- InnerSubscription subscription;
-
- /**
- * Unix timestamp in seconds of when the subscription status transitioned to {@code paused}.
- */
- @SerializedName("transitioned_at")
- Long transitionedAt;
-
- /**
- * The type of pause.
- *
- * Equal to {@code subscription}.
- */
- @SerializedName("type")
- String type;
-
- /** Information on the {@code type=subscription} pause. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class InnerSubscription extends StripeObject {
- /**
- * The reason that the subscription was paused.
- *
- *
One of {@code pause_requested}, {@code system}, or {@code
- * trial_end_without_payment_method}.
- */
- @SerializedName("type")
- String type;
- }
- }
- }
-
/**
* For more details about TransferData, please refer to the API Reference.
@@ -2841,7 +2806,6 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(prebilling, responseGetter);
trySetResponseGetter(presentmentDetails, responseGetter);
trySetResponseGetter(schedule, responseGetter);
- trySetResponseGetter(statusDetails, responseGetter);
trySetResponseGetter(testClock, responseGetter);
trySetResponseGetter(transferData, responseGetter);
trySetResponseGetter(trialSettings, responseGetter);
diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java
index 8753ce5b5dd..d4623150749 100644
--- a/src/main/java/com/stripe/model/issuing/Authorization.java
+++ b/src/main/java/com/stripe/model/issuing/Authorization.java
@@ -76,6 +76,9 @@ public class Authorization extends ApiResource
@SerializedName("authorization_method")
String authorizationMethod;
+ @SerializedName("balance_response")
+ BalanceResponse balanceResponse;
+
/** List of balance transactions associated with this authorization. */
@SerializedName("balance_transactions")
List balanceTransactions;
@@ -642,6 +645,37 @@ public static class AmountDetails extends StripeObject {
Long cashbackAmount;
}
+ /**
+ * For more details about BalanceResponse, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BalanceResponse extends StripeObject {
+ /**
+ * The cardholder account type affected by this authorization.
+ *
+ * One of {@code checking}, {@code credit}, {@code default}, {@code other}, {@code savings},
+ * or {@code universal}.
+ */
+ @SerializedName("account_type")
+ String accountType;
+
+ /**
+ * The remaining balance in the cardholder's account after the authorization, in the smallest
+ * currency unit.
+ */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * The currency of the remaining balance in the cardholder's account after the authorization.
+ */
+ @SerializedName("currency")
+ String currency;
+ }
+
/**
* For more details about CryptoTransaction, please refer to the API Reference.
@@ -2032,6 +2066,7 @@ public Authorization reverse(AuthorizationReverseParams params, RequestOptions o
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(amountDetails, responseGetter);
+ trySetResponseGetter(balanceResponse, responseGetter);
trySetResponseGetter(card, responseGetter);
trySetResponseGetter(cardholder, responseGetter);
trySetResponseGetter(fleet, responseGetter);
diff --git a/src/main/java/com/stripe/model/issuing/Dispute.java b/src/main/java/com/stripe/model/issuing/Dispute.java
index d7f8c35c01d..aaf826e0876 100644
--- a/src/main/java/com/stripe/model/issuing/Dispute.java
+++ b/src/main/java/com/stripe/model/issuing/Dispute.java
@@ -15,9 +15,11 @@
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.issuing.DisputeCloseParams;
import com.stripe.param.issuing.DisputeCreateParams;
import com.stripe.param.issuing.DisputeListParams;
import com.stripe.param.issuing.DisputeRetrieveParams;
+import com.stripe.param.issuing.DisputeSimulateNetworkLifecycleDisputeResponseParams;
import com.stripe.param.issuing.DisputeSimulateNetworkLifecyclePreArbitrationResponseParams;
import com.stripe.param.issuing.DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams;
import com.stripe.param.issuing.DisputeSubmitParams;
@@ -1296,6 +1298,100 @@ private TestHelpers(Dispute resource) {
this.resource = resource;
}
+ /** Test helper: closes a test-mode Issuing dispute as won or lost. */
+ public Dispute close(Map params) throws StripeException {
+ return close(params, (RequestOptions) null);
+ }
+
+ /** Test helper: closes a test-mode Issuing dispute as won or lost. */
+ public Dispute close(Map params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/test_helpers/issuing/disputes/%s/close",
+ ApiResource.urlEncodeId(this.resource.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return resource.getResponseGetter().request(request, Dispute.class);
+ }
+
+ /** Test helper: closes a test-mode Issuing dispute as won or lost. */
+ public Dispute close(DisputeCloseParams params) throws StripeException {
+ return close(params, (RequestOptions) null);
+ }
+
+ /** Test helper: closes a test-mode Issuing dispute as won or lost. */
+ public Dispute close(DisputeCloseParams params, RequestOptions options) throws StripeException {
+ String path =
+ String.format(
+ "/v1/test_helpers/issuing/disputes/%s/close",
+ ApiResource.urlEncodeId(this.resource.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return resource.getResponseGetter().request(request, Dispute.class);
+ }
+
+ /**
+ * Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
+ * Dispute using placeholder file tokens. Only supported for Visa disputes.
+ */
+ public Dispute simulateNetworkLifecycleDisputeResponse(Map params)
+ throws StripeException {
+ return simulateNetworkLifecycleDisputeResponse(params, (RequestOptions) null);
+ }
+
+ /**
+ * Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
+ * Dispute using placeholder file tokens. Only supported for Visa disputes.
+ */
+ public Dispute simulateNetworkLifecycleDisputeResponse(
+ Map params, RequestOptions options) throws StripeException {
+ String path =
+ String.format(
+ "/v1/test_helpers/issuing/disputes/%s/simulate_network_lifecycle_dispute_response",
+ ApiResource.urlEncodeId(this.resource.getId()));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return resource.getResponseGetter().request(request, Dispute.class);
+ }
+
+ /**
+ * Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
+ * Dispute using placeholder file tokens. Only supported for Visa disputes.
+ */
+ public Dispute simulateNetworkLifecycleDisputeResponse(
+ DisputeSimulateNetworkLifecycleDisputeResponseParams params) throws StripeException {
+ return simulateNetworkLifecycleDisputeResponse(params, (RequestOptions) null);
+ }
+
+ /**
+ * Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
+ * Dispute using placeholder file tokens. Only supported for Visa disputes.
+ */
+ public Dispute simulateNetworkLifecycleDisputeResponse(
+ DisputeSimulateNetworkLifecycleDisputeResponseParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/test_helpers/issuing/disputes/%s/simulate_network_lifecycle_dispute_response",
+ ApiResource.urlEncodeId(this.resource.getId()));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return resource.getResponseGetter().request(request, Dispute.class);
+ }
+
/**
* Test helper: populates {@code network_lifecycle.pre_arbitration_response} on a test-mode Visa
* Issuing Dispute using placeholder file tokens. Only supported for Visa disputes in the
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java
index 4dfdf8cd7fd..fb8e65f56ce 100644
--- a/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java
@@ -40,12 +40,21 @@ public class PaymentAttemptRecordReportCanceledParams extends ApiRequestParams {
@SerializedName("metadata")
Object metadata;
+ /** Payment evaluations associated with this reported payment. */
+ @SerializedName("payment_evaluations")
+ List paymentEvaluations;
+
private PaymentAttemptRecordReportCanceledParams(
- Long canceledAt, List expand, Map extraParams, Object metadata) {
+ Long canceledAt,
+ List expand,
+ Map extraParams,
+ Object metadata,
+ List paymentEvaluations) {
this.canceledAt = canceledAt;
this.expand = expand;
this.extraParams = extraParams;
this.metadata = metadata;
+ this.paymentEvaluations = paymentEvaluations;
}
public static Builder builder() {
@@ -61,10 +70,12 @@ public static class Builder {
private Object metadata;
+ private List paymentEvaluations;
+
/** Finalize and obtain parameter instance from this builder. */
public PaymentAttemptRecordReportCanceledParams build() {
return new PaymentAttemptRecordReportCanceledParams(
- this.canceledAt, this.expand, this.extraParams, this.metadata);
+ this.canceledAt, this.expand, this.extraParams, this.metadata, this.paymentEvaluations);
}
/** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
@@ -174,5 +185,32 @@ public Builder setMetadata(Map metadata) {
this.metadata = metadata;
return this;
}
+
+ /**
+ * Add an element to `paymentEvaluations` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * PaymentAttemptRecordReportCanceledParams#paymentEvaluations} for the field documentation.
+ */
+ public Builder addPaymentEvaluation(String element) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentAttemptRecordReportCanceledParams#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addAllPaymentEvaluation(List elements) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.addAll(elements);
+ return this;
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java
index 5eb0e47d8c6..aea9e1ce1f2 100644
--- a/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java
+++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java
@@ -47,6 +47,10 @@ public class PaymentAttemptRecordReportFailedParams extends ApiRequestParams {
@SerializedName("metadata")
Object metadata;
+ /** Payment evaluations associated with this reported payment. */
+ @SerializedName("payment_evaluations")
+ List paymentEvaluations;
+
/** Processor information for this payment. */
@SerializedName("processor_details")
ProcessorDetails processorDetails;
@@ -57,12 +61,14 @@ private PaymentAttemptRecordReportFailedParams(
Long failedAt,
FailureCode failureCode,
Object metadata,
+ List paymentEvaluations,
ProcessorDetails processorDetails) {
this.expand = expand;
this.extraParams = extraParams;
this.failedAt = failedAt;
this.failureCode = failureCode;
this.metadata = metadata;
+ this.paymentEvaluations = paymentEvaluations;
this.processorDetails = processorDetails;
}
@@ -81,6 +87,8 @@ public static class Builder {
private Object metadata;
+ private List paymentEvaluations;
+
private ProcessorDetails processorDetails;
/** Finalize and obtain parameter instance from this builder. */
@@ -91,6 +99,7 @@ public PaymentAttemptRecordReportFailedParams build() {
this.failedAt,
this.failureCode,
this.metadata,
+ this.paymentEvaluations,
this.processorDetails);
}
@@ -211,6 +220,33 @@ public Builder setMetadata(Map metadata) {
return this;
}
+ /**
+ * Add an element to `paymentEvaluations` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * PaymentAttemptRecordReportFailedParams#paymentEvaluations} for the field documentation.
+ */
+ public Builder addPaymentEvaluation(String element) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentAttemptRecordReportFailedParams#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addAllPaymentEvaluation(List elements) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.addAll(elements);
+ return this;
+ }
+
/** Processor information for this payment. */
public Builder setProcessorDetails(
PaymentAttemptRecordReportFailedParams.ProcessorDetails processorDetails) {
diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index 3a847c39bb9..3202269c950 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -3789,6 +3789,10 @@ public Builder setFrMealVoucher(EmptyParam frMealVoucher) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class FrMealVoucher {
+ /** Whether to enable meal voucher benefit for this payment. */
+ @SerializedName("enabled")
+ Enabled enabled;
+
/**
* 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.
@@ -3803,7 +3807,8 @@ public static class FrMealVoucher {
@SerializedName("siret")
String siret;
- private FrMealVoucher(Map extraParams, String siret) {
+ private FrMealVoucher(Enabled enabled, Map extraParams, String siret) {
+ this.enabled = enabled;
this.extraParams = extraParams;
this.siret = siret;
}
@@ -3813,6 +3818,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Enabled enabled;
+
private Map extraParams;
private String siret;
@@ -3820,7 +3827,14 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Benefit.FrMealVoucher build() {
return new PaymentIntentConfirmParams.PaymentDetails.Benefit.FrMealVoucher(
- this.extraParams, this.siret);
+ this.enabled, this.extraParams, this.siret);
+ }
+
+ /** Whether to enable meal voucher benefit for this payment. */
+ public Builder setEnabled(
+ PaymentIntentConfirmParams.PaymentDetails.Benefit.FrMealVoucher.Enabled enabled) {
+ this.enabled = enabled;
+ return this;
}
/**
@@ -3859,6 +3873,21 @@ public Builder setSiret(String siret) {
return this;
}
}
+
+ public enum Enabled implements ApiRequestParams.EnumParam {
+ @SerializedName("if_payment_method_is_eligible")
+ IF_PAYMENT_METHOD_IS_ELIGIBLE("if_payment_method_is_eligible"),
+
+ @SerializedName("never")
+ NEVER("never");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Enabled(String value) {
+ this.value = value;
+ }
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
index c2bc4a555c8..166f4e139c4 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
@@ -4310,6 +4310,10 @@ public Builder setFrMealVoucher(EmptyParam frMealVoucher) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class FrMealVoucher {
+ /** Whether to enable meal voucher benefit for this payment. */
+ @SerializedName("enabled")
+ Enabled enabled;
+
/**
* 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.
@@ -4324,7 +4328,8 @@ public static class FrMealVoucher {
@SerializedName("siret")
String siret;
- private FrMealVoucher(Map extraParams, String siret) {
+ private FrMealVoucher(Enabled enabled, Map extraParams, String siret) {
+ this.enabled = enabled;
this.extraParams = extraParams;
this.siret = siret;
}
@@ -4334,6 +4339,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Enabled enabled;
+
private Map extraParams;
private String siret;
@@ -4341,7 +4348,14 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentCreateParams.PaymentDetails.Benefit.FrMealVoucher build() {
return new PaymentIntentCreateParams.PaymentDetails.Benefit.FrMealVoucher(
- this.extraParams, this.siret);
+ this.enabled, this.extraParams, this.siret);
+ }
+
+ /** Whether to enable meal voucher benefit for this payment. */
+ public Builder setEnabled(
+ PaymentIntentCreateParams.PaymentDetails.Benefit.FrMealVoucher.Enabled enabled) {
+ this.enabled = enabled;
+ return this;
}
/**
@@ -4380,6 +4394,21 @@ public Builder setSiret(String siret) {
return this;
}
}
+
+ public enum Enabled implements ApiRequestParams.EnumParam {
+ @SerializedName("if_payment_method_is_eligible")
+ IF_PAYMENT_METHOD_IS_ELIGIBLE("if_payment_method_is_eligible"),
+
+ @SerializedName("never")
+ NEVER("never");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Enabled(String value) {
+ this.value = value;
+ }
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
index 7b90ce87109..93d48ffa6ca 100644
--- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
@@ -4041,6 +4041,10 @@ public Builder setFrMealVoucher(EmptyParam frMealVoucher) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class FrMealVoucher {
+ /** Whether to enable meal voucher benefit for this payment. */
+ @SerializedName("enabled")
+ Enabled enabled;
+
/**
* 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.
@@ -4055,7 +4059,8 @@ public static class FrMealVoucher {
@SerializedName("siret")
Object siret;
- private FrMealVoucher(Map extraParams, Object siret) {
+ private FrMealVoucher(Enabled enabled, Map extraParams, Object siret) {
+ this.enabled = enabled;
this.extraParams = extraParams;
this.siret = siret;
}
@@ -4065,6 +4070,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Enabled enabled;
+
private Map extraParams;
private Object siret;
@@ -4072,7 +4079,14 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentUpdateParams.PaymentDetails.Benefit.FrMealVoucher build() {
return new PaymentIntentUpdateParams.PaymentDetails.Benefit.FrMealVoucher(
- this.extraParams, this.siret);
+ this.enabled, this.extraParams, this.siret);
+ }
+
+ /** Whether to enable meal voucher benefit for this payment. */
+ public Builder setEnabled(
+ PaymentIntentUpdateParams.PaymentDetails.Benefit.FrMealVoucher.Enabled enabled) {
+ this.enabled = enabled;
+ return this;
}
/**
@@ -4117,6 +4131,21 @@ public Builder setSiret(EmptyParam siret) {
return this;
}
}
+
+ public enum Enabled implements ApiRequestParams.EnumParam {
+ @SerializedName("if_payment_method_is_eligible")
+ IF_PAYMENT_METHOD_IS_ELIGIBLE("if_payment_method_is_eligible"),
+
+ @SerializedName("never")
+ NEVER("never");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Enabled(String value) {
+ this.value = value;
+ }
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java b/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java
new file mode 100644
index 00000000000..0928ba0505c
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentLocationCapabilityListParams.java
@@ -0,0 +1,114 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+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 PaymentLocationCapabilityListParams 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;
+
+ /** Required. The location for which the capabilities enable functionality. */
+ @SerializedName("location")
+ String location;
+
+ private PaymentLocationCapabilityListParams(
+ List expand, Map extraParams, String location) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.location = location;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private String location;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentLocationCapabilityListParams build() {
+ return new PaymentLocationCapabilityListParams(this.expand, this.extraParams, this.location);
+ }
+
+ /**
+ * 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
+ * PaymentLocationCapabilityListParams#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
+ * PaymentLocationCapabilityListParams#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
+ * PaymentLocationCapabilityListParams#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 PaymentLocationCapabilityListParams#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 location for which the capabilities enable functionality. */
+ public Builder setLocation(String location) {
+ this.location = location;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java b/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java
new file mode 100644
index 00000000000..bf24731a0aa
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentLocationCapabilityRetrieveParams.java
@@ -0,0 +1,120 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+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 PaymentLocationCapabilityRetrieveParams 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;
+
+ /**
+ * Required. The payment location for which the capability enables functionality.
+ */
+ @SerializedName("location")
+ String location;
+
+ private PaymentLocationCapabilityRetrieveParams(
+ List expand, Map extraParams, String location) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.location = location;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private String location;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentLocationCapabilityRetrieveParams build() {
+ return new PaymentLocationCapabilityRetrieveParams(
+ this.expand, this.extraParams, this.location);
+ }
+
+ /**
+ * 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
+ * PaymentLocationCapabilityRetrieveParams#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
+ * PaymentLocationCapabilityRetrieveParams#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
+ * PaymentLocationCapabilityRetrieveParams#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 PaymentLocationCapabilityRetrieveParams#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 payment location for which the capability enables
+ * functionality.
+ */
+ public Builder setLocation(String location) {
+ this.location = location;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java b/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java
new file mode 100644
index 00000000000..154ad13f7fb
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentLocationCapabilityUpdateParams.java
@@ -0,0 +1,141 @@
+// 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 PaymentLocationCapabilityUpdateParams 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;
+
+ /** Required. The location for which the capability enables functionality. */
+ @SerializedName("location")
+ Object location;
+
+ /**
+ * Required. To request a new capability for the location, set this to {@code
+ * true}. You can remove it from the location by passing {@code false}.
+ */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private PaymentLocationCapabilityUpdateParams(
+ List expand, Map extraParams, Object location, Boolean requested) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.location = location;
+ this.requested = requested;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private Object location;
+
+ private Boolean requested;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentLocationCapabilityUpdateParams build() {
+ return new PaymentLocationCapabilityUpdateParams(
+ this.expand, this.extraParams, this.location, this.requested);
+ }
+
+ /**
+ * 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
+ * PaymentLocationCapabilityUpdateParams#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
+ * PaymentLocationCapabilityUpdateParams#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
+ * PaymentLocationCapabilityUpdateParams#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 PaymentLocationCapabilityUpdateParams#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 location for which the capability enables functionality. */
+ public Builder setLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /** Required. The location for which the capability enables functionality. */
+ public Builder setLocation(EmptyParam location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Required. To request a new capability for the location, set this to {@code
+ * true}. You can remove it from the location by passing {@code false}.
+ */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java
index 4930d6c02a3..46b1951588b 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java
@@ -40,12 +40,21 @@ public class PaymentRecordReportPaymentAttemptCanceledParams extends ApiRequestP
@SerializedName("metadata")
Object metadata;
+ /** Payment evaluations associated with this reported payment. */
+ @SerializedName("payment_evaluations")
+ List paymentEvaluations;
+
private PaymentRecordReportPaymentAttemptCanceledParams(
- Long canceledAt, List expand, Map extraParams, Object metadata) {
+ Long canceledAt,
+ List expand,
+ Map extraParams,
+ Object metadata,
+ List paymentEvaluations) {
this.canceledAt = canceledAt;
this.expand = expand;
this.extraParams = extraParams;
this.metadata = metadata;
+ this.paymentEvaluations = paymentEvaluations;
}
public static Builder builder() {
@@ -61,10 +70,12 @@ public static class Builder {
private Object metadata;
+ private List paymentEvaluations;
+
/** Finalize and obtain parameter instance from this builder. */
public PaymentRecordReportPaymentAttemptCanceledParams build() {
return new PaymentRecordReportPaymentAttemptCanceledParams(
- this.canceledAt, this.expand, this.extraParams, this.metadata);
+ this.canceledAt, this.expand, this.extraParams, this.metadata, this.paymentEvaluations);
}
/** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
@@ -176,5 +187,33 @@ public Builder setMetadata(Map metadata) {
this.metadata = metadata;
return this;
}
+
+ /**
+ * Add an element to `paymentEvaluations` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * PaymentRecordReportPaymentAttemptCanceledParams#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addPaymentEvaluation(String element) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentRecordReportPaymentAttemptCanceledParams#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addAllPaymentEvaluation(List elements) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.addAll(elements);
+ return this;
+ }
}
}
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java
index 003f4308e5a..889cdc25dde 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java
@@ -47,6 +47,10 @@ public class PaymentRecordReportPaymentAttemptFailedParams extends ApiRequestPar
@SerializedName("metadata")
Object metadata;
+ /** Payment evaluations associated with this reported payment. */
+ @SerializedName("payment_evaluations")
+ List paymentEvaluations;
+
/** Processor information for this payment. */
@SerializedName("processor_details")
ProcessorDetails processorDetails;
@@ -57,12 +61,14 @@ private PaymentRecordReportPaymentAttemptFailedParams(
Long failedAt,
FailureCode failureCode,
Object metadata,
+ List paymentEvaluations,
ProcessorDetails processorDetails) {
this.expand = expand;
this.extraParams = extraParams;
this.failedAt = failedAt;
this.failureCode = failureCode;
this.metadata = metadata;
+ this.paymentEvaluations = paymentEvaluations;
this.processorDetails = processorDetails;
}
@@ -81,6 +87,8 @@ public static class Builder {
private Object metadata;
+ private List paymentEvaluations;
+
private ProcessorDetails processorDetails;
/** Finalize and obtain parameter instance from this builder. */
@@ -91,6 +99,7 @@ public PaymentRecordReportPaymentAttemptFailedParams build() {
this.failedAt,
this.failureCode,
this.metadata,
+ this.paymentEvaluations,
this.processorDetails);
}
@@ -214,6 +223,34 @@ public Builder setMetadata(Map metadata) {
return this;
}
+ /**
+ * Add an element to `paymentEvaluations` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * PaymentRecordReportPaymentAttemptFailedParams#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addPaymentEvaluation(String element) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentRecordReportPaymentAttemptFailedParams#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addAllPaymentEvaluation(List elements) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.addAll(elements);
+ return this;
+ }
+
/** Processor information for this payment. */
public Builder setProcessorDetails(
PaymentRecordReportPaymentAttemptFailedParams.ProcessorDetails processorDetails) {
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java
index 577ef85af0b..4684e841b48 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java
@@ -306,6 +306,10 @@ public static class Failed {
@SerializedName("failure_code")
FailureCode failureCode;
+ /** Payment evaluations associated with this reported payment. */
+ @SerializedName("payment_evaluations")
+ List paymentEvaluations;
+
/** Processor information for this payment. */
@SerializedName("processor_details")
ProcessorDetails processorDetails;
@@ -314,10 +318,12 @@ private Failed(
Map extraParams,
Long failedAt,
FailureCode failureCode,
+ List paymentEvaluations,
ProcessorDetails processorDetails) {
this.extraParams = extraParams;
this.failedAt = failedAt;
this.failureCode = failureCode;
+ this.paymentEvaluations = paymentEvaluations;
this.processorDetails = processorDetails;
}
@@ -332,12 +338,18 @@ public static class Builder {
private FailureCode failureCode;
+ private List paymentEvaluations;
+
private ProcessorDetails processorDetails;
/** Finalize and obtain parameter instance from this builder. */
public PaymentRecordReportPaymentAttemptParams.Failed build() {
return new PaymentRecordReportPaymentAttemptParams.Failed(
- this.extraParams, this.failedAt, this.failureCode, this.processorDetails);
+ this.extraParams,
+ this.failedAt,
+ this.failureCode,
+ this.paymentEvaluations,
+ this.processorDetails);
}
/**
@@ -386,6 +398,34 @@ public Builder setFailureCode(
return this;
}
+ /**
+ * Add an element to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentRecordReportPaymentAttemptParams.Failed#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addPaymentEvaluation(String element) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentRecordReportPaymentAttemptParams.Failed#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addAllPaymentEvaluation(List elements) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.addAll(elements);
+ return this;
+ }
+
/** Processor information for this payment. */
public Builder setProcessorDetails(
PaymentRecordReportPaymentAttemptParams.Failed.ProcessorDetails processorDetails) {
diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java
index a6b5c02020f..659d462a483 100644
--- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java
+++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java
@@ -581,6 +581,10 @@ public static class Failed {
@SerializedName("failure_code")
FailureCode failureCode;
+ /** Payment evaluations associated with this reported payment. */
+ @SerializedName("payment_evaluations")
+ List paymentEvaluations;
+
/** Processor information for this payment. */
@SerializedName("processor_details")
ProcessorDetails processorDetails;
@@ -589,10 +593,12 @@ private Failed(
Map extraParams,
Long failedAt,
FailureCode failureCode,
+ List paymentEvaluations,
ProcessorDetails processorDetails) {
this.extraParams = extraParams;
this.failedAt = failedAt;
this.failureCode = failureCode;
+ this.paymentEvaluations = paymentEvaluations;
this.processorDetails = processorDetails;
}
@@ -607,12 +613,18 @@ public static class Builder {
private FailureCode failureCode;
+ private List paymentEvaluations;
+
private ProcessorDetails processorDetails;
/** Finalize and obtain parameter instance from this builder. */
public PaymentRecordReportPaymentParams.Failed build() {
return new PaymentRecordReportPaymentParams.Failed(
- this.extraParams, this.failedAt, this.failureCode, this.processorDetails);
+ this.extraParams,
+ this.failedAt,
+ this.failureCode,
+ this.paymentEvaluations,
+ this.processorDetails);
}
/**
@@ -661,6 +673,34 @@ public Builder setFailureCode(
return this;
}
+ /**
+ * Add an element to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentRecordReportPaymentParams.Failed#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addPaymentEvaluation(String element) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `paymentEvaluations` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
+ * {@link PaymentRecordReportPaymentParams.Failed#paymentEvaluations} for the field
+ * documentation.
+ */
+ public Builder addAllPaymentEvaluation(List elements) {
+ if (this.paymentEvaluations == null) {
+ this.paymentEvaluations = new ArrayList<>();
+ }
+ this.paymentEvaluations.addAll(elements);
+ return this;
+ }
+
/** Processor information for this payment. */
public Builder setProcessorDetails(
PaymentRecordReportPaymentParams.Failed.ProcessorDetails processorDetails) {
diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
index d6313bf0442..769f7214744 100644
--- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
@@ -13092,6 +13092,10 @@ public Builder setFrMealVoucher(EmptyParam frMealVoucher) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class FrMealVoucher {
+ /** Whether to enable meal voucher benefit for this setup intent. */
+ @SerializedName("enabled")
+ Enabled enabled;
+
/**
* 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.
@@ -13106,7 +13110,8 @@ public static class FrMealVoucher {
@SerializedName("siret")
String siret;
- private FrMealVoucher(Map extraParams, String siret) {
+ private FrMealVoucher(Enabled enabled, Map extraParams, String siret) {
+ this.enabled = enabled;
this.extraParams = extraParams;
this.siret = siret;
}
@@ -13116,6 +13121,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Enabled enabled;
+
private Map extraParams;
private String siret;
@@ -13123,7 +13130,14 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public SetupIntentConfirmParams.SetupDetails.Benefit.FrMealVoucher build() {
return new SetupIntentConfirmParams.SetupDetails.Benefit.FrMealVoucher(
- this.extraParams, this.siret);
+ this.enabled, this.extraParams, this.siret);
+ }
+
+ /** Whether to enable meal voucher benefit for this setup intent. */
+ public Builder setEnabled(
+ SetupIntentConfirmParams.SetupDetails.Benefit.FrMealVoucher.Enabled enabled) {
+ this.enabled = enabled;
+ return this;
}
/**
@@ -13162,6 +13176,21 @@ public Builder setSiret(String siret) {
return this;
}
}
+
+ public enum Enabled implements ApiRequestParams.EnumParam {
+ @SerializedName("if_payment_method_is_eligible")
+ IF_PAYMENT_METHOD_IS_ELIGIBLE("if_payment_method_is_eligible"),
+
+ @SerializedName("never")
+ NEVER("never");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Enabled(String value) {
+ this.value = value;
+ }
+ }
}
}
}
diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
index 285327c5c12..5cdc40ffc18 100644
--- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
@@ -13622,6 +13622,10 @@ public Builder setFrMealVoucher(EmptyParam frMealVoucher) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class FrMealVoucher {
+ /** Whether to enable meal voucher benefit for this setup intent. */
+ @SerializedName("enabled")
+ Enabled enabled;
+
/**
* 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.
@@ -13636,7 +13640,8 @@ public static class FrMealVoucher {
@SerializedName("siret")
String siret;
- private FrMealVoucher(Map extraParams, String siret) {
+ private FrMealVoucher(Enabled enabled, Map extraParams, String siret) {
+ this.enabled = enabled;
this.extraParams = extraParams;
this.siret = siret;
}
@@ -13646,6 +13651,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Enabled enabled;
+
private Map extraParams;
private String siret;
@@ -13653,7 +13660,14 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public SetupIntentCreateParams.SetupDetails.Benefit.FrMealVoucher build() {
return new SetupIntentCreateParams.SetupDetails.Benefit.FrMealVoucher(
- this.extraParams, this.siret);
+ this.enabled, this.extraParams, this.siret);
+ }
+
+ /** Whether to enable meal voucher benefit for this setup intent. */
+ public Builder setEnabled(
+ SetupIntentCreateParams.SetupDetails.Benefit.FrMealVoucher.Enabled enabled) {
+ this.enabled = enabled;
+ return this;
}
/**
@@ -13690,6 +13704,21 @@ public Builder setSiret(String siret) {
return this;
}
}
+
+ public enum Enabled implements ApiRequestParams.EnumParam {
+ @SerializedName("if_payment_method_is_eligible")
+ IF_PAYMENT_METHOD_IS_ELIGIBLE("if_payment_method_is_eligible"),
+
+ @SerializedName("never")
+ NEVER("never");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Enabled(String value) {
+ this.value = value;
+ }
+ }
}
}
}
diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
index b58c0b80802..aa7dd60393c 100644
--- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
@@ -13408,6 +13408,10 @@ public Builder setFrMealVoucher(EmptyParam frMealVoucher) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class FrMealVoucher {
+ /** Whether to enable meal voucher benefit for this setup intent. */
+ @SerializedName("enabled")
+ Enabled enabled;
+
/**
* 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.
@@ -13422,7 +13426,8 @@ public static class FrMealVoucher {
@SerializedName("siret")
Object siret;
- private FrMealVoucher(Map extraParams, Object siret) {
+ private FrMealVoucher(Enabled enabled, Map extraParams, Object siret) {
+ this.enabled = enabled;
this.extraParams = extraParams;
this.siret = siret;
}
@@ -13432,6 +13437,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Enabled enabled;
+
private Map extraParams;
private Object siret;
@@ -13439,7 +13446,14 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public SetupIntentUpdateParams.SetupDetails.Benefit.FrMealVoucher build() {
return new SetupIntentUpdateParams.SetupDetails.Benefit.FrMealVoucher(
- this.extraParams, this.siret);
+ this.enabled, this.extraParams, this.siret);
+ }
+
+ /** Whether to enable meal voucher benefit for this setup intent. */
+ public Builder setEnabled(
+ SetupIntentUpdateParams.SetupDetails.Benefit.FrMealVoucher.Enabled enabled) {
+ this.enabled = enabled;
+ return this;
}
/**
@@ -13482,6 +13496,21 @@ public Builder setSiret(EmptyParam siret) {
return this;
}
}
+
+ public enum Enabled implements ApiRequestParams.EnumParam {
+ @SerializedName("if_payment_method_is_eligible")
+ IF_PAYMENT_METHOD_IS_ELIGIBLE("if_payment_method_is_eligible"),
+
+ @SerializedName("never")
+ NEVER("never");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Enabled(String value) {
+ this.value = value;
+ }
+ }
}
}
}
diff --git a/src/main/java/com/stripe/param/SubscriptionPauseParams.java b/src/main/java/com/stripe/param/SubscriptionPauseParams.java
index 4bf6281cdcb..a4958371e1a 100644
--- a/src/main/java/com/stripe/param/SubscriptionPauseParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionPauseParams.java
@@ -37,7 +37,7 @@ public class SubscriptionPauseParams extends ApiRequestParams {
@SerializedName("invoicing_behavior")
InvoicingBehavior invoicingBehavior;
- /** Required. The type of pause to apply. */
+ /** The type of pause to apply. Defaults to {@code subscription}. */
@SerializedName("type")
Type type;
@@ -143,7 +143,7 @@ public Builder setInvoicingBehavior(
return this;
}
- /** Required. The type of pause to apply. */
+ /** The type of pause to apply. Defaults to {@code subscription}. */
public Builder setType(SubscriptionPauseParams.Type type) {
this.type = type;
return this;
diff --git a/src/main/java/com/stripe/param/SubscriptionResumeParams.java b/src/main/java/com/stripe/param/SubscriptionResumeParams.java
index ab11ac58587..67738afcad4 100644
--- a/src/main/java/com/stripe/param/SubscriptionResumeParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionResumeParams.java
@@ -34,14 +34,6 @@ public class SubscriptionResumeParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * Controls whether Stripe attempts payment on the resumption invoice in the resume request, and
- * how payment on that invoice affects the subscription's status. The default is {@code
- * resume_on_payment_attempt}.
- */
- @SerializedName("payment_behavior")
- PaymentBehavior paymentBehavior;
-
/**
* Determines how to handle prorations resulting from
@@ -64,13 +56,11 @@ private SubscriptionResumeParams(
BillingCycleAnchor billingCycleAnchor,
List expand,
Map extraParams,
- PaymentBehavior paymentBehavior,
ProrationBehavior prorationBehavior,
Long prorationDate) {
this.billingCycleAnchor = billingCycleAnchor;
this.expand = expand;
this.extraParams = extraParams;
- this.paymentBehavior = paymentBehavior;
this.prorationBehavior = prorationBehavior;
this.prorationDate = prorationDate;
}
@@ -86,8 +76,6 @@ public static class Builder {
private Map extraParams;
- private PaymentBehavior paymentBehavior;
-
private ProrationBehavior prorationBehavior;
private Long prorationDate;
@@ -98,7 +86,6 @@ public SubscriptionResumeParams build() {
this.billingCycleAnchor,
this.expand,
this.extraParams,
- this.paymentBehavior,
this.prorationBehavior,
this.prorationDate);
}
@@ -166,16 +153,6 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /**
- * Controls whether Stripe attempts payment on the resumption invoice in the resume request, and
- * how payment on that invoice affects the subscription's status. The default is {@code
- * resume_on_payment_attempt}.
- */
- public Builder setPaymentBehavior(SubscriptionResumeParams.PaymentBehavior paymentBehavior) {
- this.paymentBehavior = paymentBehavior;
- return this;
- }
-
/**
* Determines how to handle prorations resulting from
@@ -215,21 +192,6 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam {
}
}
- public enum PaymentBehavior implements ApiRequestParams.EnumParam {
- @SerializedName("resume_on_payment_attempt")
- RESUME_ON_PAYMENT_ATTEMPT("resume_on_payment_attempt"),
-
- @SerializedName("resume_on_payment_success")
- RESUME_ON_PAYMENT_SUCCESS("resume_on_payment_success");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- PaymentBehavior(String value) {
- this.value = value;
- }
- }
-
public enum ProrationBehavior implements ApiRequestParams.EnumParam {
@SerializedName("always_invoice")
ALWAYS_INVOICE("always_invoice"),
diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java
index d3fedb32326..c7287114e56 100644
--- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java
+++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java
@@ -14,7 +14,10 @@
@Getter
@EqualsAndHashCode(callSuper = false)
public class RequestedSessionUpdateParams extends ApiRequestParams {
- /** The discount codes to apply to this requested session. */
+ /**
+ * The discount codes to apply to this requested session. Pass an empty value to remove all
+ * applied discounts.
+ */
@SerializedName("discounts")
Discounts discounts;
@@ -113,7 +116,10 @@ public RequestedSessionUpdateParams build() {
this.sharedMetadata);
}
- /** The discount codes to apply to this requested session. */
+ /**
+ * The discount codes to apply to this requested session. Pass an empty value to remove all
+ * applied discounts.
+ */
public Builder setDiscounts(RequestedSessionUpdateParams.Discounts discounts) {
this.discounts = discounts;
return this;
@@ -308,9 +314,12 @@ public Builder setSharedMetadata(Map sharedMetadata) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Discounts {
- /** Required. Array of discount codes to apply. */
+ /**
+ * Required. Array of discount codes to apply. Pass an empty value to remove
+ * all applied discounts.
+ */
@SerializedName("codes")
- List codes;
+ Object codes;
/**
* Whether to enforce strict eligibility for discount codes. Defaults to true. When false,
@@ -329,7 +338,7 @@ public static class Discounts {
Map extraParams;
private Discounts(
- List codes, Boolean enforceStrictEligibility, Map extraParams) {
+ Object codes, Boolean enforceStrictEligibility, Map extraParams) {
this.codes = codes;
this.enforceStrictEligibility = enforceStrictEligibility;
this.extraParams = extraParams;
@@ -340,7 +349,7 @@ public static Builder builder() {
}
public static class Builder {
- private List codes;
+ private Object codes;
private Boolean enforceStrictEligibility;
@@ -357,11 +366,12 @@ public RequestedSessionUpdateParams.Discounts build() {
* subsequent calls adds additional elements to the original list. See {@link
* RequestedSessionUpdateParams.Discounts#codes} for the field documentation.
*/
+ @SuppressWarnings("unchecked")
public Builder addCode(String element) {
- if (this.codes == null) {
- this.codes = new ArrayList<>();
+ if (this.codes == null || this.codes instanceof EmptyParam) {
+ this.codes = new ArrayList();
}
- this.codes.add(element);
+ ((List) this.codes).add(element);
return this;
}
@@ -370,11 +380,30 @@ public Builder addCode(String element) {
* and subsequent calls adds additional elements to the original list. See {@link
* RequestedSessionUpdateParams.Discounts#codes} for the field documentation.
*/
+ @SuppressWarnings("unchecked")
public Builder addAllCode(List elements) {
- if (this.codes == null) {
- this.codes = new ArrayList<>();
+ if (this.codes == null || this.codes instanceof EmptyParam) {
+ this.codes = new ArrayList();
}
- this.codes.addAll(elements);
+ ((List) this.codes).addAll(elements);
+ return this;
+ }
+
+ /**
+ * Required. Array of discount codes to apply. Pass an empty value to remove
+ * all applied discounts.
+ */
+ public Builder setCodes(EmptyParam codes) {
+ this.codes = codes;
+ return this;
+ }
+
+ /**
+ * Required. Array of discount codes to apply. Pass an empty value to remove
+ * all applied discounts.
+ */
+ public Builder setCodes(List codes) {
+ this.codes = codes;
return this;
}
diff --git a/src/main/java/com/stripe/param/issuing/DisputeCloseParams.java b/src/main/java/com/stripe/param/issuing/DisputeCloseParams.java
new file mode 100644
index 00000000000..92607600021
--- /dev/null
+++ b/src/main/java/com/stripe/param/issuing/DisputeCloseParams.java
@@ -0,0 +1,128 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.issuing;
+
+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 DisputeCloseParams 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;
+
+ /** Required. Whether to close the dispute as {@code won} or {@code lost}. */
+ @SerializedName("status")
+ Status status;
+
+ private DisputeCloseParams(List expand, Map extraParams, Status status) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.status = status;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private Status status;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public DisputeCloseParams build() {
+ return new DisputeCloseParams(this.expand, this.extraParams, this.status);
+ }
+
+ /**
+ * 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
+ * DisputeCloseParams#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
+ * DisputeCloseParams#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
+ * DisputeCloseParams#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 DisputeCloseParams#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. Whether to close the dispute as {@code won} or {@code lost}. */
+ public Builder setStatus(DisputeCloseParams.Status status) {
+ this.status = status;
+ return this;
+ }
+ }
+
+ public enum Status implements ApiRequestParams.EnumParam {
+ @SerializedName("lost")
+ LOST("lost"),
+
+ @SerializedName("won")
+ WON("won");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Status(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/issuing/DisputeSimulateNetworkLifecycleDisputeResponseParams.java b/src/main/java/com/stripe/param/issuing/DisputeSimulateNetworkLifecycleDisputeResponseParams.java
new file mode 100644
index 00000000000..5d2a546aa9d
--- /dev/null
+++ b/src/main/java/com/stripe/param/issuing/DisputeSimulateNetworkLifecycleDisputeResponseParams.java
@@ -0,0 +1,206 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.issuing;
+
+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 DisputeSimulateNetworkLifecycleDisputeResponseParams 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;
+
+ /**
+ * Required. Controls the acquiring merchant's simulated submitted evidence files
+ * for the dispute response stage.
+ */
+ @SerializedName("merchant_evidence_files")
+ MerchantEvidenceFiles merchantEvidenceFiles;
+
+ private DisputeSimulateNetworkLifecycleDisputeResponseParams(
+ List expand,
+ Map extraParams,
+ MerchantEvidenceFiles merchantEvidenceFiles) {
+ this.expand = expand;
+ this.extraParams = extraParams;
+ this.merchantEvidenceFiles = merchantEvidenceFiles;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List expand;
+
+ private Map extraParams;
+
+ private MerchantEvidenceFiles merchantEvidenceFiles;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public DisputeSimulateNetworkLifecycleDisputeResponseParams build() {
+ return new DisputeSimulateNetworkLifecycleDisputeResponseParams(
+ this.expand, this.extraParams, this.merchantEvidenceFiles);
+ }
+
+ /**
+ * 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
+ * DisputeSimulateNetworkLifecycleDisputeResponseParams#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
+ * DisputeSimulateNetworkLifecycleDisputeResponseParams#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
+ * DisputeSimulateNetworkLifecycleDisputeResponseParams#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 DisputeSimulateNetworkLifecycleDisputeResponseParams#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. Controls the acquiring merchant's simulated submitted evidence
+ * files for the dispute response stage.
+ */
+ public Builder setMerchantEvidenceFiles(
+ DisputeSimulateNetworkLifecycleDisputeResponseParams.MerchantEvidenceFiles
+ merchantEvidenceFiles) {
+ this.merchantEvidenceFiles = merchantEvidenceFiles;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MerchantEvidenceFiles {
+ /**
+ * 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. How many simulated merchant evidence file tokens to attach
+ * (between 1 and 12).
+ */
+ @SerializedName("number_to_generate")
+ Long numberToGenerate;
+
+ private MerchantEvidenceFiles(Map extraParams, Long numberToGenerate) {
+ this.extraParams = extraParams;
+ this.numberToGenerate = numberToGenerate;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long numberToGenerate;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public DisputeSimulateNetworkLifecycleDisputeResponseParams.MerchantEvidenceFiles build() {
+ return new DisputeSimulateNetworkLifecycleDisputeResponseParams.MerchantEvidenceFiles(
+ this.extraParams, this.numberToGenerate);
+ }
+
+ /**
+ * 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
+ * DisputeSimulateNetworkLifecycleDisputeResponseParams.MerchantEvidenceFiles#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
+ * DisputeSimulateNetworkLifecycleDisputeResponseParams.MerchantEvidenceFiles#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. How many simulated merchant evidence file tokens to attach
+ * (between 1 and 12).
+ */
+ public Builder setNumberToGenerate(Long numberToGenerate) {
+ this.numberToGenerate = numberToGenerate;
+ return this;
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/service/PaymentLocationCapabilityService.java b/src/main/java/com/stripe/service/PaymentLocationCapabilityService.java
new file mode 100644
index 00000000000..26e8b03c4be
--- /dev/null
+++ b/src/main/java/com/stripe/service/PaymentLocationCapabilityService.java
@@ -0,0 +1,89 @@
+// File generated from our OpenAPI spec
+package com.stripe.service;
+
+import com.google.gson.reflect.TypeToken;
+import com.stripe.exception.StripeException;
+import com.stripe.model.PaymentLocationCapability;
+import com.stripe.model.StripeCollection;
+import com.stripe.net.ApiRequest;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.net.ApiResource;
+import com.stripe.net.ApiService;
+import com.stripe.net.BaseAddress;
+import com.stripe.net.RequestOptions;
+import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.PaymentLocationCapabilityListParams;
+import com.stripe.param.PaymentLocationCapabilityRetrieveParams;
+import com.stripe.param.PaymentLocationCapabilityUpdateParams;
+
+public final class PaymentLocationCapabilityService extends ApiService {
+ public PaymentLocationCapabilityService(StripeResponseGetter responseGetter) {
+ super(responseGetter);
+ }
+
+ /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ public StripeCollection list(
+ PaymentLocationCapabilityListParams params) throws StripeException {
+ return list(params, (RequestOptions) null);
+ }
+ /** Returns a list of {@code PaymentLocationCapability} objects associated with the location. */
+ public StripeCollection list(
+ PaymentLocationCapabilityListParams params, RequestOptions options) throws StripeException {
+ String path = "/v1/payment_location_capabilities";
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return this.request(
+ request, new TypeToken>() {}.getType());
+ }
+ /** Retrieves information about the specified Payment Location Capability. */
+ public PaymentLocationCapability retrieve(
+ String capability, PaymentLocationCapabilityRetrieveParams params) throws StripeException {
+ return retrieve(capability, params, (RequestOptions) null);
+ }
+ /** Retrieves information about the specified Payment Location Capability. */
+ public PaymentLocationCapability retrieve(
+ String capability, PaymentLocationCapabilityRetrieveParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format("/v1/payment_location_capabilities/%s", ApiResource.urlEncodeId(capability));
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return this.request(request, PaymentLocationCapability.class);
+ }
+ /**
+ * Updates a specified Payment Location Capability. Request or remove a payment location
+ * capability by updating its {@code requested} parameter.
+ */
+ public PaymentLocationCapability update(
+ String capability, PaymentLocationCapabilityUpdateParams params) throws StripeException {
+ return update(capability, params, (RequestOptions) null);
+ }
+ /**
+ * Updates a specified Payment Location Capability. Request or remove a payment location
+ * capability by updating its {@code requested} parameter.
+ */
+ public PaymentLocationCapability update(
+ String capability, PaymentLocationCapabilityUpdateParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format("/v1/payment_location_capabilities/%s", ApiResource.urlEncodeId(capability));
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return this.request(request, PaymentLocationCapability.class);
+ }
+}
diff --git a/src/main/java/com/stripe/service/SubscriptionService.java b/src/main/java/com/stripe/service/SubscriptionService.java
index 36ea273fdb6..1b5191a5015 100644
--- a/src/main/java/com/stripe/service/SubscriptionService.java
+++ b/src/main/java/com/stripe/service/SubscriptionService.java
@@ -592,6 +592,22 @@ public Subscription pause(String subscription, SubscriptionPauseParams params)
throws StripeException {
return pause(subscription, params, (RequestOptions) null);
}
+ /**
+ * Pauses a subscription by transitioning it to the paused status. A paused subscription does not
+ * generate invoices and will not advance to new billing periods. The subscription can be resumed
+ * later using the resume endpoint. Cannot pause subscriptions with attached schedules.
+ */
+ public Subscription pause(String subscription, RequestOptions options) throws StripeException {
+ return pause(subscription, (SubscriptionPauseParams) null, options);
+ }
+ /**
+ * Pauses a subscription by transitioning it to the paused status. A paused subscription does not
+ * generate invoices and will not advance to new billing periods. The subscription can be resumed
+ * later using the resume endpoint. Cannot pause subscriptions with attached schedules.
+ */
+ public Subscription pause(String subscription) throws StripeException {
+ return pause(subscription, (SubscriptionPauseParams) null, (RequestOptions) null);
+ }
/**
* Pauses a subscription by transitioning it to the paused status. A paused subscription does not
* generate invoices and will not advance to new billing periods. The subscription can be resumed
diff --git a/src/main/java/com/stripe/service/V1Services.java b/src/main/java/com/stripe/service/V1Services.java
index ad9438bde9c..9585dfbf5ef 100644
--- a/src/main/java/com/stripe/service/V1Services.java
+++ b/src/main/java/com/stripe/service/V1Services.java
@@ -205,6 +205,10 @@ public com.stripe.service.PaymentLinkService paymentLinks() {
return new com.stripe.service.PaymentLinkService(this.getResponseGetter());
}
+ public com.stripe.service.PaymentLocationCapabilityService paymentLocationCapabilities() {
+ return new com.stripe.service.PaymentLocationCapabilityService(this.getResponseGetter());
+ }
+
public com.stripe.service.PaymentLocationService paymentLocations() {
return new com.stripe.service.PaymentLocationService(this.getResponseGetter());
}
diff --git a/src/main/java/com/stripe/service/testhelpers/issuing/DisputeService.java b/src/main/java/com/stripe/service/testhelpers/issuing/DisputeService.java
index 46dbcb6be1e..318d4a0d5b6 100644
--- a/src/main/java/com/stripe/service/testhelpers/issuing/DisputeService.java
+++ b/src/main/java/com/stripe/service/testhelpers/issuing/DisputeService.java
@@ -10,6 +10,8 @@
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.issuing.DisputeCloseParams;
+import com.stripe.param.issuing.DisputeSimulateNetworkLifecycleDisputeResponseParams;
import com.stripe.param.issuing.DisputeSimulateNetworkLifecyclePreArbitrationResponseParams;
import com.stripe.param.issuing.DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams;
@@ -18,6 +20,56 @@ public DisputeService(StripeResponseGetter responseGetter) {
super(responseGetter);
}
+ /** Test helper: closes a test-mode Issuing dispute as won or lost. */
+ public Dispute close(String dispute, DisputeCloseParams params) throws StripeException {
+ return close(dispute, params, (RequestOptions) null);
+ }
+ /** Test helper: closes a test-mode Issuing dispute as won or lost. */
+ public Dispute close(String dispute, DisputeCloseParams params, RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/test_helpers/issuing/disputes/%s/close", ApiResource.urlEncodeId(dispute));
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return this.request(request, Dispute.class);
+ }
+ /**
+ * Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
+ * Dispute using placeholder file tokens. Only supported for Visa disputes.
+ */
+ public Dispute simulateNetworkLifecycleDisputeResponse(
+ String dispute, DisputeSimulateNetworkLifecycleDisputeResponseParams params)
+ throws StripeException {
+ return simulateNetworkLifecycleDisputeResponse(dispute, params, (RequestOptions) null);
+ }
+ /**
+ * Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
+ * Dispute using placeholder file tokens. Only supported for Visa disputes.
+ */
+ public Dispute simulateNetworkLifecycleDisputeResponse(
+ String dispute,
+ DisputeSimulateNetworkLifecycleDisputeResponseParams params,
+ RequestOptions options)
+ throws StripeException {
+ String path =
+ String.format(
+ "/v1/test_helpers/issuing/disputes/%s/simulate_network_lifecycle_dispute_response",
+ ApiResource.urlEncodeId(dispute));
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return this.request(request, Dispute.class);
+ }
/**
* Test helper: populates {@code network_lifecycle.pre_arbitration_response} on a test-mode Visa
* Issuing Dispute using placeholder file tokens. Only supported for Visa disputes in the