diff --git a/API_VERSION b/API_VERSION index 7fa3a2d3c56..4f3a17ddd60 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -577fcb57736b925392ea563c0284df9002c75ac9 \ No newline at end of file +5a9ac40aabbc00a67ae2a186633fc8dd64b25c56 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index edaae7f4520..e9d12ffff22 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2099 \ No newline at end of file +v2103 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 87f2e32c815..5c4659785ee 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ tasks.withType(JavaCompile) { } options.fork = true - options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx1g'] + options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx4g'] options.release = project.targetCompatibility.majorVersion as Integer diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 89d335a0536..afd35346caf 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-09-30.preview"; + public static final String CURRENT = "2025-10-29.preview"; } diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index d0a468c7257..f71e2fca1b4 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1709,7 +1709,14 @@ public PaymentIntent verifyMicrodeposits( @Setter @EqualsAndHashCode(callSuper = false) public static class AmountDetails extends StripeObject { - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -1737,15 +1744,25 @@ public static class AmountDetails extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Shipping extends StripeObject { - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ @SerializedName("amount") Long amount; - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("from_postal_code") String fromPostalCode; - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("to_postal_code") String toPostalCode; } @@ -1758,7 +1775,14 @@ public static class Shipping extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Tax extends StripeObject { - /** Total portion of the amount that is for tax. */ + /** + * The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; } @@ -2790,8 +2814,10 @@ public static class PaymentDetails extends StripeObject { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") String customerReference; @@ -2799,7 +2825,18 @@ public static class PaymentDetails extends StripeObject { @SerializedName("event_details") EventDetails eventDetails; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") String orderReference; diff --git a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java index 6ca0911d59a..5b326a19054 100644 --- a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java +++ b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java @@ -19,7 +19,13 @@ @Setter @EqualsAndHashCode(callSuper = false) public class PaymentIntentAmountDetailsLineItem extends ApiResource implements HasId { - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -40,15 +46,23 @@ public class PaymentIntentAmountDetailsLineItem extends ApiResource implements H @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters + * long. + */ @SerializedName("product_code") String productCode; - /** Name of the product. At most 100 characters long. */ + /** + * The product name of the line item. Required for L3 rates. At most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to the + * card networks. For Paypal, this field is truncated to 127 characters. + */ @SerializedName("product_name") String productName; - /** Number of items of the product. Positive integer. */ + /** The quantity of items. Required for L3 rates. An integer greater than 0. */ @SerializedName("quantity") Long quantity; @@ -56,11 +70,18 @@ public class PaymentIntentAmountDetailsLineItem extends ApiResource implements H @SerializedName("tax") Tax tax; - /** Cost of the product. Non-negative integer. */ + /** + * The unit cost of the line item represented in the smallest currency unit. Required for + * L3 rates. An integer greater than or equal to 0. + */ @SerializedName("unit_cost") Long unitCost; - /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + /** + * A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. + * At most 12 alphanumeric characters long. + */ @SerializedName("unit_of_measure") String unitOfMeasure; @@ -211,7 +232,14 @@ public static class Paypal extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Tax extends StripeObject { - /** Total portion of the amount that is for tax. */ + /** + * The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; } diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index c5d99225a04..cbad3fd300c 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -307,8 +307,10 @@ public static class PaymentDetails { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -334,7 +336,18 @@ public static class PaymentDetails { @SerializedName("lodging") Lodging lodging; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -402,8 +415,10 @@ public Builder setCarRental(ChargeCaptureParams.PaymentDetails.CarRental carRent } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -411,8 +426,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -463,13 +480,35 @@ public Builder setLodging(ChargeCaptureParams.PaymentDetails.Lodging lodging) { return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 7bdfd5e5849..e981d5b75f7 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -454,8 +454,10 @@ public static class PaymentDetails { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -481,7 +483,18 @@ public static class PaymentDetails { @SerializedName("lodging") Lodging lodging; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -549,8 +562,10 @@ public Builder setCarRental(ChargeUpdateParams.PaymentDetails.CarRental carRenta } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -558,8 +573,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -610,13 +627,35 @@ public Builder setLodging(ChargeUpdateParams.PaymentDetails.Lodging lodging) { return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 3e9f5d28667..d47011683a2 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -380,7 +380,14 @@ public Builder setTransferData(PaymentIntentCaptureParams.TransferData transferD @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ @SerializedName("discount_amount") Object discountAmount; @@ -442,13 +449,27 @@ public PaymentIntentCaptureParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -557,7 +578,13 @@ public Builder setTax(EmptyParam tax) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -574,15 +601,27 @@ public static class LineItem { @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ @SerializedName("product_code") String productCode; - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ @SerializedName("product_name") String productName; - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ @SerializedName("quantity") Long quantity; @@ -590,7 +629,11 @@ public static class LineItem { @SerializedName("tax") Tax tax; - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ @SerializedName("unit_cost") Long unitCost; @@ -656,7 +699,14 @@ public PaymentIntentCaptureParams.AmountDetails.LineItem build() { this.unitOfMeasure); } - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; @@ -698,19 +748,31 @@ public Builder setPaymentMethodOptions( return this; } - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ public Builder setProductCode(String productCode) { this.productCode = productCode; return this; } - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ public Builder setProductName(String productName) { this.productName = productName; return this; } - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ public Builder setQuantity(Long quantity) { this.quantity = quantity; return this; @@ -722,7 +784,11 @@ public Builder setTax(PaymentIntentCaptureParams.AmountDetails.LineItem.Tax tax) return this; } - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ public Builder setUnitCost(Long unitCost) { this.unitCost = unitCost; return this; @@ -1321,7 +1387,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -1373,7 +1446,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -1385,7 +1465,11 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @Getter @EqualsAndHashCode(callSuper = false) public static class Shipping { - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ @SerializedName("amount") Object amount; @@ -1398,11 +1482,17 @@ public static class Shipping { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("from_postal_code") Object fromPostalCode; - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("to_postal_code") Object toPostalCode; @@ -1436,13 +1526,21 @@ public PaymentIntentCaptureParams.AmountDetails.Shipping build() { this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; @@ -1476,25 +1574,37 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(String fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(EmptyParam fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(String toPostalCode) { this.toPostalCode = toPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(EmptyParam toPostalCode) { this.toPostalCode = toPostalCode; return this; @@ -1514,7 +1624,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -1566,7 +1683,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -1811,8 +1935,10 @@ public static class PaymentDetails { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -1838,7 +1964,18 @@ public static class PaymentDetails { @SerializedName("lodging") Lodging lodging; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -1906,8 +2043,10 @@ public Builder setCarRental(PaymentIntentCaptureParams.PaymentDetails.CarRental } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -1915,8 +2054,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -1969,13 +2110,35 @@ public Builder setLodging(PaymentIntentCaptureParams.PaymentDetails.Lodging lodg return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index f3db094fa27..b2f0aa3cbea 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -738,7 +738,14 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ @SerializedName("discount_amount") Object discountAmount; @@ -800,13 +807,27 @@ public PaymentIntentConfirmParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -915,7 +936,13 @@ public Builder setTax(EmptyParam tax) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -932,15 +959,27 @@ public static class LineItem { @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ @SerializedName("product_code") String productCode; - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ @SerializedName("product_name") String productName; - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ @SerializedName("quantity") Long quantity; @@ -948,7 +987,11 @@ public static class LineItem { @SerializedName("tax") Tax tax; - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ @SerializedName("unit_cost") Long unitCost; @@ -1014,7 +1057,14 @@ public PaymentIntentConfirmParams.AmountDetails.LineItem build() { this.unitOfMeasure); } - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; @@ -1056,19 +1106,31 @@ public Builder setPaymentMethodOptions( return this; } - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ public Builder setProductCode(String productCode) { this.productCode = productCode; return this; } - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ public Builder setProductName(String productName) { this.productName = productName; return this; } - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ public Builder setQuantity(Long quantity) { this.quantity = quantity; return this; @@ -1080,7 +1142,11 @@ public Builder setTax(PaymentIntentConfirmParams.AmountDetails.LineItem.Tax tax) return this; } - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ public Builder setUnitCost(Long unitCost) { this.unitCost = unitCost; return this; @@ -1679,7 +1745,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -1731,7 +1804,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -1743,7 +1823,11 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @Getter @EqualsAndHashCode(callSuper = false) public static class Shipping { - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ @SerializedName("amount") Object amount; @@ -1756,11 +1840,17 @@ public static class Shipping { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("from_postal_code") Object fromPostalCode; - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("to_postal_code") Object toPostalCode; @@ -1794,13 +1884,21 @@ public PaymentIntentConfirmParams.AmountDetails.Shipping build() { this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; @@ -1834,25 +1932,37 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(String fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(EmptyParam fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(String toPostalCode) { this.toPostalCode = toPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(EmptyParam toPostalCode) { this.toPostalCode = toPostalCode; return this; @@ -1872,7 +1982,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -1924,7 +2041,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -2542,8 +2666,10 @@ public static class PaymentDetails { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -2569,7 +2695,18 @@ public static class PaymentDetails { @SerializedName("lodging") Lodging lodging; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -2637,8 +2774,10 @@ public Builder setCarRental(PaymentIntentConfirmParams.PaymentDetails.CarRental } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -2646,8 +2785,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -2700,13 +2841,35 @@ public Builder setLodging(PaymentIntentConfirmParams.PaymentDetails.Lodging lodg return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 177a0f4f512..c471496785a 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1123,7 +1123,14 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ @SerializedName("discount_amount") Object discountAmount; @@ -1185,13 +1192,27 @@ public PaymentIntentCreateParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -1300,7 +1321,13 @@ public Builder setTax(EmptyParam tax) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -1317,15 +1344,27 @@ public static class LineItem { @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ @SerializedName("product_code") String productCode; - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ @SerializedName("product_name") String productName; - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ @SerializedName("quantity") Long quantity; @@ -1333,7 +1372,11 @@ public static class LineItem { @SerializedName("tax") Tax tax; - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ @SerializedName("unit_cost") Long unitCost; @@ -1399,7 +1442,14 @@ public PaymentIntentCreateParams.AmountDetails.LineItem build() { this.unitOfMeasure); } - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; @@ -1441,19 +1491,31 @@ public Builder setPaymentMethodOptions( return this; } - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ public Builder setProductCode(String productCode) { this.productCode = productCode; return this; } - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ public Builder setProductName(String productName) { this.productName = productName; return this; } - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ public Builder setQuantity(Long quantity) { this.quantity = quantity; return this; @@ -1465,7 +1527,11 @@ public Builder setTax(PaymentIntentCreateParams.AmountDetails.LineItem.Tax tax) return this; } - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ public Builder setUnitCost(Long unitCost) { this.unitCost = unitCost; return this; @@ -2061,7 +2127,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -2113,7 +2186,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -2125,7 +2205,11 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @Getter @EqualsAndHashCode(callSuper = false) public static class Shipping { - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ @SerializedName("amount") Object amount; @@ -2138,11 +2222,17 @@ public static class Shipping { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("from_postal_code") Object fromPostalCode; - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("to_postal_code") Object toPostalCode; @@ -2176,13 +2266,21 @@ public PaymentIntentCreateParams.AmountDetails.Shipping build() { this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; @@ -2216,25 +2314,37 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(String fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(EmptyParam fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(String toPostalCode) { this.toPostalCode = toPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(EmptyParam toPostalCode) { this.toPostalCode = toPostalCode; return this; @@ -2254,7 +2364,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -2306,7 +2423,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -3057,8 +3181,10 @@ public static class PaymentDetails { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -3084,7 +3210,18 @@ public static class PaymentDetails { @SerializedName("lodging") Lodging lodging; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -3152,8 +3289,10 @@ public Builder setCarRental(PaymentIntentCreateParams.PaymentDetails.CarRental c } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -3161,8 +3300,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -3215,13 +3356,35 @@ public Builder setLodging(PaymentIntentCreateParams.PaymentDetails.Lodging lodgi return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 189253fa850..ee6585f11b4 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -324,7 +324,14 @@ public Builder setTransferData( @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ @SerializedName("discount_amount") Object discountAmount; @@ -386,13 +393,27 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -510,7 +531,13 @@ public Builder setTax(EmptyParam tax) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -527,15 +554,27 @@ public static class LineItem { @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ @SerializedName("product_code") String productCode; - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ @SerializedName("product_name") String productName; - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ @SerializedName("quantity") Long quantity; @@ -543,7 +582,11 @@ public static class LineItem { @SerializedName("tax") Tax tax; - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ @SerializedName("unit_cost") Long unitCost; @@ -609,7 +652,14 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem build() this.unitOfMeasure); } - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; @@ -653,19 +703,31 @@ public Builder setPaymentMethodOptions( return this; } - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ public Builder setProductCode(String productCode) { this.productCode = productCode; return this; } - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ public Builder setProductName(String productName) { this.productName = productName; return this; } - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ public Builder setQuantity(Long quantity) { this.quantity = quantity; return this; @@ -678,7 +740,11 @@ public Builder setTax( return this; } - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ public Builder setUnitCost(Long unitCost) { this.unitCost = unitCost; return this; @@ -1289,7 +1355,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -1343,7 +1416,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -1355,7 +1435,11 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @Getter @EqualsAndHashCode(callSuper = false) public static class Shipping { - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ @SerializedName("amount") Object amount; @@ -1368,11 +1452,17 @@ public static class Shipping { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("from_postal_code") Object fromPostalCode; - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("to_postal_code") Object toPostalCode; @@ -1406,13 +1496,21 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails.Shipping build() this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; @@ -1448,25 +1546,37 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(String fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(EmptyParam fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(String toPostalCode) { this.toPostalCode = toPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(EmptyParam toPostalCode) { this.toPostalCode = toPostalCode; return this; @@ -1486,7 +1596,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -1538,7 +1655,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -1781,8 +1905,10 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class PaymentDetails { /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -1796,7 +1922,18 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -1825,8 +1962,10 @@ public PaymentIntentIncrementAuthorizationParams.PaymentDetails build() { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -1834,8 +1973,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -1870,13 +2011,35 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index bd2c517c7e1..5f7ead890b5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1005,7 +1005,14 @@ public Builder setTransferGroup(EmptyParam transferGroup) { @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ @SerializedName("discount_amount") Object discountAmount; @@ -1067,13 +1074,27 @@ public PaymentIntentUpdateParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The total discount applied on the transaction. */ + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -1182,7 +1203,13 @@ public Builder setTax(EmptyParam tax) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ @SerializedName("discount_amount") Long discountAmount; @@ -1199,15 +1226,27 @@ public static class LineItem { @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ @SerializedName("product_code") Object productCode; - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ @SerializedName("product_name") Object productName; - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ @SerializedName("quantity") Long quantity; @@ -1215,7 +1254,11 @@ public static class LineItem { @SerializedName("tax") Tax tax; - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ @SerializedName("unit_cost") Long unitCost; @@ -1281,7 +1324,14 @@ public PaymentIntentUpdateParams.AmountDetails.LineItem build() { this.unitOfMeasure); } - /** The amount an item was discounted for. Positive integer. */ + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; @@ -1323,31 +1373,52 @@ public Builder setPaymentMethodOptions( return this; } - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ public Builder setProductCode(String productCode) { this.productCode = productCode; return this; } - /** Unique identifier of the product. At most 12 characters long. */ + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ public Builder setProductCode(EmptyParam productCode) { this.productCode = productCode; return this; } - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ public Builder setProductName(String productName) { this.productName = productName; return this; } - /** Required. Name of the product. At most 100 characters long. */ + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ public Builder setProductName(EmptyParam productName) { this.productName = productName; return this; } - /** Required. Number of items of the product. Positive integer. */ + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ public Builder setQuantity(Long quantity) { this.quantity = quantity; return this; @@ -1359,7 +1430,11 @@ public Builder setTax(PaymentIntentUpdateParams.AmountDetails.LineItem.Tax tax) return this; } - /** Required. Cost of the product. Non-negative integer. */ + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ public Builder setUnitCost(Long unitCost) { this.unitCost = unitCost; return this; @@ -2018,7 +2093,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -2070,7 +2152,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The total tax on an item. Non-negative integer. */ + /** + * Required. The total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -2082,7 +2171,11 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @Getter @EqualsAndHashCode(callSuper = false) public static class Shipping { - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ @SerializedName("amount") Object amount; @@ -2095,11 +2188,17 @@ public static class Shipping { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("from_postal_code") Object fromPostalCode; - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ @SerializedName("to_postal_code") Object toPostalCode; @@ -2133,13 +2232,21 @@ public PaymentIntentUpdateParams.AmountDetails.Shipping build() { this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; } - /** Portion of the amount that is for shipping. */ + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; @@ -2173,25 +2280,37 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(String fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping source. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setFromPostalCode(EmptyParam fromPostalCode) { this.fromPostalCode = fromPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(String toPostalCode) { this.toPostalCode = toPostalCode; return this; } - /** The postal code that represents the shipping destination. */ + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ public Builder setToPostalCode(EmptyParam toPostalCode) { this.toPostalCode = toPostalCode; return this; @@ -2211,7 +2330,14 @@ public static class Tax { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ @SerializedName("total_tax_amount") Long totalTaxAmount; @@ -2263,7 +2389,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Total portion of the amount that is for tax. */ + /** + * Required. The total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ public Builder setTotalTaxAmount(Long totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; return this; @@ -2794,8 +2927,10 @@ public static class PaymentDetails { CarRental carRental; /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. */ @SerializedName("customer_reference") Object customerReference; @@ -2821,7 +2956,18 @@ public static class PaymentDetails { @SerializedName("lodging") Lodging lodging; - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ @SerializedName("order_reference") Object orderReference; @@ -2889,8 +3035,10 @@ public Builder setCarRental(PaymentIntentUpdateParams.PaymentDetails.CarRental c } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(String customerReference) { this.customerReference = customerReference; @@ -2898,8 +3046,10 @@ public Builder setCustomerReference(String customerReference) { } /** - * Some customers might be required by their company or organization to provide this - * information. If so, provide this value. Otherwise you can ignore this field. + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. */ public Builder setCustomerReference(EmptyParam customerReference) { this.customerReference = customerReference; @@ -2952,13 +3102,35 @@ public Builder setLodging(PaymentIntentUpdateParams.PaymentDetails.Lodging lodgi return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(String orderReference) { this.orderReference = orderReference; return this; } - /** A unique value assigned by the business to identify the transaction. */ + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ public Builder setOrderReference(EmptyParam orderReference) { this.orderReference = orderReference; return this; diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index b54cb34eb10..89c16bbd4d6 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -11119,6 +11119,10 @@ public static class TermsOfService { @SerializedName("account") Account account; + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + @SerializedName("crypto_storer") + CryptoStorer cryptoStorer; + /** * 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. @@ -11133,8 +11137,13 @@ public static class TermsOfService { @SerializedName("storer") Storer storer; - private TermsOfService(Account account, Map extraParams, Storer storer) { + private TermsOfService( + Account account, + CryptoStorer cryptoStorer, + Map extraParams, + Storer storer) { this.account = account; + this.cryptoStorer = cryptoStorer; this.extraParams = extraParams; this.storer = storer; } @@ -11146,6 +11155,8 @@ public static Builder builder() { public static class Builder { private Account account; + private CryptoStorer cryptoStorer; + private Map extraParams; private Storer storer; @@ -11153,7 +11164,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Identity.Attestations.TermsOfService build() { return new AccountUpdateParams.Identity.Attestations.TermsOfService( - this.account, this.extraParams, this.storer); + this.account, this.cryptoStorer, this.extraParams, this.storer); } /** @@ -11167,6 +11178,13 @@ public Builder setAccount( return this; } + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + public Builder setCryptoStorer( + AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer cryptoStorer) { + this.cryptoStorer = cryptoStorer; + 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 @@ -11340,6 +11358,143 @@ public Builder setUserAgent(EmptyParam userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoStorer { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * 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 IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + Object userAgent; + + private CryptoStorer( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer build() { + return new AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + 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 + * AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer#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 + * AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer#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 IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Storer {