diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3bdc7ecadb4..9ea0390f9e6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v190 \ No newline at end of file +v192 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 62e7ef26f9d..1f2d4ac1f99 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1168,6 +1168,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paynow") Paynow paynow; + @SerializedName("pix") + Pix pix; + @SerializedName("promptpay") Promptpay promptpay; @@ -2435,6 +2438,15 @@ public static class Paynow extends StripeObject { String reference; } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** Unique transaction id generated by BCB. */ + @SerializedName("bank_transaction_id") + String bankTransactionId; + } + @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 8e11adb222f..268b474b90f 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -316,6 +316,14 @@ public class Invoice extends ApiResource implements HasId, MetadataStorerevision documentation for more + * details. + */ + @SerializedName("from_invoice") + FromInvoice fromInvoice; + /** * The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the * invoice has not been finalized yet, this will be null. @@ -342,6 +350,12 @@ public class Invoice extends ApiResource implements HasId, MetadataStore latestRevision; + /** * The individual line items that make up the invoice. {@code lines} is sorted as follows: invoice * items in reverse chronological order, followed by the subscription, if any. @@ -644,6 +658,24 @@ public void setDefaultSourceObject(PaymentSource expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } + /** Get ID of expandable {@code latestRevision} object. */ + public String getLatestRevision() { + return (this.latestRevision != null) ? this.latestRevision.getId() : null; + } + + public void setLatestRevision(String id) { + this.latestRevision = ApiResource.setExpandableFieldId(id, this.latestRevision); + } + + /** Get expanded {@code latestRevision}. */ + public Invoice getLatestRevisionObject() { + return (this.latestRevision != null) ? this.latestRevision.getExpanded() : null; + } + + public void setLatestRevisionObject(Invoice expandableObject) { + this.latestRevision = new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Get ID of expandable {@code onBehalfOf} object. */ public String getOnBehalfOf() { return (this.onBehalfOf != null) ? this.onBehalfOf.getId() : null; @@ -1674,6 +1706,39 @@ public void setDiscountObject(Discount expandableObject) { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FromInvoice extends StripeObject { + /** The relation between this invoice and the cloned invoice. */ + @SerializedName("action") + String action; + + /** The invoice that was cloned. */ + @SerializedName("invoice") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField invoice; + + /** Get ID of expandable {@code invoice} object. */ + public String getInvoice() { + return (this.invoice != null) ? this.invoice.getId() : null; + } + + public void setInvoice(String id) { + this.invoice = ApiResource.setExpandableFieldId(id, this.invoice); + } + + /** Get expanded {@code invoice}. */ + public Invoice getInvoiceObject() { + return (this.invoice != null) ? this.invoice.getExpanded() : null; + } + + public void setInvoiceObject(Invoice expandableObject) { + this.invoice = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 493694520c3..478ca9bffc1 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1455,6 +1455,9 @@ public static class NextAction extends StripeObject { @SerializedName("paynow_display_qr_code") PaynowDisplayQrCode paynowDisplayQrCode; + @SerializedName("pix_display_qr_code") + PixDisplayQrCode pixDisplayQrCode; + @SerializedName("promptpay_display_qr_code") PromptpayDisplayQrCode promptpayDisplayQrCode; @@ -1509,6 +1512,37 @@ public static class PaynowDisplayQrCode extends StripeObject { String imageUrlSvg; } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PixDisplayQrCode extends StripeObject { + /** + * The raw data string used to generate QR code, it should be used together with QR code + * library. + */ + @SerializedName("data") + String data; + + /** The date (unix timestamp) when the PIX expires. */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR + * code. + */ + @SerializedName("hosted_instructions_url") + String hostedInstructionsUrl; + + /** ​​The image_url_png string used to render png QR code. */ + @SerializedName("image_url_png") + String imageUrlPng; + + /** ​​The image_url_svg string used to render svg QR code. */ + @SerializedName("image_url_svg") + String imageUrlSvg; + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -2088,6 +2122,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paynow") Paynow paynow; + @SerializedName("pix") + Pix pix; + @SerializedName("promptpay") Promptpay promptpay; @@ -3054,6 +3091,19 @@ public static class Paynow extends StripeObject { String setupFutureUsage; } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** The timestamp at which the Pix expires. */ + @SerializedName("expires_at") + Long expiresAt; + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 7ed1c2fcfd6..13387f45523 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -147,6 +147,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

