From a5e173b362158b28794b4e6e4d2162cca1021b78 Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Wed, 2 Oct 2024 18:38:17 -0400 Subject: [PATCH] codegen --beta --- src/main/java/com/stripe/ApiVersion.java | 3 +- src/main/java/com/stripe/Stripe.java | 1 - .../java/com/stripe/model/CreditNote.java | 73 ++++++++ src/main/java/com/stripe/model/Invoice.java | 97 +++++++++++ .../com/stripe/model/InvoiceLineItem.java | 2 +- src/main/java/com/stripe/model/Quote.java | 26 --- .../com/stripe/model/QuotePreviewInvoice.java | 97 +++++++++++ .../param/AccountSessionCreateParams.java | 162 ++++++++++++++++++ .../ReaderCollectPaymentMethodParams.java | 47 ++++- 9 files changed, 477 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 5563049c180..f10ace355e9 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,6 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2024-06-20"; - public static final String PREVIEW_CURRENT = "cs_ubb_launch"; + public static final String CURRENT = "2024-09-30.acacia"; } diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index ad1acfd3dfd..88995a0e879 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -10,7 +10,6 @@ public abstract class Stripe { public static final int DEFAULT_READ_TIMEOUT = 80 * 1000; public static final String API_VERSION = ApiVersion.CURRENT; - public static final String PREVIEW_API_VERSION = ApiVersion.PREVIEW_CURRENT; public static final String CONNECT_API_BASE = "https://connect.stripe.com"; public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java index 281e53f6ea5..f4540368f66 100644 --- a/src/main/java/com/stripe/model/CreditNote.java +++ b/src/main/java/com/stripe/model/CreditNote.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; +import com.stripe.model.billing.CreditBalanceTransaction; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -148,6 +149,9 @@ public class CreditNote extends ApiResource implements HasId, MetadataStore pretaxCreditAmounts; + /** * Reason for issuing this credit note, one of {@code duplicate}, {@code fraudulent}, {@code * order_change}, or {@code product_unsatisfactory}. @@ -658,6 +662,75 @@ public void setDiscountObject(Discount expandableObject) { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PretaxCreditAmount extends StripeObject { + /** The amount, in cents (or local equivalent), of the pretax credit amount. */ + @SerializedName("amount") + Long amount; + + /** The credit balance transaction that was applied to get this pretax credit amount. */ + @SerializedName("credit_balance_transaction") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField creditBalanceTransaction; + + /** The discount that was applied to get this pretax credit amount. */ + @SerializedName("discount") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField discount; + + /** + * Type of the pretax credit amount referenced. + * + *

