Skip to content

Commit

Permalink
Update generated code (#1718)
Browse files Browse the repository at this point in the history
* Update generated code for v469

* Update generated code for v470

* Update generated code for v475

* Update generated code for v476

* Update generated code for v477

* Update generated code for v478

* Update generated code for v481

* Update generated code for v482

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Aug 24, 2023
1 parent f333354 commit 1081971
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 17 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v468
v482
40 changes: 40 additions & 0 deletions billingportal_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ const (
BillingPortalSessionFlowAfterCompletionTypeRedirect BillingPortalSessionFlowAfterCompletionType = "redirect"
)

// Type of retention strategy that will be used.
type BillingPortalSessionFlowSubscriptionCancelRetentionType string

// List of values that BillingPortalSessionFlowSubscriptionCancelRetentionType can take
const (
BillingPortalSessionFlowSubscriptionCancelRetentionTypeCouponOffer BillingPortalSessionFlowSubscriptionCancelRetentionType = "coupon_offer"
)

// Type of flow that the customer will go through.
type BillingPortalSessionFlowType string

Expand Down Expand Up @@ -49,8 +57,24 @@ type BillingPortalSessionFlowDataAfterCompletionParams struct {
Type *string `form:"type"`
}

// Configuration when `retention.type=coupon_offer`.
type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams struct {
// The ID of the coupon to be offered.
Coupon *string `form:"coupon"`
}

// Specify a retention strategy to be used in the cancellation flow.
type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams struct {
// Configuration when `retention.type=coupon_offer`.
CouponOffer *BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams `form:"coupon_offer"`
// Type of retention strategy to use with the customer.
Type *string `form:"type"`
}

// Configuration when `flow_data.type=subscription_cancel`.
type BillingPortalSessionFlowDataSubscriptionCancelParams struct {
// Specify a retention strategy to be used in the cancellation flow.
Retention *BillingPortalSessionFlowDataSubscriptionCancelRetentionParams `form:"retention"`
// The ID of the subscription to be canceled.
Subscription *string `form:"subscription"`
}
Expand Down Expand Up @@ -147,8 +171,24 @@ type BillingPortalSessionFlowAfterCompletion struct {
Type BillingPortalSessionFlowAfterCompletionType `json:"type"`
}

// Configuration when `retention.type=coupon_offer`.
type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer struct {
// The ID of the coupon to be offered.
Coupon string `json:"coupon"`
}

// Specify a retention strategy to be used in the cancellation flow.
type BillingPortalSessionFlowSubscriptionCancelRetention struct {
// Configuration when `retention.type=coupon_offer`.
CouponOffer *BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer `json:"coupon_offer"`
// Type of retention strategy that will be used.
Type BillingPortalSessionFlowSubscriptionCancelRetentionType `json:"type"`
}

// Configuration when `flow.type=subscription_cancel`.
type BillingPortalSessionFlowSubscriptionCancel struct {
// Specify a retention strategy to be used in the cancellation flow.
Retention *BillingPortalSessionFlowSubscriptionCancelRetention `json:"retention"`
// The ID of the subscription to be canceled.
Subscription string `json:"subscription"`
}
Expand Down
2 changes: 1 addition & 1 deletion card.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ type Card struct {
ExpYear int64 `json:"exp_year"`
// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
//
// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
// *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
Fingerprint string `json:"fingerprint"`
// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
Funding CardFunding `json:"funding"`
Expand Down
6 changes: 3 additions & 3 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ type ChargePaymentMethodDetailsCard struct {
ExpYear int64 `json:"exp_year"`
// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
//
// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
// *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
Fingerprint string `json:"fingerprint"`
// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
Funding CardFunding `json:"funding"`
Expand Down Expand Up @@ -771,7 +771,7 @@ type ChargePaymentMethodDetailsCardPresent struct {
ExpYear int64 `json:"exp_year"`
// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
//
// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
// *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
Fingerprint string `json:"fingerprint"`
// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
Funding CardFunding `json:"funding"`
Expand Down Expand Up @@ -889,7 +889,7 @@ type ChargePaymentMethodDetailsInteracPresent struct {
ExpYear int64 `json:"exp_year"`
// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
//
// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
// *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
Fingerprint string `json:"fingerprint"`
// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
Funding string `json:"funding"`
Expand Down
18 changes: 15 additions & 3 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,14 @@ const (
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

// Data features requested to be retrieved upon account creation.
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string

// List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
const (
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)

// 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.
Expand Down Expand Up @@ -1025,7 +1033,7 @@ type CheckoutSessionPaymentIntentDataParams struct {
// The parameters used to automatically create a Transfer when the payment succeeds.
// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
TransferData *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"`
// A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
// A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
TransferGroup *string `form:"transfer_group"`
}

Expand Down Expand Up @@ -1373,6 +1381,8 @@ type CheckoutSessionPaymentMethodOptionsSofortParams struct {
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
Permissions []*string `form:"permissions"`
// List of data features that you would like to retrieve upon account creation.
Prefetch []*string `form:"prefetch"`
}

// contains details about the Us Bank Account payment method options.
Expand Down Expand Up @@ -1567,7 +1577,7 @@ func (p *CheckoutSessionShippingOptionShippingRateDataParams) AddMetadata(key st
p.Metadata[key] = value
}

// The shipping rate options to apply to this Session.
// The shipping rate options to apply to this Session. Up to a maximum of 5.
type CheckoutSessionShippingOptionParams struct {
// The ID of the Shipping Rate to use for this shipping option.
ShippingRate *string `form:"shipping_rate"`
Expand Down Expand Up @@ -1750,7 +1760,7 @@ type CheckoutSessionParams struct {
SetupIntentData *CheckoutSessionSetupIntentDataParams `form:"setup_intent_data"`
// When set, provides configuration for Checkout to collect a shipping address from a customer.
ShippingAddressCollection *CheckoutSessionShippingAddressCollectionParams `form:"shipping_address_collection"`
// The shipping rate options to apply to this Session.
// The shipping rate options to apply to this Session. Up to a maximum of 5.
ShippingOptions []*CheckoutSessionShippingOptionParams `form:"shipping_options"`
// Describes the type of transaction being performed by Checkout in order to customize
// relevant text on the page, such as the submit button. `submit_type` can only be
Expand Down Expand Up @@ -2248,6 +2258,8 @@ type CheckoutSessionPaymentMethodOptionsSofort struct {
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections struct {
// The list of permissions to request. The `payment_method` permission must be included.
Permissions []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
// Data features requested to be retrieved upon account creation.
Prefetch []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"`
// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
ReturnURL string `json:"return_url"`
}
Expand Down
2 changes: 2 additions & 0 deletions customercashbalancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ func (p *CustomerCashBalanceTransactionListParams) AddExpand(f string) {
}

type CustomerCashBalanceTransactionAdjustedForOverdraft struct {
// The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
// The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
LinkedTransaction *CustomerCashBalanceTransaction `json:"linked_transaction"`
}
Expand Down
25 changes: 24 additions & 1 deletion dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ package stripe

import "encoding/json"

// Payment method type.
type DisputePaymentMethodDetailsType string

// List of values that DisputePaymentMethodDetailsType can take
const (
DisputePaymentMethodDetailsTypeCard DisputePaymentMethodDetailsType = "card"
)

// Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).
type DisputeReason string

Expand Down Expand Up @@ -212,6 +220,20 @@ type DisputeEvidenceDetails struct {
SubmissionCount int64 `json:"submission_count"`
}

// Card specific dispute details.
type DisputePaymentMethodDetailsCard struct {
// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Brand string `json:"brand"`
// The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network.
NetworkReasonCode string `json:"network_reason_code"`
}
type DisputePaymentMethodDetails struct {
// Card specific dispute details.
Card *DisputePaymentMethodDetailsCard `json:"card"`
// Payment method type.
Type DisputePaymentMethodDetailsType `json:"type"`
}

// A dispute occurs when a customer questions your charge with their card issuer.
// When this happens, you're given the opportunity to respond to the dispute with
// evidence that shows that the charge is legitimate. You can find more
Expand Down Expand Up @@ -246,7 +268,8 @@ type Dispute struct {
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// ID of the PaymentIntent that was disputed.
PaymentIntent *PaymentIntent `json:"payment_intent"`
PaymentIntent *PaymentIntent `json:"payment_intent"`
PaymentMethodDetails *DisputePaymentMethodDetails `json:"payment_method_details"`
// Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).
Reason DisputeReason `json:"reason"`
// Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
Expand Down
13 changes: 13 additions & 0 deletions financialconnections_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ const (
FinancialConnectionsSessionPermissionTransactions FinancialConnectionsSessionPermission = "transactions"
)

// Data features requested to be retrieved upon account creation.
type FinancialConnectionsSessionPrefetch string

// List of values that FinancialConnectionsSessionPrefetch can take
const (
FinancialConnectionsSessionPrefetchBalances FinancialConnectionsSessionPrefetch = "balances"
FinancialConnectionsSessionPrefetchOwnership FinancialConnectionsSessionPrefetch = "ownership"
)

// The account holder to link accounts for.
type FinancialConnectionsSessionAccountHolderParams struct {
// The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
Expand Down Expand Up @@ -55,6 +64,8 @@ type FinancialConnectionsSessionParams struct {
//
// Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
Permissions []*string `form:"permissions"`
// List of data features that you would like to retrieve upon account creation.
Prefetch []*string `form:"prefetch"`
// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
ReturnURL *string `form:"return_url"`
}
Expand Down Expand Up @@ -96,6 +107,8 @@ type FinancialConnectionsSession struct {
Object string `json:"object"`
// Permissions requested for accounts collected during this session.
Permissions []FinancialConnectionsSessionPermission `json:"permissions"`
// Data features requested to be retrieved upon account creation.
Prefetch []FinancialConnectionsSessionPrefetch `json:"prefetch"`
// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
ReturnURL string `json:"return_url"`
}
12 changes: 12 additions & 0 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ const (
InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

// Data features requested to be retrieved upon account creation.
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string

// List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
const (
InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
)

// Bank account verification method.
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string

Expand Down Expand Up @@ -477,6 +485,8 @@ type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
Permissions []*string `form:"permissions"`
// List of data features that you would like to retrieve upon account creation.
Prefetch []*string `form:"prefetch"`
}

// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
Expand Down Expand Up @@ -1159,6 +1169,8 @@ type InvoicePaymentSettingsPaymentMethodOptionsKonbini struct{}
type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct {
// The list of permissions to request. The `payment_method` permission must be included.
Permissions []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
// Data features requested to be retrieved upon account creation.
Prefetch []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"`
}

// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
Expand Down
Loading

0 comments on commit 1081971

Please sign in to comment.