diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b87b42e0c7..f3da18c955 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v217 \ No newline at end of file +v219 \ No newline at end of file diff --git a/account.go b/account.go index a801e97a34..612ce310b2 100644 --- a/account.go +++ b/account.go @@ -64,16 +64,20 @@ type AccountCompanyVerificationDocumentDetailsCode string // List of values that AccountCompanyVerificationDocumentDetailsCode can take const ( - AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt" - AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy" - AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other" - AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode" - AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent" - AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid" - AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated" - AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable" - AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded" - AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large" + AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt" + AccountCompanyVerificationDocumentDetailsCodeDocumentExpired AccountCompanyVerificationDocumentDetailsCode = "document_expired" + AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy" + AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other" + AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode" + AccountCompanyVerificationDocumentDetailsCodeDocumentFailedGreyscale AccountCompanyVerificationDocumentDetailsCode = "document_failed_greyscale" + AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent" + AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid" + AccountCompanyVerificationDocumentDetailsCodeDocumentIncomplete AccountCompanyVerificationDocumentDetailsCode = "document_incomplete" + AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated" + AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable" + AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded" + AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large" + AccountCompanyVerificationDocumentDetailsCodeDocumentTypeNotSupported AccountCompanyVerificationDocumentDetailsCode = "document_type_not_supported" ) // The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. diff --git a/balance.go b/balance.go index 66c06a29b1..b2e52693fd 100644 --- a/balance.go +++ b/balance.go @@ -17,7 +17,8 @@ const ( ) // Retrieves the current account balance, based on the authentication that was used to make the request. -// For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances). +// +// For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances). type BalanceParams struct { Params `form:"*"` } diff --git a/checkout_session.go b/checkout_session.go index 2331ccf275..6189cadba2 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -630,13 +630,13 @@ type CheckoutSessionConsentCollectionParams struct { // Custom text that should be displayed alongside shipping address collection. type CheckoutSessionCustomTextShippingAddressParams struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message *string `form:"message"` } // Custom text that should be displayed alongside the payment confirmation button. type CheckoutSessionCustomTextSubmitParams struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message *string `form:"message"` } @@ -1540,13 +1540,13 @@ type CheckoutSessionConsentCollection struct { // Custom text that should be displayed alongside shipping address collection. type CheckoutSessionCustomTextShippingAddress struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message string `json:"message"` } // Custom text that should be displayed alongside the payment confirmation button. type CheckoutSessionCustomTextSubmit struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message string `json:"message"` } type CheckoutSessionCustomText struct { diff --git a/creditnote.go b/creditnote.go index be442a925e..60d5920f5b 100644 --- a/creditnote.go +++ b/creditnote.go @@ -61,12 +61,10 @@ type CreditNoteLineParams struct { // its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result // in any combination of the following: // -// // Refund: create a new refund (using refund_amount) or link an existing refund (using refund). // Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. // Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). // -// // For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. // // You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount diff --git a/ephemeralkey.go b/ephemeralkey.go index 5f016310ac..3e0f107e96 100644 --- a/ephemeralkey.go +++ b/ephemeralkey.go @@ -14,8 +14,10 @@ type EphemeralKeyParams struct { // The ID of the Customer you'd like to modify using the resulting ephemeral key. Customer *string `form:"customer"` // The ID of the Issuing Card you'd like to access using the resulting ephemeral key. - IssuingCard *string `form:"issuing_card"` - StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header + IssuingCard *string `form:"issuing_card"` + // The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key + VerificationSession *string `form:"verification_session"` + StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header } type EphemeralKey struct { APIResource diff --git a/financialconnections_account.go b/financialconnections_account.go index 0c7c84b862..f23e581936 100644 --- a/financialconnections_account.go +++ b/financialconnections_account.go @@ -78,16 +78,16 @@ const ( // If `category` is `cash`, one of: // -// - `checking` -// - `savings` -// - `other` +// - `checking` +// - `savings` +// - `other` // // If `category` is `credit`, one of: // -// - `mortgage` -// - `line_of_credit` -// - `credit_card` -// - `other` +// - `mortgage` +// - `line_of_credit` +// - `credit_card` +// - `other` // // If `category` is `investment` or `other`, this will be `other`. type FinancialConnectionsAccountSubcategory string diff --git a/invoice.go b/invoice.go index 001db90cdc..11a59d314a 100644 --- a/invoice.go +++ b/invoice.go @@ -509,7 +509,7 @@ type InvoiceUpcomingParams struct { SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"` // A list of up to 20 subscription items, each with an attached price. SubscriptionItems []*SubscriptionItemsParams `form:"subscription_items"` - // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"` // If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. SubscriptionProrationDate *int64 `form:"subscription_proration_date"` @@ -768,7 +768,7 @@ type InvoiceUpcomingLinesParams struct { SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"` // A list of up to 20 subscription items, each with an attached price. SubscriptionItems []*InvoiceUpcomingLinesSubscriptionItemParams `form:"subscription_items"` - // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"` // If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. SubscriptionProrationDate *int64 `form:"subscription_proration_date"` diff --git a/paymentlink.go b/paymentlink.go index 3a6a9113df..6a823a2f1b 100644 --- a/paymentlink.go +++ b/paymentlink.go @@ -171,13 +171,13 @@ type PaymentLinkConsentCollectionParams struct { // Custom text that should be displayed alongside shipping address collection. type PaymentLinkCustomTextShippingAddressParams struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message *string `form:"message"` } // Custom text that should be displayed alongside the payment confirmation button. type PaymentLinkCustomTextSubmitParams struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message *string `form:"message"` } @@ -366,13 +366,13 @@ type PaymentLinkConsentCollection struct { // Custom text that should be displayed alongside shipping address collection. type PaymentLinkCustomTextShippingAddress struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message string `json:"message"` } // Custom text that should be displayed alongside the payment confirmation button. type PaymentLinkCustomTextSubmit struct { - // Text may be up to 500 characters in length. + // Text may be up to 1000 characters in length. Message string `json:"message"` } type PaymentLinkCustomText struct { diff --git a/person.go b/person.go index c5b7ec7f6a..8770f0ca2d 100644 --- a/person.go +++ b/person.go @@ -21,19 +21,25 @@ type PersonVerificationDocumentDetailsCode string // List of values that PersonVerificationDocumentDetailsCode can take const ( PersonVerificationDocumentDetailsCodeDocumentCorrupt PersonVerificationDocumentDetailsCode = "document_corrupt" + PersonVerificationDocumentDetailsCodeDocumentCountryNotSupported PersonVerificationDocumentDetailsCode = "document_country_not_supported" + PersonVerificationDocumentDetailsCodeDocumentExpired PersonVerificationDocumentDetailsCode = "document_expired" PersonVerificationDocumentDetailsCodeDocumentFailedCopy PersonVerificationDocumentDetailsCode = "document_failed_copy" - PersonVerificationDocumentDetailsCodeDocumentFailedGreyscale PersonVerificationDocumentDetailsCode = "document_failed_greyscale" PersonVerificationDocumentDetailsCodeDocumentFailedOther PersonVerificationDocumentDetailsCode = "document_failed_other" PersonVerificationDocumentDetailsCodeDocumentFailedTestMode PersonVerificationDocumentDetailsCode = "document_failed_test_mode" PersonVerificationDocumentDetailsCodeDocumentFraudulent PersonVerificationDocumentDetailsCode = "document_fraudulent" PersonVerificationDocumentDetailsCodeDocumentIDTypeNotSupported PersonVerificationDocumentDetailsCode = "document_id_type_not_supported" PersonVerificationDocumentDetailsCodeDocumentIDCountryNotSupported PersonVerificationDocumentDetailsCode = "document_id_country_not_supported" + PersonVerificationDocumentDetailsCodeDocumentFailedGreyscale PersonVerificationDocumentDetailsCode = "document_failed_greyscale" + PersonVerificationDocumentDetailsCodeDocumentIncomplete PersonVerificationDocumentDetailsCode = "document_incomplete" + PersonVerificationDocumentDetailsCodeDocumentInvalid PersonVerificationDocumentDetailsCode = "document_invalid" PersonVerificationDocumentDetailsCodeDocumentManipulated PersonVerificationDocumentDetailsCode = "document_manipulated" PersonVerificationDocumentDetailsCodeDocumentMissingBack PersonVerificationDocumentDetailsCode = "document_missing_back" PersonVerificationDocumentDetailsCodeDocumentMissingFront PersonVerificationDocumentDetailsCode = "document_missing_front" PersonVerificationDocumentDetailsCodeDocumentNotReadable PersonVerificationDocumentDetailsCode = "document_not_readable" PersonVerificationDocumentDetailsCodeDocumentNotUploaded PersonVerificationDocumentDetailsCode = "document_not_uploaded" + PersonVerificationDocumentDetailsCodeDocumentPhotoMismatch PersonVerificationDocumentDetailsCode = "document_photo_mismatch" PersonVerificationDocumentDetailsCodeDocumentTooLarge PersonVerificationDocumentDetailsCode = "document_too_large" + PersonVerificationDocumentDetailsCodeDocumentTypeNotSupported PersonVerificationDocumentDetailsCode = "document_type_not_supported" ) // One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. @@ -41,9 +47,15 @@ type PersonVerificationDetailsCode string // List of values that PersonVerificationDetailsCode can take const ( - PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity" - PersonVerificationDetailsCodeFailedOther PersonVerificationDetailsCode = "failed_other" - PersonVerificationDetailsCodeScanNameMismatch PersonVerificationDetailsCode = "scan_name_mismatch" + PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity" + PersonVerificationDetailsCodeFailedOther PersonVerificationDetailsCode = "failed_other" + PersonVerificationDetailsCodeScanNameMismatch PersonVerificationDetailsCode = "scan_name_mismatch" + PersonVerificationDetailsCodeDocumentAddressMismatch PersonVerificationDetailsCode = "document_address_mismatch" + PersonVerificationDetailsCodeDocumentDOBMismatch PersonVerificationDetailsCode = "document_dob_mismatch" + PersonVerificationDetailsCodeDocumentDuplicateType PersonVerificationDetailsCode = "document_duplicate_type" + PersonVerificationDetailsCodeDocumentIDNumberMismatch PersonVerificationDetailsCode = "document_id_number_mismatch" + PersonVerificationDetailsCodeDocumentNameMismatch PersonVerificationDetailsCode = "document_name_mismatch" + PersonVerificationDetailsCodeDocumentNationalityMismatch PersonVerificationDetailsCode = "document_nationality_mismatch" ) // The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. diff --git a/refund.go b/refund.go index 28305fcaef..a637c9749e 100644 --- a/refund.go +++ b/refund.go @@ -34,10 +34,11 @@ type RefundStatus string // List of values that RefundStatus can take const ( - RefundStatusCanceled RefundStatus = "canceled" - RefundStatusFailed RefundStatus = "failed" - RefundStatusPending RefundStatus = "pending" - RefundStatusSucceeded RefundStatus = "succeeded" + RefundStatusCanceled RefundStatus = "canceled" + RefundStatusFailed RefundStatus = "failed" + RefundStatusPending RefundStatus = "pending" + RefundStatusSucceeded RefundStatus = "succeeded" + RefundStatusRequiresAction RefundStatus = "requires_action" ) // Returns a list of all refunds you've previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object. diff --git a/reporting_reportrun.go b/reporting_reportrun.go index 01ab033978..692f8dd030 100644 --- a/reporting_reportrun.go +++ b/reporting_reportrun.go @@ -7,8 +7,9 @@ package stripe // Status of this report run. This will be `pending` when the run is initially created. -// When the run finishes, this will be set to `succeeded` and the `result` field will be populated. -// Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. +// +// When the run finishes, this will be set to `succeeded` and the `result` field will be populated. +// Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. type ReportingReportRunStatus string // List of values that ReportingReportRunStatus can take diff --git a/review.go b/review.go index 580358179b..d14c0eb387 100644 --- a/review.go +++ b/review.go @@ -39,6 +39,7 @@ const ( ReviewReasonManual ReviewReason = "manual" ReviewReasonRefunded ReviewReason = "refunded" ReviewReasonRefundedAsFraud ReviewReason = "refunded_as_fraud" + ReviewReasonRedacted ReviewReason = "redacted" ReviewReasonRule ReviewReason = "rule" ) diff --git a/subscription.go b/subscription.go index 47fbe0157b..665368b02f 100644 --- a/subscription.go +++ b/subscription.go @@ -455,7 +455,7 @@ type SubscriptionParams struct { PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"` // The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. PromotionCode *string `form:"promotion_code"` - // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. ProrationDate *int64 `form:"proration_date"` diff --git a/subscriptionitem.go b/subscriptionitem.go index b7fb2057bb..7b3521dd2b 100644 --- a/subscriptionitem.go +++ b/subscriptionitem.go @@ -67,7 +67,7 @@ type SubscriptionItemParams struct { Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. PriceData *SubscriptionItemPriceDataParams `form:"price_data"` - // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. ProrationBehavior *string `form:"proration_behavior"` // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. ProrationDate *int64 `form:"proration_date"` diff --git a/subscriptionschedule.go b/subscriptionschedule.go index ee5f319761..e44e27ef12 100644 --- a/subscriptionschedule.go +++ b/subscriptionschedule.go @@ -197,7 +197,7 @@ type SubscriptionSchedulePhaseParams struct { Metadata map[string]string `form:"metadata"` // The account on behalf of which to charge, for each of the associated subscription's invoices. OnBehalfOf *string `form:"on_behalf_of"` - // Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. + // Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. ProrationBehavior *string `form:"proration_behavior"` // The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. StartDate *int64 `form:"start_date"`