From f4ca60b6b0f07b3225b8511930649eefa4e82c49 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 22 Dec 2022 12:15:00 -0600 Subject: [PATCH] Codegen for openapi v216 --- OPENAPI_VERSION | 2 +- balance.go | 3 ++- cashbalance.go | 4 +++- checkout_session.go | 4 ++-- creditnote.go | 2 -- customer.go | 2 +- financialconnections_account.go | 14 +++++++------- paymentintent.go | 3 +++ reporting_reportrun.go | 5 +++-- subscriptionschedule.go | 6 +++--- 10 files changed, 25 insertions(+), 20 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index de4ec3f3b1..a75e729f5a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v214 \ No newline at end of file +v216 \ No newline at end of file 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/cashbalance.go b/cashbalance.go index 5c13fccda9..4bd345597a 100644 --- a/cashbalance.go +++ b/cashbalance.go @@ -25,12 +25,14 @@ type CashBalanceParams struct { // A hash of settings for this cash balance. type CashBalanceSettingsParams struct { - // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). ReconciliationMode *string `form:"reconciliation_mode"` } type CashBalanceSettings struct { // The configuration for how funds that land in the customer cash balance are reconciled. ReconciliationMode CashBalanceSettingsReconciliationMode `json:"reconciliation_mode"` + // A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + UsingMerchantDefault bool `json:"using_merchant_default"` } // A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. diff --git a/checkout_session.go b/checkout_session.go index 977afc4652..2331ccf275 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -1370,7 +1370,7 @@ type CheckoutSessionParams struct { AutomaticTax *CheckoutSessionAutomaticTaxParams `form:"automatic_tax"` // Specify whether Checkout should collect the customer's billing address. BillingAddressCollection *string `form:"billing_address_collection"` - // The URL the customer will be directed to if they decide to cancel payment and return to your website. + // If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. CancelURL *string `form:"cancel_url"` // A unique string to reference the Checkout Session. This can be a // customer ID, a cart ID, or similar, and can be used to reconcile the @@ -2000,7 +2000,7 @@ type CheckoutSession struct { AutomaticTax *CheckoutSessionAutomaticTax `json:"automatic_tax"` // Describes whether Checkout should collect the customer's billing address. BillingAddressCollection CheckoutSessionBillingAddressCollection `json:"billing_address_collection"` - // The URL the customer will be directed to if they decide to cancel payment and return to your website. + // If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. CancelURL string `json:"cancel_url"` // A unique string to reference the Checkout Session. This can be a // customer ID, a cart ID, or similar, and can be used to reconcile the 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/customer.go b/customer.go index e6f54a01bc..50a74d3664 100644 --- a/customer.go +++ b/customer.go @@ -64,7 +64,7 @@ type CustomerListParams struct { // Settings controlling the behavior of the customer's cash balance, // such as reconciliation of funds received. type CustomerCashBalanceSettingsParams struct { - // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). ReconciliationMode *string `form:"reconciliation_mode"` } 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/paymentintent.go b/paymentintent.go index 5f86c686a1..ed41d00735 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -1078,6 +1078,8 @@ type PaymentIntentPaymentMethodOptionsCardPresentParams struct { // Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. RequestIncrementalAuthorizationSupport *bool `form:"request_incremental_authorization_support"` } + +// Configuration for the eu_bank_transfer funding type. type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct { // The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. Country *string `form:"country"` @@ -1085,6 +1087,7 @@ type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferP // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams struct { + // Configuration for the eu_bank_transfer funding type. EUBankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"` // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. // 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/subscriptionschedule.go b/subscriptionschedule.go index 9f4ab80d32..ee5f319761 100644 --- a/subscriptionschedule.go +++ b/subscriptionschedule.go @@ -20,7 +20,7 @@ const ( SubscriptionScheduleDefaultSettingsBillingCycleAnchorPhaseStart SubscriptionScheduleDefaultSettingsBillingCycleAnchor = "phase_start" ) -// Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`. +// Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. type SubscriptionScheduleEndBehavior string // List of values that SubscriptionScheduleEndBehavior can take @@ -231,7 +231,7 @@ type SubscriptionScheduleParams struct { Customer *string `form:"customer"` // Object representing the subscription schedule's default settings. DefaultSettings *SubscriptionScheduleDefaultSettingsParams `form:"default_settings"` - // Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. EndBehavior *string `form:"end_behavior"` // Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. FromSubscription *string `form:"from_subscription"` @@ -395,7 +395,7 @@ type SubscriptionSchedule struct { // ID of the customer who owns the subscription schedule. Customer *Customer `json:"customer"` DefaultSettings *SubscriptionScheduleDefaultSettings `json:"default_settings"` - // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`. + // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. EndBehavior SubscriptionScheduleEndBehavior `json:"end_behavior"` // Unique identifier for the object. ID string `json:"id"`