One of {@code credit_balance_transaction}, or {@code discount}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code creditBalanceTransaction} object. */ + public String getCreditBalanceTransaction() { + return (this.creditBalanceTransaction != null) ? this.creditBalanceTransaction.getId() : null; + } + + public void setCreditBalanceTransaction(String id) { + this.creditBalanceTransaction = + ApiResource.setExpandableFieldId(id, this.creditBalanceTransaction); + } + + /** Get expanded {@code creditBalanceTransaction}. */ + public CreditBalanceTransaction getCreditBalanceTransactionObject() { + return (this.creditBalanceTransaction != null) + ? this.creditBalanceTransaction.getExpanded() + : null; + } + + public void setCreditBalanceTransactionObject(CreditBalanceTransaction expandableObject) { + this.creditBalanceTransaction = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code discount} object. */ + public String getDiscount() { + return (this.discount != null) ? this.discount.getId() : null; + } + + public void setDiscount(String id) { + this.discount = ApiResource.setExpandableFieldId(id, this.discount); + } + + /** Get expanded {@code discount}. */ + public Discount getDiscountObject() { + return (this.discount != null) ? this.discount.getExpanded() : null; + } + + public void setDiscountObject(Discount expandableObject) { + this.discount = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 9f1583fce7c..cfc2242900e 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; +import com.stripe.model.billing.CreditBalanceTransaction; import com.stripe.model.testhelpers.TestClock; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; @@ -639,6 +640,9 @@ public class Invoice extends ApiResource implements HasId, MetadataStore totalMarginAmounts; + @SerializedName("total_pretax_credit_amounts") + List totalPretaxCreditAmounts; + /** The aggregate amounts calculated per tax rate for all line items. */ @SerializedName("total_tax_amounts") List totalTaxAmounts; @@ -3205,6 +3209,99 @@ public void setMarginObject(Margin expandableObject) { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TotalPretaxCreditAmount extends StripeObject { + /** The amount, in cents (or local equivalent), of the pretax credit amount. */ + @SerializedName("amount") + Long amount; + + /** The credit balance transaction that was applied to get this pretax credit amount. */ + @SerializedName("credit_balance_transaction") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField creditBalanceTransaction; + + /** The discount that was applied to get this pretax credit amount. */ + @SerializedName("discount") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField discount; + + /** The margin that was applied to get this pretax credit amount. */ + @SerializedName("margin") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField margin; + + /** + * Type of the pretax credit amount referenced. + * + *

One of {@code credit_balance_transaction}, {@code discount}, or {@code margin}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code creditBalanceTransaction} object. */ + public String getCreditBalanceTransaction() { + return (this.creditBalanceTransaction != null) ? this.creditBalanceTransaction.getId() : null; + } + + public void setCreditBalanceTransaction(String id) { + this.creditBalanceTransaction = + ApiResource.setExpandableFieldId(id, this.creditBalanceTransaction); + } + + /** Get expanded {@code creditBalanceTransaction}. */ + public CreditBalanceTransaction getCreditBalanceTransactionObject() { + return (this.creditBalanceTransaction != null) + ? this.creditBalanceTransaction.getExpanded() + : null; + } + + public void setCreditBalanceTransactionObject(CreditBalanceTransaction expandableObject) { + this.creditBalanceTransaction = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code discount} object. */ + public String getDiscount() { + return (this.discount != null) ? this.discount.getId() : null; + } + + public void setDiscount(String id) { + this.discount = ApiResource.setExpandableFieldId(id, this.discount); + } + + /** Get expanded {@code discount}. */ + public Discount getDiscountObject() { + return (this.discount != null) ? this.discount.getExpanded() : null; + } + + public void setDiscountObject(Discount expandableObject) { + this.discount = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code margin} object. */ + public String getMargin() { + return (this.margin != null) ? this.margin.getId() : null; + } + + public void setMargin(String id) { + this.margin = ApiResource.setExpandableFieldId(id, this.margin); + } + + /** Get expanded {@code margin}. */ + public Margin getMarginObject() { + return (this.margin != null) ? this.margin.getExpanded() : null; + } + + public void setMarginObject(Margin expandableObject) { + this.margin = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/InvoiceLineItem.java b/src/main/java/com/stripe/model/InvoiceLineItem.java index 7ef2e58ccf6..f07b68a6773 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItem.java +++ b/src/main/java/com/stripe/model/InvoiceLineItem.java @@ -504,7 +504,7 @@ public static class PretaxCreditAmount extends StripeObject { /** * Type of the pretax credit amount referenced. * - *

One of {@code credit_balance_transaction}, or {@code discount}. + *

One of {@code credit_balance_transaction}, {@code discount}, or {@code margin}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index 404dbc20ed3..12524812986 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1874,12 +1874,6 @@ public static class SubscriptionData extends StripeObject { @SerializedName("end_behavior") String endBehavior; - /** The id of the subscription schedule that will be updated when the quote is accepted. */ - @SerializedName("from_schedule") - @Getter(lombok.AccessLevel.NONE) - @Setter(lombok.AccessLevel.NONE) - ExpandableField fromSchedule; - /** The id of the subscription that will be updated when the quote is accepted. */ @SerializedName("from_subscription") @Getter(lombok.AccessLevel.NONE) @@ -1922,26 +1916,6 @@ public static class SubscriptionData extends StripeObject { @SerializedName("trial_period_days") Long trialPeriodDays; - /** Get ID of expandable {@code fromSchedule} object. */ - public String getFromSchedule() { - return (this.fromSchedule != null) ? this.fromSchedule.getId() : null; - } - - public void setFromSchedule(String id) { - this.fromSchedule = ApiResource.setExpandableFieldId(id, this.fromSchedule); - } - - /** Get expanded {@code fromSchedule}. */ - public com.stripe.model.SubscriptionSchedule getFromScheduleObject() { - return (this.fromSchedule != null) ? this.fromSchedule.getExpanded() : null; - } - - public void setFromScheduleObject(com.stripe.model.SubscriptionSchedule expandableObject) { - this.fromSchedule = - new ExpandableField( - expandableObject.getId(), expandableObject); - } - /** Get ID of expandable {@code fromSubscription} object. */ public String getFromSubscription() { return (this.fromSubscription != null) ? this.fromSubscription.getId() : null; diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 9a36401f734..7cf51c1ae99 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; +import com.stripe.model.billing.CreditBalanceTransaction; import com.stripe.model.testhelpers.TestClock; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; @@ -584,6 +585,9 @@ public class QuotePreviewInvoice extends ApiResource implements HasId { @SerializedName("total_margin_amounts") List totalMarginAmounts; + @SerializedName("total_pretax_credit_amounts") + List totalPretaxCreditAmounts; + /** The aggregate amounts calculated per tax rate for all line items. */ @SerializedName("total_tax_amounts") List totalTaxAmounts; @@ -1717,6 +1721,99 @@ public void setMarginObject(Margin expandableObject) { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TotalPretaxCreditAmount extends StripeObject { + /** The amount, in cents (or local equivalent), of the pretax credit amount. */ + @SerializedName("amount") + Long amount; + + /** The credit balance transaction that was applied to get this pretax credit amount. */ + @SerializedName("credit_balance_transaction") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField creditBalanceTransaction; + + /** The discount that was applied to get this pretax credit amount. */ + @SerializedName("discount") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField discount; + + /** The margin that was applied to get this pretax credit amount. */ + @SerializedName("margin") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField margin; + + /** + * Type of the pretax credit amount referenced. + * + *

One of {@code credit_balance_transaction}, {@code discount}, or {@code margin}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code creditBalanceTransaction} object. */ + public String getCreditBalanceTransaction() { + return (this.creditBalanceTransaction != null) ? this.creditBalanceTransaction.getId() : null; + } + + public void setCreditBalanceTransaction(String id) { + this.creditBalanceTransaction = + ApiResource.setExpandableFieldId(id, this.creditBalanceTransaction); + } + + /** Get expanded {@code creditBalanceTransaction}. */ + public CreditBalanceTransaction getCreditBalanceTransactionObject() { + return (this.creditBalanceTransaction != null) + ? this.creditBalanceTransaction.getExpanded() + : null; + } + + public void setCreditBalanceTransactionObject(CreditBalanceTransaction expandableObject) { + this.creditBalanceTransaction = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code discount} object. */ + public String getDiscount() { + return (this.discount != null) ? this.discount.getId() : null; + } + + public void setDiscount(String id) { + this.discount = ApiResource.setExpandableFieldId(id, this.discount); + } + + /** Get expanded {@code discount}. */ + public Discount getDiscountObject() { + return (this.discount != null) ? this.discount.getExpanded() : null; + } + + public void setDiscountObject(Discount expandableObject) { + this.discount = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code margin} object. */ + public String getMargin() { + return (this.margin != null) ? this.margin.getId() : null; + } + + public void setMargin(String id) { + this.margin = ApiResource.setExpandableFieldId(id, this.margin); + } + + /** Get expanded {@code margin}. */ + public Margin getMarginObject() { + return (this.margin != null) ? this.margin.getExpanded() : null; + } + + public void setMarginObject(Margin expandableObject) { + this.margin = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index a954dcae0b0..ba717f005e8 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -227,6 +227,10 @@ public static class Components { @SerializedName("recipients") Recipients recipients; + /** Configuration for the reporting chart embedded component. */ + @SerializedName("reporting_chart") + ReportingChart reportingChart; + /** Configuration for the tax registrations embedded component. */ @SerializedName("tax_registrations") TaxRegistrations taxRegistrations; @@ -258,6 +262,7 @@ private Components( Payouts payouts, PayoutsList payoutsList, Recipients recipients, + ReportingChart reportingChart, TaxRegistrations taxRegistrations, TaxSettings taxSettings) { this.accountManagement = accountManagement; @@ -282,6 +287,7 @@ private Components( this.payouts = payouts; this.payoutsList = payoutsList; this.recipients = recipients; + this.reportingChart = reportingChart; this.taxRegistrations = taxRegistrations; this.taxSettings = taxSettings; } @@ -335,6 +341,8 @@ public static class Builder { private Recipients recipients; + private ReportingChart reportingChart; + private TaxRegistrations taxRegistrations; private TaxSettings taxSettings; @@ -364,6 +372,7 @@ public AccountSessionCreateParams.Components build() { this.payouts, this.payoutsList, this.recipients, + this.reportingChart, this.taxRegistrations, this.taxSettings); } @@ -534,6 +543,13 @@ public Builder setRecipients(AccountSessionCreateParams.Components.Recipients re return this; } + /** Configuration for the reporting chart embedded component. */ + public Builder setReportingChart( + AccountSessionCreateParams.Components.ReportingChart reportingChart) { + this.reportingChart = reportingChart; + return this; + } + /** Configuration for the tax registrations embedded component. */ public Builder setTaxRegistrations( AccountSessionCreateParams.Components.TaxRegistrations taxRegistrations) { @@ -4212,6 +4228,152 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class ReportingChart { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean 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. + * 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 list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private ReportingChart(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.ReportingChart build() { + return new AccountSessionCreateParams.Components.ReportingChart( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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 AccountSessionCreateParams.Components.ReportingChart#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 AccountSessionCreateParams.Components.ReportingChart#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.ReportingChart.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * 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 Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.ReportingChart.Features build() { + return new AccountSessionCreateParams.Components.ReportingChart.Features( + this.extraParams); + } + + /** + * 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 + * AccountSessionCreateParams.Components.ReportingChart.Features#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 + * AccountSessionCreateParams.Components.ReportingChart.Features#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 public static class TaxRegistrations { /** Required. Whether the embedded component is enabled. */ diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java index dc36a1fb565..544b0e5b008 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java @@ -129,6 +129,14 @@ public Builder setPaymentIntent(String paymentIntent) { @Getter public static class CollectConfig { + /** + * This field indicates whether this payment method can be shown again to its customer in a + * checkout flow. Stripe products such as Checkout and Elements use this field to determine + * whether a payment method can be shown as a saved payment method in a checkout flow. + */ + @SerializedName("allow_redisplay") + AllowRedisplay allowRedisplay; + /** Enables cancel button on transaction screens. */ @SerializedName("enable_customer_cancellation") Boolean enableCustomerCancellation; @@ -151,10 +159,12 @@ public static class CollectConfig { Tipping tipping; private CollectConfig( + AllowRedisplay allowRedisplay, Boolean enableCustomerCancellation, Map extraParams, Boolean skipTipping, Tipping tipping) { + this.allowRedisplay = allowRedisplay; this.enableCustomerCancellation = enableCustomerCancellation; this.extraParams = extraParams; this.skipTipping = skipTipping; @@ -166,6 +176,8 @@ public static Builder builder() { } public static class Builder { + private AllowRedisplay allowRedisplay; + private Boolean enableCustomerCancellation; private Map extraParams; @@ -177,7 +189,22 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ReaderCollectPaymentMethodParams.CollectConfig build() { return new ReaderCollectPaymentMethodParams.CollectConfig( - this.enableCustomerCancellation, this.extraParams, this.skipTipping, this.tipping); + this.allowRedisplay, + this.enableCustomerCancellation, + this.extraParams, + this.skipTipping, + this.tipping); + } + + /** + * This field indicates whether this payment method can be shown again to its customer in a + * checkout flow. Stripe products such as Checkout and Elements use this field to determine + * whether a payment method can be shown as a saved payment method in a checkout flow. + */ + public Builder setAllowRedisplay( + ReaderCollectPaymentMethodParams.CollectConfig.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; + return this; } /** Enables cancel button on transaction screens. */ @@ -304,5 +331,23 @@ public Builder putAllExtraParam(Map map) { } } } + + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowRedisplay(String value) { + this.value = value; + } + } } }