diff --git a/API_VERSION b/API_VERSION index 7fa3a2d3c56..1105d43533a 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -577fcb57736b925392ea563c0284df9002c75ac9 \ No newline at end of file +3ccf295957c8cadc88e1463ea3ab4ec683a0314f \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index edaae7f4520..c8ed627ff9c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2099 \ No newline at end of file +v2102 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 9daec974dfd..7940d8b6936 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1519,7 +1519,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; @@ -1547,15 +1554,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; } @@ -1568,7 +1585,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; } @@ -2560,13 +2584,26 @@ public static class WechatPayRedirectToIosApp extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class PaymentDetails extends StripeObject { /** - * 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; - /** 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/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index b88a516eb9f..59f171ab6c6 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -365,7 +365,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; @@ -427,13 +434,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; @@ -542,7 +563,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; @@ -559,15 +586,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; @@ -575,7 +614,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; @@ -641,7 +684,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; @@ -683,19 +733,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; @@ -707,7 +769,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; @@ -1306,7 +1372,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; @@ -1358,7 +1431,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; @@ -1370,7 +1450,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; @@ -1383,11 +1467,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; @@ -1421,13 +1511,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; @@ -1461,25 +1559,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; @@ -1499,7 +1609,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; @@ -1551,7 +1668,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; @@ -1564,8 +1688,10 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @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; @@ -1579,7 +1705,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; @@ -1608,8 +1745,10 @@ public PaymentIntentCaptureParams.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; @@ -1617,8 +1756,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; @@ -1652,13 +1793,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/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index a313790c2e7..1df40e05fd6 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -663,7 +663,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; @@ -725,13 +732,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; @@ -840,7 +861,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; @@ -857,15 +884,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; @@ -873,7 +912,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; @@ -939,7 +982,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; @@ -981,19 +1031,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; @@ -1005,7 +1067,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; @@ -1604,7 +1670,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; @@ -1656,7 +1729,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; @@ -1668,7 +1748,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; @@ -1681,11 +1765,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; @@ -1719,13 +1809,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; @@ -1759,25 +1857,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; @@ -1797,7 +1907,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; @@ -1849,7 +1966,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; @@ -2235,8 +2359,10 @@ public enum Type implements ApiRequestParams.EnumParam { @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; @@ -2250,7 +2376,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; @@ -2279,8 +2416,10 @@ public PaymentIntentConfirmParams.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; @@ -2288,8 +2427,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; @@ -2323,13 +2464,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/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 67e16f7ca70..c9e00b0fff2 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1024,7 +1024,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; @@ -1086,13 +1093,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; @@ -1201,7 +1222,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; @@ -1218,15 +1245,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; @@ -1234,7 +1273,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; @@ -1300,7 +1343,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; @@ -1342,19 +1392,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; @@ -1366,7 +1428,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; @@ -1962,7 +2028,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; @@ -2014,7 +2087,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; @@ -2026,7 +2106,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; @@ -2039,11 +2123,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; @@ -2077,13 +2167,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; @@ -2117,25 +2215,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; @@ -2155,7 +2265,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; @@ -2207,7 +2324,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; @@ -2726,8 +2850,10 @@ public enum Type implements ApiRequestParams.EnumParam { @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; @@ -2741,7 +2867,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; @@ -2770,8 +2907,10 @@ public PaymentIntentCreateParams.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; @@ -2779,8 +2918,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; @@ -2814,13 +2955,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/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index f10203ba281..bbe4dffec66 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -293,7 +293,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; @@ -355,13 +362,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; @@ -479,7 +500,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; @@ -496,15 +523,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; @@ -512,7 +551,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; @@ -578,7 +621,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; @@ -622,19 +672,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; @@ -647,7 +709,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; @@ -1258,7 +1324,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; @@ -1312,7 +1385,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; @@ -1324,7 +1404,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; @@ -1337,11 +1421,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; @@ -1375,13 +1465,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; @@ -1417,25 +1515,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; @@ -1455,7 +1565,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; @@ -1507,7 +1624,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; @@ -1520,8 +1644,10 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @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; @@ -1535,7 +1661,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; @@ -1564,8 +1701,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; @@ -1573,8 +1712,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; @@ -1609,13 +1750,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 f91131ee166..b111bb1fbb4 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -903,7 +903,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; @@ -965,13 +972,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; @@ -1080,7 +1101,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; @@ -1097,15 +1124,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; @@ -1113,7 +1152,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; @@ -1179,7 +1222,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; @@ -1221,31 +1271,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; @@ -1257,7 +1328,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; @@ -1916,7 +1991,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; @@ -1968,7 +2050,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; @@ -1980,7 +2069,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; @@ -1993,11 +2086,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; @@ -2031,13 +2130,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; @@ -2071,25 +2178,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; @@ -2109,7 +2228,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; @@ -2161,7 +2287,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; @@ -2174,8 +2307,10 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { @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; @@ -2189,7 +2324,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; @@ -2218,8 +2364,10 @@ public PaymentIntentUpdateParams.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; @@ -2227,8 +2375,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; @@ -2262,13 +2412,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;