From 056c0d4d2f2baafa060d9b7c50ce1926cb262455 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:47:33 -0700 Subject: [PATCH] Update generated code (#1700) * Update generated code for v445 * Update generated code for v446 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- applicationfee.go | 4 ++-- balancetransaction.go | 10 +++++----- charge.go | 4 ++-- checkout_session.go | 4 ++-- connectcollectiontransfer.go | 2 +- coupon.go | 2 +- creditnote.go | 22 +++++++++++----------- creditnotelineitem.go | 12 ++++++------ feerefund.go | 2 +- invoice.go | 20 ++++++++++---------- invoicelineitem.go | 8 ++++---- lineitem.go | 2 +- paymentintent.go | 13 +++++++++++++ paymentlink.go | 2 +- payout.go | 2 +- plan.go | 4 ++-- price.go | 8 ++++---- quote.go | 8 ++++---- refund.go | 2 +- transfer.go | 4 ++-- transferreversal.go | 2 +- 22 files changed, 76 insertions(+), 63 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fe3c62ed6f..dae9a81fbb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v444 \ No newline at end of file +v446 \ No newline at end of file diff --git a/applicationfee.go b/applicationfee.go index bc7c5bcd94..10f18bef29 100644 --- a/applicationfee.go +++ b/applicationfee.go @@ -25,9 +25,9 @@ type ApplicationFee struct { APIResource // ID of the Stripe account this fee was taken from. Account *Account `json:"account"` - // Amount earned, in %s. + // Amount earned, in cents (or local equivalent). Amount int64 `json:"amount"` - // Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) + // Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) AmountRefunded int64 `json:"amount_refunded"` // ID of the Connect application that earned the fee. Application *Application `json:"application"` diff --git a/balancetransaction.go b/balancetransaction.go index 5bfa3b0e56..76efd8e4ae 100644 --- a/balancetransaction.go +++ b/balancetransaction.go @@ -136,7 +136,7 @@ type BalanceTransactionParams struct { Params `form:"*"` } -// Detailed breakdown of fees (in %s) paid for this transaction. +// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. type BalanceTransactionFeeDetail struct { // Amount of the fee, in cents. Amount int64 `json:"amount"` @@ -156,7 +156,7 @@ type BalanceTransactionFeeDetail struct { // Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) type BalanceTransaction struct { APIResource - // Gross amount of the transaction, in %s. + // Gross amount of the transaction, in cents (or local equivalent). Amount int64 `json:"amount"` // The date the transaction's net funds will become available in the Stripe balance. AvailableOn int64 `json:"available_on"` @@ -168,13 +168,13 @@ type BalanceTransaction struct { Description string `json:"description"` // The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. ExchangeRate float64 `json:"exchange_rate"` - // Fees (in %s) paid for this transaction. + // Fees (in cents (or local equivalent)) paid for this transaction. Fee int64 `json:"fee"` - // Detailed breakdown of fees (in %s) paid for this transaction. + // Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. FeeDetails []*BalanceTransactionFeeDetail `json:"fee_details"` // Unique identifier for the object. ID string `json:"id"` - // Net amount of the transaction, in %s. + // Net amount of the transaction, in cents (or local equivalent). Net int64 `json:"net"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` diff --git a/charge.go b/charge.go index 80b273b503..2f2730ddcb 100644 --- a/charge.go +++ b/charge.go @@ -1087,9 +1087,9 @@ type Charge struct { APIResource // Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). Amount int64 `json:"amount"` - // Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). + // Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). AmountCaptured int64 `json:"amount_captured"` - // Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). + // Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). AmountRefunded int64 `json:"amount_refunded"` // ID of the Connect application that created the charge. Application *Application `json:"application"` diff --git a/checkout_session.go b/checkout_session.go index f6b6907459..21f761fa39 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -2233,7 +2233,7 @@ type CheckoutSessionShippingCostTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CheckoutSessionShippingCostTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } @@ -2284,7 +2284,7 @@ type CheckoutSessionTotalDetailsBreakdownTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } type CheckoutSessionTotalDetailsBreakdown struct { diff --git a/connectcollectiontransfer.go b/connectcollectiontransfer.go index 4ddc2bcf51..4a550012ba 100644 --- a/connectcollectiontransfer.go +++ b/connectcollectiontransfer.go @@ -9,7 +9,7 @@ package stripe import "encoding/json" type ConnectCollectionTransfer struct { - // Amount transferred, in %s. + // Amount transferred, in cents (or local equivalent). Amount int64 `json:"amount"` // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Currency Currency `json:"currency"` diff --git a/coupon.go b/coupon.go index 659c6d1cd1..44c437b965 100644 --- a/coupon.go +++ b/coupon.go @@ -109,7 +109,7 @@ type Coupon struct { Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. + // Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. PercentOff float64 `json:"percent_off"` // Date after which the coupon can no longer be redeemed. RedeemBy int64 `json:"redeem_by"` diff --git a/creditnote.go b/creditnote.go index 592605331e..4533796de5 100644 --- a/creditnote.go +++ b/creditnote.go @@ -274,9 +274,9 @@ type CreditNoteListLinesParams struct { CreditNote *string `form:"-"` // Included in URL } -// The integer amount in %s representing the total amount of discount that was credited. +// The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. type CreditNoteDiscountAmount struct { - // The amount, in %s, of the discount. + // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` @@ -292,7 +292,7 @@ type CreditNoteShippingCostTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CreditNoteShippingCostTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } @@ -312,13 +312,13 @@ type CreditNoteShippingCost struct { // The aggregate amounts calculated per tax rate for all line items. type CreditNoteTaxAmount struct { - // The amount, in %s, of the tax. + // The amount, in cents (or local equivalent), of the tax. Amount int64 `json:"amount"` // Whether this tax amount is inclusive or exclusive. Inclusive bool `json:"inclusive"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason CreditNoteTaxAmountTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` // The tax rate that was applied to get this tax amount. TaxRate *TaxRate `json:"tax_rate"` @@ -329,7 +329,7 @@ type CreditNoteTaxAmount struct { // Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) type CreditNote struct { APIResource - // The integer amount in %s representing the total amount of the credit note, including tax. + // The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. Amount int64 `json:"amount"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` @@ -341,7 +341,7 @@ type CreditNote struct { Customer *Customer `json:"customer"` // Customer balance transaction related to this credit note. CustomerBalanceTransaction *CustomerBalanceTransaction `json:"customer_balance_transaction"` - // The integer amount in %s representing the total amount of discount that was credited. + // The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. DiscountAmount int64 `json:"discount_amount"` // The aggregate amounts calculated per discount for all line items. DiscountAmounts []*CreditNoteDiscountAmount `json:"discount_amounts"` @@ -375,15 +375,15 @@ type CreditNote struct { ShippingCost *CreditNoteShippingCost `json:"shipping_cost"` // Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). Status CreditNoteStatus `json:"status"` - // The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + // The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. Subtotal int64 `json:"subtotal"` - // The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. + // The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"` // The aggregate amounts calculated per tax rate for all line items. TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"` - // The integer amount in %s representing the total amount of the credit note, including tax and all discount. + // The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. Total int64 `json:"total"` - // The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. + // The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. TotalExcludingTax int64 `json:"total_excluding_tax"` // Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. Type CreditNoteType `json:"type"` diff --git a/creditnotelineitem.go b/creditnotelineitem.go index 1fe93f8d68..f5b7ba4a1a 100644 --- a/creditnotelineitem.go +++ b/creditnotelineitem.go @@ -15,9 +15,9 @@ const ( CreditNoteLineItemTypeInvoiceLineItem CreditNoteLineItemType = "invoice_line_item" ) -// The integer amount in %s representing the discount being credited for this line item. +// The integer amount in cents (or local equivalent) representing the discount being credited for this line item. type CreditNoteLineItemDiscountAmount struct { - // The amount, in %s, of the discount. + // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` @@ -26,13 +26,13 @@ type CreditNoteLineItemDiscountAmount struct { // CreditNoteLineItem is the resource representing a Stripe credit note line item. // For more details see https://stripe.com/docs/api/credit_notes/line_item type CreditNoteLineItem struct { - // The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + // The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. Amount int64 `json:"amount"` - // The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. + // The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. AmountExcludingTax int64 `json:"amount_excluding_tax"` // Description of the item being credited. Description string `json:"description"` - // The integer amount in %s representing the discount being credited for this line item. + // The integer amount in cents (or local equivalent) representing the discount being credited for this line item. DiscountAmount int64 `json:"discount_amount"` // The amount of discount calculated per discount for this line item DiscountAmounts []*CreditNoteLineItemDiscountAmount `json:"discount_amounts"` @@ -56,7 +56,7 @@ type CreditNoteLineItem struct { UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` - // The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + // The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"` } diff --git a/feerefund.go b/feerefund.go index d2f7593ff9..01bc5a6624 100644 --- a/feerefund.go +++ b/feerefund.go @@ -38,7 +38,7 @@ type FeeRefundListParams struct { // Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) type FeeRefund struct { APIResource - // Amount, in %s. + // Amount, in cents (or local equivalent). Amount int64 `json:"amount"` // Balance transaction that describes the impact on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` diff --git a/invoice.go b/invoice.go index 35ee2680d2..9c509528e9 100644 --- a/invoice.go +++ b/invoice.go @@ -1086,7 +1086,7 @@ type InvoiceShippingCostTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason InvoiceShippingCostTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } @@ -1136,7 +1136,7 @@ type InvoiceThresholdReason struct { // The aggregate amounts calculated per discount across all line items. type InvoiceTotalDiscountAmount struct { - // The amount, in %s, of the discount. + // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` @@ -1144,13 +1144,13 @@ type InvoiceTotalDiscountAmount struct { // The aggregate amounts calculated per tax rate for all line items. type InvoiceTotalTaxAmount struct { - // The amount, in %s, of the tax. + // The amount, in cents (or local equivalent), of the tax. Amount int64 `json:"amount"` // Whether this tax amount is inclusive or exclusive. Inclusive bool `json:"inclusive"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason InvoiceTotalTaxAmountTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` // The tax rate that was applied to get this tax amount. TaxRate *TaxRate `json:"tax_rate"` @@ -1158,7 +1158,7 @@ type InvoiceTotalTaxAmount struct { // The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. type InvoiceTransferData struct { - // The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + // The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. Amount int64 `json:"amount"` // The account where funds from the payment will be transferred to upon payment success. Destination *Account `json:"destination"` @@ -1206,15 +1206,15 @@ type Invoice struct { AccountTaxIDs []*TaxID `json:"account_tax_ids"` // Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. AmountDue int64 `json:"amount_due"` - // The amount, in %s, that was paid. + // The amount, in cents (or local equivalent), that was paid. AmountPaid int64 `json:"amount_paid"` - // The difference between amount_due and amount_paid, in %s. + // The difference between amount_due and amount_paid, in cents (or local equivalent). AmountRemaining int64 `json:"amount_remaining"` // This is the sum of all the shipping amounts. AmountShipping int64 `json:"amount_shipping"` // ID of the Connect Application that created the invoice. Application *Application `json:"application"` - // The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + // The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. ApplicationFeeAmount int64 `json:"application_fee_amount"` // Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. AttemptCount int64 `json:"attempt_count"` @@ -1338,7 +1338,7 @@ type Invoice struct { SubscriptionProrationDate int64 `json:"subscription_proration_date"` // Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated Subtotal int64 `json:"subtotal"` - // The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + // The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"` // The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. Tax int64 `json:"tax"` @@ -1349,7 +1349,7 @@ type Invoice struct { Total int64 `json:"total"` // The aggregate amounts calculated per discount across all line items. TotalDiscountAmounts []*InvoiceTotalDiscountAmount `json:"total_discount_amounts"` - // The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. + // The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. TotalExcludingTax int64 `json:"total_excluding_tax"` // The aggregate amounts calculated per tax rate for all line items. TotalTaxAmounts []*InvoiceTotalTaxAmount `json:"total_tax_amounts"` diff --git a/invoicelineitem.go b/invoicelineitem.go index c8c1e1c463..e3e5f5bb64 100644 --- a/invoicelineitem.go +++ b/invoicelineitem.go @@ -17,7 +17,7 @@ const ( // The amount of discount calculated per discount for this line item. type InvoiceLineItemDiscountAmount struct { - // The amount, in %s, of the discount. + // The amount, in cents (or local equivalent), of the discount. Amount int64 `json:"amount"` // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` @@ -37,9 +37,9 @@ type InvoiceLineItemProrationDetails struct { CreditedItems *InvoiceLineItemProrationDetailsCreditedItems `json:"credited_items"` } type InvoiceLineItem struct { - // The amount, in %s. + // The amount, in cents (or local equivalent). Amount int64 `json:"amount"` - // The integer amount in %s representing the amount for this line item, excluding all tax and discounts. + // The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. AmountExcludingTax int64 `json:"amount_excluding_tax"` // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Currency Currency `json:"currency"` @@ -82,7 +82,7 @@ type InvoiceLineItem struct { TaxRates []*TaxRate `json:"tax_rates"` // A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. Type InvoiceLineItemType `json:"type"` - // The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + // The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"` } diff --git a/lineitem.go b/lineitem.go index 2af6f20eb1..aa362994b4 100644 --- a/lineitem.go +++ b/lineitem.go @@ -52,7 +52,7 @@ type LineItemTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason LineItemTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } diff --git a/paymentintent.go b/paymentintent.go index b6a151a43c..aed192f01b 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -657,6 +657,15 @@ const ( PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) +// Preferred transaction settlement speed +type PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed string + +// List of values that PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed can take +const ( + PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeedFastest PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed = "fastest" + PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeedStandard PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed = "standard" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -1488,6 +1497,8 @@ type PaymentIntentPaymentMethodOptionsUSBankAccountParams struct { FinancialConnections *PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"` // Additional fields for network related functions Networks *PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"` + // Preferred transaction settlement speed + PreferredSettlementSpeed *string `form:"preferred_settlement_speed"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -2550,6 +2561,8 @@ type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct { } type PaymentIntentPaymentMethodOptionsUSBankAccount struct { FinancialConnections *PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"` + // Preferred transaction settlement speed + PreferredSettlementSpeed PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed `json:"preferred_settlement_speed"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. diff --git a/paymentlink.go b/paymentlink.go index d21f143e83..084af1c6a0 100644 --- a/paymentlink.go +++ b/paymentlink.go @@ -633,7 +633,7 @@ type PaymentLinkTaxIDCollection struct { // The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. type PaymentLinkTransferData struct { - // The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + // The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. Amount int64 `json:"amount"` // The connected account receiving the transfer. Destination *Account `json:"destination"` diff --git a/payout.go b/payout.go index 3ce40612c4..72d8537ac0 100644 --- a/payout.go +++ b/payout.go @@ -137,7 +137,7 @@ type PayoutReverseParams struct { // Related guide: [Receiving payouts](https://stripe.com/docs/payouts) type Payout struct { APIResource - // Amount (in %s) to be transferred to your bank account or debit card. + // Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. Amount int64 `json:"amount"` // Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. ArrivalDate int64 `json:"arrival_date"` diff --git a/plan.go b/plan.go index 1df6c33820..094ec198e8 100644 --- a/plan.go +++ b/plan.go @@ -211,9 +211,9 @@ type Plan struct { Active bool `json:"active"` // Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. AggregateUsage PlanAggregateUsage `json:"aggregate_usage"` - // The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + // The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. Amount int64 `json:"amount"` - // The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + // The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. AmountDecimal float64 `json:"amount_decimal,string"` // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. BillingScheme PlanBillingScheme `json:"billing_scheme"` diff --git a/price.go b/price.go index 3933f82a15..229c2326c7 100644 --- a/price.go +++ b/price.go @@ -332,9 +332,9 @@ type PriceCurrencyOptions struct { TaxBehavior PriceCurrencyOptionsTaxBehavior `json:"tax_behavior"` // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. Tiers []*PriceCurrencyOptionsTier `json:"tiers"` - // The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + // The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. UnitAmount int64 `json:"unit_amount"` - // The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + // The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` } @@ -431,9 +431,9 @@ type Price struct { TransformQuantity *PriceTransformQuantity `json:"transform_quantity"` // One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. Type PriceType `json:"type"` - // The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + // The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. UnitAmount int64 `json:"unit_amount"` - // The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + // The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` } diff --git a/quote.go b/quote.go index 8c602f2c04..40d6da290c 100644 --- a/quote.go +++ b/quote.go @@ -334,7 +334,7 @@ type QuoteComputedRecurringTotalDetailsBreakdownTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } type QuoteComputedRecurringTotalDetailsBreakdown struct { @@ -387,7 +387,7 @@ type QuoteComputedUpfrontTotalDetailsBreakdownTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } type QuoteComputedUpfrontTotalDetailsBreakdown struct { @@ -471,7 +471,7 @@ type QuoteTotalDetailsBreakdownTax struct { Rate *TaxRate `json:"rate"` // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. TaxabilityReason QuoteTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"` - // The amount on which tax is calculated, in %s. + // The amount on which tax is calculated, in cents (or local equivalent). TaxableAmount int64 `json:"taxable_amount"` } type QuoteTotalDetailsBreakdown struct { @@ -492,7 +492,7 @@ type QuoteTotalDetails struct { // The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. type QuoteTransferData struct { - // The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + // The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. Amount int64 `json:"amount"` // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. AmountPercent float64 `json:"amount_percent"` diff --git a/refund.go b/refund.go index 3ceebfe45e..ed02050d1f 100644 --- a/refund.go +++ b/refund.go @@ -105,7 +105,7 @@ type RefundNextAction struct { // Related guide: [Refunds](https://stripe.com/docs/refunds) type Refund struct { APIResource - // Amount, in %s. + // Amount, in cents (or local equivalent). Amount int64 `json:"amount"` // Balance transaction that describes the impact on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` diff --git a/transfer.go b/transfer.go index c4393246e4..7568acc61b 100644 --- a/transfer.go +++ b/transfer.go @@ -60,9 +60,9 @@ type TransferListParams struct { // Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) type Transfer struct { APIResource - // Amount in %s to be transferred. + // Amount in cents (or local equivalent) to be transferred. Amount int64 `json:"amount"` - // Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + // Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). AmountReversed int64 `json:"amount_reversed"` // Balance transaction that describes the impact of this transfer on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"` diff --git a/transferreversal.go b/transferreversal.go index 9e3b0bedf2..63b3a380b3 100644 --- a/transferreversal.go +++ b/transferreversal.go @@ -45,7 +45,7 @@ type TransferReversalListParams struct { // Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers) type TransferReversal struct { APIResource - // Amount, in %s. + // Amount, in cents (or local equivalent). Amount int64 `json:"amount"` // Balance transaction that describes the impact on your account balance. BalanceTransaction *BalanceTransaction `json:"balance_transaction"`