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 for beta #1920

Merged
merged 6 commits into from
Sep 18, 2024
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
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 79.12.0 - 2024-09-18
* [#1919](https://github.com/stripe/stripe-go/pull/1919) Update generated code
* Add support for new value `international_transaction` on enum `TreasuryReceivedDebitFailureCode`
* [#1918](https://github.com/stripe/stripe-go/pull/1918) Update generated code
* Add support for new value `verification_supportability` on enums `AccountFutureRequirementsErrorsCode`, `AccountRequirementsErrorsCode`, `BankAccountFutureRequirementsErrorsCode`, and `BankAccountRequirementsErrorsCode`
* Add support for new value `terminal_reader_invalid_location_for_activation` on enums `InvoiceLastFinalizationErrorCode`, `PaymentIntentLastPaymentErrorCode`, `SetupAttemptSetupErrorCode`, `SetupIntentLastSetupErrorCode`, and `StripeErrorCode`
* Add support for `PayerDetails` on `ChargePaymentMethodDetailsKlarna`
* Add support for `AmazonPay` on `DisputePaymentMethodDetails`
* Add support for new value `amazon_pay` on enum `DisputePaymentMethodDetailsType`
* Add support for `AutomaticallyFinalizesAt` on `Invoice`
* Add support for `StateSalesTax` on `TaxRegistrationCountryOptionsUsParams` and `TaxRegistrationCountryOptionsUs`

## 79.12.0-beta.1 - 2024-09-13
* [#1911](https://github.com/stripe/stripe-go/pull/1911) Update generated code for beta
* Add support for new resources `Issuing.DisputeSettlementDetail` and `Issuing.Settlement`
Expand All @@ -9,6 +21,15 @@
* Add support for `Settlement` on `IssuingTransactionListParams` and `IssuingTransaction`
* [#1915](https://github.com/stripe/stripe-go/pull/1915) Use pinned version of tools in Makefile and ci.yml (beta)

## 79.11.0 - 2024-09-12
* [#1912](https://github.com/stripe/stripe-go/pull/1912) Update generated code
* Add support for new resource `InvoiceRenderingTemplate`
* Add support for `Archive`, `Get`, `List`, and `Unarchive` methods on resource `InvoiceRenderingTemplate`
* Add support for `Required` on `CheckoutSessionTaxIdCollectionParams`, `CheckoutSessionTaxIdCollection`, `PaymentLinkTaxIdCollectionParams`, and `PaymentLinkTaxIdCollection`
* Add support for `Template` on `CustomerInvoiceSettingsRenderingOptionsParams`, `CustomerInvoiceSettingsRenderingOptions`, `InvoiceRenderingParams`, and `InvoiceRendering`
* Add support for `TemplateVersion` on `InvoiceRenderingParams` and `InvoiceRendering`
* Add support for new value `submitted` on enum `IssuingCardShippingStatus`

## 79.11.0-beta.1 - 2024-09-05
* [#1908](https://github.com/stripe/stripe-go/pull/1908) Update generated code for beta
* Add support for new resources `Billing.MeterErrorReport` and `Terminal.ReaderCollectedData`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1259
v1267
4 changes: 4 additions & 0 deletions accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ type AccountSessionComponentsFinancialAccountFeaturesParams struct {
ExternalAccountCollection *bool `form:"external_account_collection"`
// Whether to allow money movement features.
MoneyMovement *bool `form:"money_movement"`
// Whether to allow sending money.
SendMoney *bool `form:"send_money"`
// Whether to allow transferring balance.
TransferBalance *bool `form:"transfer_balance"`
}

// Configuration for the financial account component.
Expand Down
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package stripe

const (
apiVersion string = "2024-06-20"
previewVersion string = "2024-09-05.preview-v2"
previewVersion string = "cs_ubb_launch"
)
2 changes: 2 additions & 0 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const (
BankAccountFutureRequirementsErrorCodeVerificationMissingOwners BankAccountFutureRequirementsErrorCode = "verification_missing_owners"
BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountFutureRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalProofOfRegistration BankAccountFutureRequirementsErrorCode = "verification_requires_additional_proof_of_registration"
BankAccountFutureRequirementsErrorCodeVerificationSupportability BankAccountFutureRequirementsErrorCode = "verification_supportability"
)

// The code for the type of error.
Expand Down Expand Up @@ -220,6 +221,7 @@ const (
BankAccountRequirementsErrorCodeVerificationMissingOwners BankAccountRequirementsErrorCode = "verification_missing_owners"
BankAccountRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
BankAccountRequirementsErrorCodeVerificationRequiresAdditionalProofOfRegistration BankAccountRequirementsErrorCode = "verification_requires_additional_proof_of_registration"
BankAccountRequirementsErrorCodeVerificationSupportability BankAccountRequirementsErrorCode = "verification_supportability"
)

// For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
Expand Down
14 changes: 14 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,21 @@ type ChargePaymentMethodDetailsInteracPresent 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"`
}

// The payer's address
type ChargePaymentMethodDetailsKlarnaPayerDetailsAddress struct {
// The payer address country
Country string `json:"country"`
}

// The payer details for this transaction.
type ChargePaymentMethodDetailsKlarnaPayerDetails struct {
// The payer's address
Address *ChargePaymentMethodDetailsKlarnaPayerDetailsAddress `json:"address"`
}
type ChargePaymentMethodDetailsKlarna struct {
// The payer details for this transaction.
PayerDetails *ChargePaymentMethodDetailsKlarnaPayerDetails `json:"payer_details"`
// The Klarna payment method used for this transaction.
// Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
PaymentMethodCategory ChargePaymentMethodDetailsKlarnaPaymentMethodCategory `json:"payment_method_category"`
Expand Down
4 changes: 0 additions & 4 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ import (
"github.com/stripe/stripe-go/v79/productfeature"
"github.com/stripe/stripe-go/v79/promotioncode"
"github.com/stripe/stripe-go/v79/quote"
"github.com/stripe/stripe-go/v79/quotephase"
"github.com/stripe/stripe-go/v79/quotepreviewinvoice"
"github.com/stripe/stripe-go/v79/quotepreviewsubscriptionschedule"
radarearlyfraudwarning "github.com/stripe/stripe-go/v79/radar/earlyfraudwarning"
Expand Down Expand Up @@ -339,8 +338,6 @@ type API struct {
Products *product.Client
// PromotionCodes is the client used to invoke /promotion_codes APIs.
PromotionCodes *promotioncode.Client
// QuotePhases is the client used to invoke /quote_phases APIs.
QuotePhases *quotephase.Client
// QuotePreviewInvoices is the client used to invoke /quotes/{quote}/preview_invoices APIs.
QuotePreviewInvoices *quotepreviewinvoice.Client
// QuotePreviewSubscriptionSchedules is the client used to invoke /quotes/{quote}/preview_subscription_schedules APIs.
Expand Down Expand Up @@ -568,7 +565,6 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.ProductFeatures = &productfeature.Client{B: backends.API, Key: key}
a.Products = &product.Client{B: backends.API, Key: key}
a.PromotionCodes = &promotioncode.Client{B: backends.API, Key: key}
a.QuotePhases = &quotephase.Client{B: backends.API, Key: key}
a.QuotePreviewInvoices = &quotepreviewinvoice.Client{B: backends.API, Key: key}
a.QuotePreviewSubscriptionSchedules = &quotepreviewsubscriptionschedule.Client{B: backends.API, Key: key}
a.Quotes = &quote.Client{B: backends.API, BUploads: backends.Uploads, Key: key}
Expand Down
27 changes: 21 additions & 6 deletions dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ const (
DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusRequiresAction DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "requires_action"
)

// The AmazonPay dispute type, chargeback or claim
type DisputePaymentMethodDetailsAmazonPayDisputeType string

// List of values that DisputePaymentMethodDetailsAmazonPayDisputeType can take
const (
DisputePaymentMethodDetailsAmazonPayDisputeTypeChargeback DisputePaymentMethodDetailsAmazonPayDisputeType = "chargeback"
DisputePaymentMethodDetailsAmazonPayDisputeTypeClaim DisputePaymentMethodDetailsAmazonPayDisputeType = "claim"
)

// The type of dispute opened. Different case types may have varying fees and financial impact.
type DisputePaymentMethodDetailsCardCaseType string

Expand All @@ -61,9 +70,10 @@ type DisputePaymentMethodDetailsType string

// List of values that DisputePaymentMethodDetailsType can take
const (
DisputePaymentMethodDetailsTypeCard DisputePaymentMethodDetailsType = "card"
DisputePaymentMethodDetailsTypeKlarna DisputePaymentMethodDetailsType = "klarna"
DisputePaymentMethodDetailsTypePaypal DisputePaymentMethodDetailsType = "paypal"
DisputePaymentMethodDetailsTypeAmazonPay DisputePaymentMethodDetailsType = "amazon_pay"
DisputePaymentMethodDetailsTypeCard DisputePaymentMethodDetailsType = "card"
DisputePaymentMethodDetailsTypeKlarna DisputePaymentMethodDetailsType = "klarna"
DisputePaymentMethodDetailsTypePaypal DisputePaymentMethodDetailsType = "paypal"
)

// 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`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
Expand Down Expand Up @@ -387,6 +397,10 @@ type DisputeEvidenceDetails struct {
// The number of times evidence has been submitted. Typically, you may only submit evidence once.
SubmissionCount int64 `json:"submission_count"`
}
type DisputePaymentMethodDetailsAmazonPay struct {
// The AmazonPay dispute type, chargeback or claim
DisputeType DisputePaymentMethodDetailsAmazonPayDisputeType `json:"dispute_type"`
}
type DisputePaymentMethodDetailsCard struct {
// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Brand string `json:"brand"`
Expand All @@ -406,9 +420,10 @@ type DisputePaymentMethodDetailsPaypal struct {
ReasonCode string `json:"reason_code"`
}
type DisputePaymentMethodDetails struct {
Card *DisputePaymentMethodDetailsCard `json:"card"`
Klarna *DisputePaymentMethodDetailsKlarna `json:"klarna"`
Paypal *DisputePaymentMethodDetailsPaypal `json:"paypal"`
AmazonPay *DisputePaymentMethodDetailsAmazonPay `json:"amazon_pay"`
Card *DisputePaymentMethodDetailsCard `json:"card"`
Klarna *DisputePaymentMethodDetailsKlarna `json:"klarna"`
Paypal *DisputePaymentMethodDetailsPaypal `json:"paypal"`
// Payment method type.
Type DisputePaymentMethodDetailsType `json:"type"`
}
Expand Down
1 change: 1 addition & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const (
ErrorCodeTerminalReaderBusy ErrorCode = "terminal_reader_busy"
ErrorCodeTerminalReaderCollectedDataInvalid ErrorCode = "terminal_reader_collected_data_invalid"
ErrorCodeTerminalReaderHardwareFault ErrorCode = "terminal_reader_hardware_fault"
ErrorCodeTerminalReaderInvalidLocationForActivation ErrorCode = "terminal_reader_invalid_location_for_activation"
ErrorCodeTerminalReaderInvalidLocationForPayment ErrorCode = "terminal_reader_invalid_location_for_payment"
ErrorCodeTerminalReaderOffline ErrorCode = "terminal_reader_offline"
ErrorCodeTerminalReaderTimeout ErrorCode = "terminal_reader_timeout"
Expand Down
6 changes: 4 additions & 2 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -4927,8 +4927,10 @@ type Invoice struct {
// Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
Attempted bool `json:"attempted"`
// Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
AutoAdvance bool `json:"auto_advance"`
AutomaticTax *InvoiceAutomaticTax `json:"automatic_tax"`
AutoAdvance bool `json:"auto_advance"`
// The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
AutomaticallyFinalizesAt int64 `json:"automatically_finalizes_at"`
AutomaticTax *InvoiceAutomaticTax `json:"automatic_tax"`
// Indicates the reason why the invoice was created.
//
// * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
Expand Down
2 changes: 2 additions & 0 deletions invoicerenderingtemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func (p *InvoiceRenderingTemplateUnarchiveParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
// can be created from within the Dashboard, and they can be used over the API when creating invoices.
type InvoiceRenderingTemplate struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
1 change: 1 addition & 0 deletions paymentlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ const (
PaymentLinkPaymentMethodTypePayto PaymentLinkPaymentMethodType = "payto"
PaymentLinkPaymentMethodTypePix PaymentLinkPaymentMethodType = "pix"
PaymentLinkPaymentMethodTypePromptPay PaymentLinkPaymentMethodType = "promptpay"
PaymentLinkPaymentMethodTypeRechnung PaymentLinkPaymentMethodType = "rechnung"
PaymentLinkPaymentMethodTypeSEPADebit PaymentLinkPaymentMethodType = "sepa_debit"
PaymentLinkPaymentMethodTypeSofort PaymentLinkPaymentMethodType = "sofort"
PaymentLinkPaymentMethodTypeSwish PaymentLinkPaymentMethodType = "swish"
Expand Down
Loading
Loading