Skip to content

Commit

Permalink
Merge pull request #1889 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Jul 18, 2024
2 parents 331682a + 6f14a7c commit 3ca8bcd
Show file tree
Hide file tree
Showing 18 changed files with 375 additions and 25 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
* [#1885](https://github.com/stripe/stripe-go/pull/1885) Update generated code for beta
* Add support for new value `not_qualified` on enum `DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status`

## 79.3.0 - 2024-07-11
* [#1886](https://github.com/stripe/stripe-go/pull/1886) Update generated code
* ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enums `InvoiceLastFinalizationErrorCode`, `PaymentIntentLastPaymentErrorCode`, `SetupAttemptSetupErrorCode`, `SetupIntentLastSetupErrorCode`, and `StripeErrorCode`.
* ⚠️ Remove support for value `payment_intent_fx_quote_invalid` from enum `StripeErrorCode`. The was mistakenly released last week.
* Add support for `PaymentMethodOptions` on `ConfirmationToken`
* Add support for `PaymentElement` on `CustomerSessionComponentsParams` and `CustomerSessionComponents`
* Add support for `AddressValidation` on `IssuingCardShippingParams` and `IssuingCardShipping`
* Add support for `Shipping` on `IssuingCardParams`

## 79.3.0-beta.1 - 2024-07-05
* [#1882](https://github.com/stripe/stripe-go/pull/1882) Update generated code for beta
* ⚠️ Remove support for `PaymentMethodUpdate` on `CustomerSessionComponentsPaymentElementFeaturesParams` and `CustomerSessionComponentsPaymentElementFeatures`. Users are expected to completely migrate from using `payment_method_update`.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1124
v1136
17 changes: 17 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,14 @@ type AccountSettingsBrandingParams struct {
SecondaryColor *string `form:"secondary_color"`
}

// Settings specific to the account's use of the Capital product.
type AccountSettingsCapitalParams struct {
// Per-currency mapping of user-selected destination accounts used to pay out loans.
PayoutDestination map[string]string `form:"payout_destination"`
// Per-currency mapping of all destination accounts eligible to receive Capital financing payouts.
PayoutDestinationSelector map[string][]*string `form:"payout_destination_selector"`
}

// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance).
type AccountSettingsCardIssuingTOSAcceptanceParams struct {
// The Unix timestamp marking when the account representative accepted the service agreement.
Expand Down Expand Up @@ -1069,6 +1077,8 @@ type AccountSettingsParams struct {
BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
Branding *AccountSettingsBrandingParams `form:"branding"`
// Settings specific to the account's use of the Capital product.
Capital *AccountSettingsCapitalParams `form:"capital"`
// Settings specific to the account's use of the Card Issuing product.
CardIssuing *AccountSettingsCardIssuingParams `form:"card_issuing"`
// Settings specific to card charging on the account.
Expand Down Expand Up @@ -1556,6 +1566,12 @@ type AccountSettingsBranding struct {
// A CSS hex color value representing the secondary branding color for this account
SecondaryColor string `json:"secondary_color"`
}
type AccountSettingsCapital struct {
// Per-currency mapping of user-selected destination accounts used to pay out loans.
PayoutDestination map[string]string `json:"payout_destination"`
// Per-currency mapping of all destination accounts eligible to receive loan payouts.
PayoutDestinationSelector map[string][]string `json:"payout_destination_selector"`
}
type AccountSettingsCardIssuingTOSAcceptance struct {
// The Unix timestamp marking when the account representative accepted the service agreement.
Date int64 `json:"date"`
Expand Down Expand Up @@ -1645,6 +1661,7 @@ type AccountSettingsTreasury struct {
type AccountSettings struct {
BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"`
Branding *AccountSettingsBranding `json:"branding"`
Capital *AccountSettingsCapital `json:"capital"`
CardIssuing *AccountSettingsCardIssuing `json:"card_issuing"`
CardPayments *AccountSettingsCardPayments `json:"card_payments"`
Dashboard *AccountSettingsDashboard `json:"dashboard"`
Expand Down
4 changes: 4 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ import (
"github.com/stripe/stripe-go/v79/subscription"
"github.com/stripe/stripe-go/v79/subscriptionitem"
"github.com/stripe/stripe-go/v79/subscriptionschedule"
taxassociation "github.com/stripe/stripe-go/v79/tax/association"
taxcalculation "github.com/stripe/stripe-go/v79/tax/calculation"
taxform "github.com/stripe/stripe-go/v79/tax/form"
taxregistration "github.com/stripe/stripe-go/v79/tax/registration"
Expand Down Expand Up @@ -368,6 +369,8 @@ type API struct {
Subscriptions *subscription.Client
// SubscriptionSchedules is the client used to invoke /subscription_schedules APIs.
SubscriptionSchedules *subscriptionschedule.Client
// TaxAssociations is the client used to invoke association related APIs.
TaxAssociations *taxassociation.Client
// TaxCalculations is the client used to invoke /tax/calculations APIs.
TaxCalculations *taxcalculation.Client
// TaxCodes is the client used to invoke /tax_codes APIs.
Expand Down Expand Up @@ -570,6 +573,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.SubscriptionItems = &subscriptionitem.Client{B: backends.API, Key: key}
a.Subscriptions = &subscription.Client{B: backends.API, Key: key}
a.SubscriptionSchedules = &subscriptionschedule.Client{B: backends.API, Key: key}
a.TaxAssociations = &taxassociation.Client{B: backends.API, Key: key}
a.TaxCalculations = &taxcalculation.Client{B: backends.API, Key: key}
a.TaxCodes = &taxcode.Client{B: backends.API, Key: key}
a.TaxForms = &taxform.Client{B: backends.API, BUploads: backends.Uploads, Key: key}
Expand Down
24 changes: 13 additions & 11 deletions confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,17 +882,19 @@ type ConfirmationTokenPaymentMethodPreview struct {
AfterpayClearpay *ConfirmationTokenPaymentMethodPreviewAfterpayClearpay `json:"afterpay_clearpay"`
Alipay *ConfirmationTokenPaymentMethodPreviewAlipay `json:"alipay"`
// This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
AllowRedisplay ConfirmationTokenPaymentMethodPreviewAllowRedisplay `json:"allow_redisplay"`
AmazonPay *ConfirmationTokenPaymentMethodPreviewAmazonPay `json:"amazon_pay"`
AUBECSDebit *ConfirmationTokenPaymentMethodPreviewAUBECSDebit `json:"au_becs_debit"`
BACSDebit *ConfirmationTokenPaymentMethodPreviewBACSDebit `json:"bacs_debit"`
Bancontact *ConfirmationTokenPaymentMethodPreviewBancontact `json:"bancontact"`
BillingDetails *ConfirmationTokenPaymentMethodPreviewBillingDetails `json:"billing_details"`
BLIK *ConfirmationTokenPaymentMethodPreviewBLIK `json:"blik"`
Boleto *ConfirmationTokenPaymentMethodPreviewBoleto `json:"boleto"`
Card *ConfirmationTokenPaymentMethodPreviewCard `json:"card"`
CardPresent *ConfirmationTokenPaymentMethodPreviewCardPresent `json:"card_present"`
CashApp *ConfirmationTokenPaymentMethodPreviewCashApp `json:"cashapp"`
AllowRedisplay ConfirmationTokenPaymentMethodPreviewAllowRedisplay `json:"allow_redisplay"`
AmazonPay *ConfirmationTokenPaymentMethodPreviewAmazonPay `json:"amazon_pay"`
AUBECSDebit *ConfirmationTokenPaymentMethodPreviewAUBECSDebit `json:"au_becs_debit"`
BACSDebit *ConfirmationTokenPaymentMethodPreviewBACSDebit `json:"bacs_debit"`
Bancontact *ConfirmationTokenPaymentMethodPreviewBancontact `json:"bancontact"`
BillingDetails *ConfirmationTokenPaymentMethodPreviewBillingDetails `json:"billing_details"`
BLIK *ConfirmationTokenPaymentMethodPreviewBLIK `json:"blik"`
Boleto *ConfirmationTokenPaymentMethodPreviewBoleto `json:"boleto"`
Card *ConfirmationTokenPaymentMethodPreviewCard `json:"card"`
CardPresent *ConfirmationTokenPaymentMethodPreviewCardPresent `json:"card_present"`
CashApp *ConfirmationTokenPaymentMethodPreviewCashApp `json:"cashapp"`
// The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
Customer *Customer `json:"customer"`
CustomerBalance *ConfirmationTokenPaymentMethodPreviewCustomerBalance `json:"customer_balance"`
EPS *ConfirmationTokenPaymentMethodPreviewEPS `json:"eps"`
FPX *ConfirmationTokenPaymentMethodPreviewFPX `json:"fpx"`
Expand Down
6 changes: 4 additions & 2 deletions dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ const (
type DisputeListParams struct {
ListParams `form:"*"`
// Only return disputes associated to the charge specified by this charge ID.
Charge *string `form:"charge"`
Created *int64 `form:"created"`
Charge *string `form:"charge"`
// Only return disputes that were created during the given date interval.
Created *int64 `form:"created"`
// Only return disputes that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down
3 changes: 2 additions & 1 deletion event.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ const (
EventTypeIssuingDisputeClosed EventType = "issuing_dispute.closed"
EventTypeIssuingDisputeCreated EventType = "issuing_dispute.created"
EventTypeIssuingDisputeFundsReinstated EventType = "issuing_dispute.funds_reinstated"
EventTypeIssuingDisputeFundsRescinded EventType = "issuing_dispute.funds_rescinded"
EventTypeIssuingDisputeSubmitted EventType = "issuing_dispute.submitted"
EventTypeIssuingDisputeUpdated EventType = "issuing_dispute.updated"
EventTypeIssuingPersonalizationDesignActivated EventType = "issuing_personalization_design.activated"
Expand Down Expand Up @@ -316,7 +317,7 @@ func (p *EventListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.
// Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook.
type EventParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand Down
4 changes: 2 additions & 2 deletions event/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type Client struct {
Key string
}

// Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.
// Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook.
func Get(id string, params *stripe.EventParams) (*stripe.Event, error) {
return getC().Get(id, params)
}

// Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.
// Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook.
func (c Client) Get(id string, params *stripe.EventParams) (*stripe.Event, error) {
path := stripe.FormatURLPath("/v1/events/%s", id)
event := &stripe.Event{}
Expand Down
2 changes: 1 addition & 1 deletion identity_verificationreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ type IdentityVerificationReportSelfie struct {
// API. To configure and create VerificationReports, use the
// [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
//
// Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
// Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
type IdentityVerificationReport struct {
APIResource
// A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
Expand Down
1 change: 1 addition & 0 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const (
InvoicePaymentSettingsPaymentMethodTypeIDEAL InvoicePaymentSettingsPaymentMethodType = "ideal"
InvoicePaymentSettingsPaymentMethodTypeKonbini InvoicePaymentSettingsPaymentMethodType = "konbini"
InvoicePaymentSettingsPaymentMethodTypeLink InvoicePaymentSettingsPaymentMethodType = "link"
InvoicePaymentSettingsPaymentMethodTypeMultibanco InvoicePaymentSettingsPaymentMethodType = "multibanco"
InvoicePaymentSettingsPaymentMethodTypeP24 InvoicePaymentSettingsPaymentMethodType = "p24"
InvoicePaymentSettingsPaymentMethodTypePayNow InvoicePaymentSettingsPaymentMethodType = "paynow"
InvoicePaymentSettingsPaymentMethodTypePaypal InvoicePaymentSettingsPaymentMethodType = "paypal"
Expand Down
Loading

0 comments on commit 3ca8bcd

Please sign in to comment.