Custom * Domains, the URL will use your subdomain. Otherwise, it’ll use {@code checkout.stripe.com.} + * This value is only present when the session is active. */ @SerializedName("url") String url; @@ -840,6 +841,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paynow") Paynow paynow; + @SerializedName("pix") + Pix pix; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -1519,6 +1523,15 @@ public static class Paynow extends StripeObject { String setupFutureUsage; } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** The number of seconds after which Pix payment will expire. */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/treasury/CreditReversal.java b/src/main/java/com/stripe/model/treasury/CreditReversal.java index c690e942cab..23886a33758 100644 --- a/src/main/java/com/stripe/model/treasury/CreditReversal.java +++ b/src/main/java/com/stripe/model/treasury/CreditReversal.java @@ -30,6 +30,10 @@ public class CreditReversal extends ApiResource implements HasId { @SerializedName("amount") Long amount; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created") + Long created; + /** * Three-letter ISO currency code, * in lowercase. Must be a supported currency. diff --git a/src/main/java/com/stripe/model/treasury/DebitReversal.java b/src/main/java/com/stripe/model/treasury/DebitReversal.java index 7e586a93efa..d239ed14231 100644 --- a/src/main/java/com/stripe/model/treasury/DebitReversal.java +++ b/src/main/java/com/stripe/model/treasury/DebitReversal.java @@ -30,6 +30,10 @@ public class DebitReversal extends ApiResource implements HasId { @SerializedName("amount") Long amount; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created") + Long created; + /** * Three-letter ISO currency code, * in lowercase. Must be a supported currency. diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index 57fc92376a7..ea6e3802f2b 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -256,6 +256,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index bd6cf0f05b5..9d3f2ff4427 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -128,6 +128,14 @@ public class InvoiceCreateParams extends ApiRequestParams { @SerializedName("footer") String footer; + /** + * Revise an existing invoice. The new invoice will be created in {@code status=draft}. See the revision documentation for more + * details. + */ + @SerializedName("from_invoice") + FromInvoice fromInvoice; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -210,6 +218,7 @@ private InvoiceCreateParams( List expand, Map extraParams, String footer, + FromInvoice fromInvoice, Object metadata, String onBehalfOf, PaymentSettings paymentSettings, @@ -236,6 +245,7 @@ private InvoiceCreateParams( this.expand = expand; this.extraParams = extraParams; this.footer = footer; + this.fromInvoice = fromInvoice; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; @@ -287,6 +297,8 @@ public static class Builder { private String footer; + private FromInvoice fromInvoice; + private Object metadata; private String onBehalfOf; @@ -324,6 +336,7 @@ public InvoiceCreateParams build() { this.expand, this.extraParams, this.footer, + this.fromInvoice, this.metadata, this.onBehalfOf, this.paymentSettings, @@ -650,6 +663,16 @@ public Builder setFooter(String footer) { return this; } + /** + * Revise an existing invoice. The new invoice will be created in {@code status=draft}. See the + * revision documentation for + * more details. + */ + public Builder setFromInvoice(FromInvoice fromInvoice) { + this.fromInvoice = fromInvoice; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1016,6 +1039,105 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class FromInvoice { + /** + * The relation between the new invoice and the original invoice. Currently, only 'revision' is + * permitted + */ + @SerializedName("action") + Action action; + + /** + * 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 {@code id} of the invoice that will be cloned. */ + @SerializedName("invoice") + String invoice; + + private FromInvoice(Action action, Map extraParams, String invoice) { + this.action = action; + this.extraParams = extraParams; + this.invoice = invoice; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Action action; + + private Map extraParams; + + private String invoice; + + /** Finalize and obtain parameter instance from this builder. */ + public FromInvoice build() { + return new FromInvoice(this.action, this.extraParams, this.invoice); + } + + /** + * The relation between the new invoice and the original invoice. Currently, only 'revision' + * is permitted + */ + public Builder setAction(Action action) { + this.action = action; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceCreateParams.FromInvoice#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceCreateParams.FromInvoice#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 {@code id} of the invoice that will be cloned. */ + public Builder setInvoice(String invoice) { + this.invoice = invoice; + return this; + } + } + + public enum Action implements ApiRequestParams.EnumParam { + @SerializedName("revision") + REVISION("revision"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Action(String value) { + this.value = value; + } + } + } + @Getter public static class PaymentSettings { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 23364d2c3fa..3a4726e628b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -1008,6 +1008,13 @@ public static class PaymentMethodData { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -1084,6 +1091,7 @@ private PaymentMethodData( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -1116,6 +1124,7 @@ private PaymentMethodData( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -1180,6 +1189,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -1222,6 +1233,7 @@ public PaymentMethodData build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -1492,6 +1504,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the * PromptPay payment method. @@ -3699,6 +3720,63 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 PaymentIntentConfirmParams.PaymentMethodData.Pix#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 PaymentIntentConfirmParams.PaymentMethodData.Pix#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 Promptpay { /** @@ -4286,6 +4364,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -4486,6 +4567,13 @@ public static class PaymentMethodOptions { @SerializedName("paynow") Object paynow; + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; + /** * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the * PromptPay payment method options. @@ -4547,6 +4635,7 @@ private PaymentMethodOptions( Object oxxo, Object p24, Object paynow, + Object pix, Object promptpay, Object sepaDebit, Object sofort, @@ -4577,6 +4666,7 @@ private PaymentMethodOptions( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.sepaDebit = sepaDebit; this.sofort = sofort; @@ -4639,6 +4729,8 @@ public static class Builder { private Object paynow; + private Object pix; + private Object promptpay; private Object sepaDebit; @@ -4677,6 +4769,7 @@ public PaymentMethodOptions build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.sepaDebit, this.sofort, @@ -5137,6 +5230,24 @@ public Builder setPaynow(EmptyParam paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the * PromptPay payment method options. @@ -10328,6 +10439,101 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * 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 Pix(Long expiresAfterSeconds, Long expiresAt, Map extraParams) { + this.expiresAfterSeconds = expiresAfterSeconds; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterSeconds; + + private Long expiresAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public Pix build() { + return new Pix(this.expiresAfterSeconds, this.expiresAt, this.extraParams); + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + return this; + } + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + 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 PaymentIntentConfirmParams.PaymentMethodOptions.Pix#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 PaymentIntentConfirmParams.PaymentMethodOptions.Pix#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 Promptpay { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 32e8067c1a1..f3dbba2257e 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1459,6 +1459,13 @@ public static class PaymentMethodData { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -1535,6 +1542,7 @@ private PaymentMethodData( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -1567,6 +1575,7 @@ private PaymentMethodData( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -1631,6 +1640,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -1673,6 +1684,7 @@ public PaymentMethodData build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -1943,6 +1955,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the * PromptPay payment method. @@ -4148,6 +4169,63 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 PaymentIntentCreateParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Pix#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 Promptpay { /** @@ -4735,6 +4813,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -4935,6 +5016,13 @@ public static class PaymentMethodOptions { @SerializedName("paynow") Object paynow; + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; + /** * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the * PromptPay payment method options. @@ -4996,6 +5084,7 @@ private PaymentMethodOptions( Object oxxo, Object p24, Object paynow, + Object pix, Object promptpay, Object sepaDebit, Object sofort, @@ -5026,6 +5115,7 @@ private PaymentMethodOptions( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.sepaDebit = sepaDebit; this.sofort = sofort; @@ -5088,6 +5178,8 @@ public static class Builder { private Object paynow; + private Object pix; + private Object promptpay; private Object sepaDebit; @@ -5126,6 +5218,7 @@ public PaymentMethodOptions build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.sepaDebit, this.sofort, @@ -5586,6 +5679,24 @@ public Builder setPaynow(EmptyParam paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the * PromptPay payment method options. @@ -10777,6 +10888,101 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * 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 Pix(Long expiresAfterSeconds, Long expiresAt, Map extraParams) { + this.expiresAfterSeconds = expiresAfterSeconds; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterSeconds; + + private Long expiresAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public Pix build() { + return new Pix(this.expiresAfterSeconds, this.expiresAt, this.extraParams); + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + return this; + } + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + 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 PaymentIntentCreateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Pix#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 Promptpay { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 91b6018c78f..679c49f2842 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -895,6 +895,13 @@ public static class PaymentMethodData { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -971,6 +978,7 @@ private PaymentMethodData( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -1003,6 +1011,7 @@ private PaymentMethodData( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -1067,6 +1076,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -1109,6 +1120,7 @@ public PaymentMethodData build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -1379,6 +1391,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the * PromptPay payment method. @@ -3686,6 +3707,63 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 PaymentIntentUpdateParams.PaymentMethodData.Pix#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 PaymentIntentUpdateParams.PaymentMethodData.Pix#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 Promptpay { /** @@ -4307,6 +4385,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -4507,6 +4588,13 @@ public static class PaymentMethodOptions { @SerializedName("paynow") Object paynow; + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; + /** * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the * PromptPay payment method options. @@ -4568,6 +4656,7 @@ private PaymentMethodOptions( Object oxxo, Object p24, Object paynow, + Object pix, Object promptpay, Object sepaDebit, Object sofort, @@ -4598,6 +4687,7 @@ private PaymentMethodOptions( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.sepaDebit = sepaDebit; this.sofort = sofort; @@ -4660,6 +4750,8 @@ public static class Builder { private Object paynow; + private Object pix; + private Object promptpay; private Object sepaDebit; @@ -4698,6 +4790,7 @@ public PaymentMethodOptions build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.sepaDebit, this.sofort, @@ -5158,6 +5251,24 @@ public Builder setPaynow(EmptyParam paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the * PromptPay payment method options. @@ -10437,6 +10548,101 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * 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 Pix(Long expiresAfterSeconds, Long expiresAt, Map extraParams) { + this.expiresAfterSeconds = expiresAfterSeconds; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterSeconds; + + private Long expiresAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public Pix build() { + return new Pix(this.expiresAfterSeconds, this.expiresAt, this.extraParams); + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + return this; + } + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + 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 PaymentIntentUpdateParams.PaymentMethodOptions.Pix#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 PaymentIntentUpdateParams.PaymentMethodOptions.Pix#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 Promptpay { /** diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 8e985c66b3b..3d4abfdf3ce 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -2743,6 +2743,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 4162ad518a7..650fc8d5373 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -1900,6 +1900,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index cf222249b18..02240cc4094 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -214,6 +214,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -293,6 +300,7 @@ private PaymentMethodCreateParams( P24 p24, String paymentMethod, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -329,6 +337,7 @@ private PaymentMethodCreateParams( this.p24 = p24; this.paymentMethod = paymentMethod; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -401,6 +410,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -447,6 +458,7 @@ public PaymentMethodCreateParams build() { this.p24, this.paymentMethod, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -779,6 +791,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -3042,6 +3063,61 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 + * PaymentMethodCreateParams.Pix#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 PaymentMethodCreateParams.Pix#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 Promptpay { /** @@ -3687,6 +3763,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index c5e2238bbfe..ea09fb6cc59 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -271,6 +271,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index c50ab79b204..8fb539605de 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -743,6 +743,13 @@ public static class PaymentMethodData { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -819,6 +826,7 @@ private PaymentMethodData( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -851,6 +859,7 @@ private PaymentMethodData( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -915,6 +924,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -957,6 +968,7 @@ public PaymentMethodData build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -1227,6 +1239,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the * PromptPay payment method. @@ -3432,6 +3453,63 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 SetupIntentConfirmParams.PaymentMethodData.Pix#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 SetupIntentConfirmParams.PaymentMethodData.Pix#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 Promptpay { /** @@ -4019,6 +4097,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 7d78bad926c..c73a2bdeef8 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1019,6 +1019,13 @@ public static class PaymentMethodData { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -1095,6 +1102,7 @@ private PaymentMethodData( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -1127,6 +1135,7 @@ private PaymentMethodData( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -1191,6 +1200,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -1233,6 +1244,7 @@ public PaymentMethodData build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -1502,6 +1514,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the * PromptPay payment method. @@ -3707,6 +3728,63 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 SetupIntentCreateParams.PaymentMethodData.Pix#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 SetupIntentCreateParams.PaymentMethodData.Pix#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 Promptpay { /** @@ -4294,6 +4372,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 3e9e597802d..6e5e0fe4d5f 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -582,6 +582,13 @@ public static class PaymentMethodData { @SerializedName("paynow") Paynow paynow; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay * payment method. @@ -658,6 +665,7 @@ private PaymentMethodData( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, Promptpay promptpay, RadarOptions radarOptions, SepaDebit sepaDebit, @@ -690,6 +698,7 @@ private PaymentMethodData( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.sepaDebit = sepaDebit; @@ -754,6 +763,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private Promptpay promptpay; private RadarOptions radarOptions; @@ -796,6 +807,7 @@ public PaymentMethodData build() { this.oxxo, this.p24, this.paynow, + this.pix, this.promptpay, this.radarOptions, this.sepaDebit, @@ -1065,6 +1077,15 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code promptpay} PaymentMethod, this hash contains details about the * PromptPay payment method. @@ -3372,6 +3393,63 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Pix { + /** + * 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 Pix(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 Pix build() { + return new Pix(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 SetupIntentUpdateParams.PaymentMethodData.Pix#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 SetupIntentUpdateParams.PaymentMethodData.Pix#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 Promptpay { /** @@ -3993,6 +4071,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index ab5720c0bb7..21da3e568b0 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -210,8 +210,9 @@ public class SessionCreateParams extends ApiRequestParams { /** * A list of the types of payment methods (e.g., {@code card}) this Checkout Session can accept. * - *

Do not include this attribute if you prefer to manage your payment methods from the Stripe Dashboard. + *

In {@code payment} and {@code subscription} mode, you can omit this attribute to manage your + * payment methods from the Stripe + * Dashboard. It is required in {@code setup} mode. * *

Read more about the supported payment methods and their requirements in our payment method details @@ -3369,6 +3370,10 @@ public static class PaymentMethodOptions { @SerializedName("paynow") Paynow paynow; + /** contains details about the Pix payment method options. */ + @SerializedName("pix") + Pix pix; + /** contains details about the Sepa Debit payment method options. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -3407,6 +3412,7 @@ private PaymentMethodOptions( Oxxo oxxo, P24 p24, Paynow paynow, + Pix pix, SepaDebit sepaDebit, Sofort sofort, UsBankAccount usBankAccount, @@ -3432,6 +3438,7 @@ private PaymentMethodOptions( this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; + this.pix = pix; this.sepaDebit = sepaDebit; this.sofort = sofort; this.usBankAccount = usBankAccount; @@ -3485,6 +3492,8 @@ public static class Builder { private Paynow paynow; + private Pix pix; + private SepaDebit sepaDebit; private Sofort sofort; @@ -3517,6 +3526,7 @@ public PaymentMethodOptions build() { this.oxxo, this.p24, this.paynow, + this.pix, this.sepaDebit, this.sofort, this.usBankAccount, @@ -3670,6 +3680,12 @@ public Builder setPaynow(Paynow paynow) { return this; } + /** contains details about the Pix payment method options. */ + public Builder setPix(Pix pix) { + this.pix = pix; + return this; + } + /** contains details about the Sepa Debit payment method options. */ public Builder setSepaDebit(SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -7011,6 +7027,82 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * 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 Pix(Long expiresAfterSeconds, Map extraParams) { + this.expiresAfterSeconds = expiresAfterSeconds; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterSeconds; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public Pix build() { + return new Pix(this.expiresAfterSeconds, this.extraParams); + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + 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 SessionCreateParams.PaymentMethodOptions.Pix#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 SessionCreateParams.PaymentMethodOptions.Pix#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 SepaDebit { /** @@ -10477,6 +10569,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paynow") PAYNOW("paynow"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"),