Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1657

Merged
merged 8 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v338
v350
2 changes: 1 addition & 1 deletion account.go
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ type Account struct {
// A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
// See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
//
// Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
// Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information)
Individual *Person `json:"individual"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Metadata map[string]string `json:"metadata"`
Expand Down
2 changes: 1 addition & 1 deletion accountlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type AccountLinkParams struct {
// Account Links are the means by which a Connect platform grants a connected account permission to access
// Stripe-hosted applications, such as Connect Onboarding.
//
// Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).
// Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding)
type AccountLink struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion apps_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type AppsSecretScope struct {
//
// A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
//
// Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).
// Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
type AppsSecret struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type BalanceIssuing struct {
// The available and pending amounts for each currency are broken down further by
// payment source types.
//
// Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).
// Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
type Balance struct {
APIResource
// Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.
Expand Down
2 changes: 1 addition & 1 deletion balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ type BalanceTransactionFeeDetail struct {
// Balance transactions represent funds moving through your Stripe account.
// They're created for every type of transaction that comes into or flows out of your Stripe account balance.
//
// Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).
// Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
type BalanceTransaction struct {
APIResource
// Gross amount of the transaction, in %s.
Expand Down
2 changes: 1 addition & 1 deletion bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ type BankAccountRequirements struct {
// destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
// They can be bank accounts or debit cards as well, and are documented in the links above.
//
// Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers).
// Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers)
type BankAccount struct {
APIResource
// The ID of the account that the bank account is associated with.
Expand Down
82 changes: 80 additions & 2 deletions billingportal_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ type BillingPortalSessionFlowType string

// List of values that BillingPortalSessionFlowType can take
const (
BillingPortalSessionFlowTypePaymentMethodUpdate BillingPortalSessionFlowType = "payment_method_update"
BillingPortalSessionFlowTypeSubscriptionCancel BillingPortalSessionFlowType = "subscription_cancel"
BillingPortalSessionFlowTypePaymentMethodUpdate BillingPortalSessionFlowType = "payment_method_update"
BillingPortalSessionFlowTypeSubscriptionCancel BillingPortalSessionFlowType = "subscription_cancel"
BillingPortalSessionFlowTypeSubscriptionUpdate BillingPortalSessionFlowType = "subscription_update"
BillingPortalSessionFlowTypeSubscriptionUpdateConfirm BillingPortalSessionFlowType = "subscription_update_confirm"
)

// Configuration when `after_completion.type=hosted_confirmation`.
Expand Down Expand Up @@ -53,12 +55,50 @@ type BillingPortalSessionFlowDataSubscriptionCancelParams struct {
Subscription *string `form:"subscription"`
}

// Configuration when `flow_data.type=subscription_update`.
type BillingPortalSessionFlowDataSubscriptionUpdateParams struct {
// The ID of the subscription to be updated.
Subscription *string `form:"subscription"`
}

// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams struct {
// The ID of the coupon to apply to this subscription update.
Coupon *string `form:"coupon"`
// The ID of a promotion code to apply to this subscription update.
PromotionCode *string `form:"promotion_code"`
}

// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams struct {
// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
ID *string `form:"id"`
// The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
Price *string `form:"price"`
// [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
Quantity *int64 `form:"quantity"`
}

// Configuration when `flow_data.type=subscription_update_confirm`.
type BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams struct {
// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
Discounts []*BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams `form:"discounts"`
// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
Items []*BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams `form:"items"`
// The ID of the subscription to be updated.
Subscription *string `form:"subscription"`
}

// Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
type BillingPortalSessionFlowDataParams struct {
// Behavior after the flow is completed.
AfterCompletion *BillingPortalSessionFlowDataAfterCompletionParams `form:"after_completion"`
// Configuration when `flow_data.type=subscription_cancel`.
SubscriptionCancel *BillingPortalSessionFlowDataSubscriptionCancelParams `form:"subscription_cancel"`
// Configuration when `flow_data.type=subscription_update`.
SubscriptionUpdate *BillingPortalSessionFlowDataSubscriptionUpdateParams `form:"subscription_update"`
// Configuration when `flow_data.type=subscription_update_confirm`.
SubscriptionUpdateConfirm *BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams `form:"subscription_update_confirm"`
// Type of flow that the customer will go through.
Type *string `form:"type"`
}
Expand Down Expand Up @@ -106,11 +146,49 @@ type BillingPortalSessionFlowSubscriptionCancel struct {
Subscription string `json:"subscription"`
}

// Configuration when `flow.type=subscription_update`.
type BillingPortalSessionFlowSubscriptionUpdate struct {
// The ID of the subscription to be updated.
Subscription string `json:"subscription"`
}

// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount struct {
// The ID of the coupon to apply to this subscription update.
Coupon string `json:"coupon"`
// The ID of a promotion code to apply to this subscription update.
PromotionCode string `json:"promotion_code"`
}

// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
type BillingPortalSessionFlowSubscriptionUpdateConfirmItem struct {
// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
ID string `json:"id"`
// The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
Price string `json:"price"`
// [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
Quantity int64 `json:"quantity"`
}

// Configuration when `flow.type=subscription_update_confirm`.
type BillingPortalSessionFlowSubscriptionUpdateConfirm struct {
// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
Discounts []*BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount `json:"discounts"`
// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
Items []*BillingPortalSessionFlowSubscriptionUpdateConfirmItem `json:"items"`
// The ID of the subscription to be updated.
Subscription string `json:"subscription"`
}

// Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
type BillingPortalSessionFlow struct {
AfterCompletion *BillingPortalSessionFlowAfterCompletion `json:"after_completion"`
// Configuration when `flow.type=subscription_cancel`.
SubscriptionCancel *BillingPortalSessionFlowSubscriptionCancel `json:"subscription_cancel"`
// Configuration when `flow.type=subscription_update`.
SubscriptionUpdate *BillingPortalSessionFlowSubscriptionUpdate `json:"subscription_update"`
// Configuration when `flow.type=subscription_update_confirm`.
SubscriptionUpdateConfirm *BillingPortalSessionFlowSubscriptionUpdateConfirm `json:"subscription_update_confirm"`
// Type of flow that the customer will go through.
Type BillingPortalSessionFlowType `json:"type"`
}
Expand Down
2 changes: 1 addition & 1 deletion capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ type CapabilityRequirements struct {

// This is an object representing a capability for a Stripe account.
//
// Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).
// Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)
type Capability struct {
APIResource
// The account for which the capability enables functionality.
Expand Down
2 changes: 1 addition & 1 deletion card.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (p *CardListParams) AppendTo(body *form.Values, keyParts []string) {
// later. You can also store multiple debit cards on a recipient in order to
// transfer to those cards later.
//
// Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).
// Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
type Card struct {
APIResource
// The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
Expand Down
11 changes: 9 additions & 2 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ type ChargePaymentMethodDetailsCardThreeDSecure struct {
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct{}
type ChargePaymentMethodDetailsCardWalletApplePay struct{}
type ChargePaymentMethodDetailsCardWalletGooglePay struct{}
type ChargePaymentMethodDetailsCardWalletLink struct{}
type ChargePaymentMethodDetailsCardWalletMasterpass struct {
// Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
BillingAddress *Address `json:"billing_address"`
Expand Down Expand Up @@ -631,6 +632,7 @@ type ChargePaymentMethodDetailsCardWallet struct {
// (For tokenized numbers only.) The last four digits of the device account number.
DynamicLast4 string `json:"dynamic_last4"`
GooglePay *ChargePaymentMethodDetailsCardWalletGooglePay `json:"google_pay"`
Link *ChargePaymentMethodDetailsCardWalletLink `json:"link"`
Masterpass *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"`
SamsungPay *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"`
// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
Expand Down Expand Up @@ -749,7 +751,12 @@ type ChargePaymentMethodDetailsCardPresent struct {
// The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
Issuer string `json:"issuer"`
}
type ChargePaymentMethodDetailsCashApp struct{}
type ChargePaymentMethodDetailsCashApp struct {
// A unique and immutable identifier assigned by Cash App to every buyer.
BuyerID string `json:"buyer_id"`
// A public identifier for buyers using Cash App.
Cashtag string `json:"cashtag"`
}
type ChargePaymentMethodDetailsCustomerBalance struct{}
type ChargePaymentMethodDetailsEPS struct {
// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
Expand Down Expand Up @@ -1068,7 +1075,7 @@ type ChargeTransferData struct {
// retrieve and refund individual charges as well as list all charges. Charges
// are identified by a unique, random ID.
//
// Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).
// Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges)
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).
Expand Down
8 changes: 4 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ type CheckoutSessionShippingCostTax struct {
Amount int64 `json:"amount"`
// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
//
// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
// Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
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"`
Expand Down Expand Up @@ -2224,7 +2224,7 @@ type CheckoutSessionTotalDetailsBreakdownDiscount struct {
// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
// It contains information about when the discount began, when it will end, and what it is applied to.
//
// Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
// Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
Discount *Discount `json:"discount"`
}

Expand All @@ -2234,7 +2234,7 @@ type CheckoutSessionTotalDetailsBreakdownTax struct {
Amount int64 `json:"amount"`
// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
//
// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
// Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
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"`
Expand Down Expand Up @@ -2272,7 +2272,7 @@ type CheckoutSessionTotalDetails struct {
// You can create a Checkout Session on your server and redirect to its URL
// to begin Checkout.
//
// Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).
// Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)
type CheckoutSession struct {
APIResource
// When set, provides configuration for actions to take if this Checkout Session expires.
Expand Down
Loading