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 #1918

Merged
merged 4 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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1259
v1266
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 @@ -1067,7 +1067,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
27 changes: 21 additions & 6 deletions dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ package stripe

import "encoding/json"

// 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 @@ -22,9 +31,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 @@ -232,6 +242,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 @@ -251,9 +265,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 @@ -184,6 +184,7 @@ const (
ErrorCodeTerminalLocationCountryUnsupported ErrorCode = "terminal_location_country_unsupported"
ErrorCodeTerminalReaderBusy ErrorCode = "terminal_reader_busy"
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 @@ -3177,8 +3177,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
41 changes: 40 additions & 1 deletion tax_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,16 @@ const (
TaxRegistrationCountryOptionsTRTypeSimplified TaxRegistrationCountryOptionsTRType = "simplified"
)

// The type of the election for the state sales tax registration.
type TaxRegistrationCountryOptionsUSStateSalesTaxElectionType string

// List of values that TaxRegistrationCountryOptionsUSStateSalesTaxElectionType can take
const (
TaxRegistrationCountryOptionsUSStateSalesTaxElectionTypeLocalUseTax TaxRegistrationCountryOptionsUSStateSalesTaxElectionType = "local_use_tax"
TaxRegistrationCountryOptionsUSStateSalesTaxElectionTypeSimplifiedSellersUseTax TaxRegistrationCountryOptionsUSStateSalesTaxElectionType = "simplified_sellers_use_tax"
TaxRegistrationCountryOptionsUSStateSalesTaxElectionTypeSingleLocalUseTax TaxRegistrationCountryOptionsUSStateSalesTaxElectionType = "single_local_use_tax"
)

// Type of registration in the US.
type TaxRegistrationCountryOptionsUSType string

Expand Down Expand Up @@ -1363,6 +1373,20 @@ type TaxRegistrationCountryOptionsUSLocalLeaseTaxParams struct {
Jurisdiction *string `form:"jurisdiction"`
}

// Elections for the state sales tax registration.
type TaxRegistrationCountryOptionsUSStateSalesTaxElectionParams struct {
// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
Jurisdiction *string `form:"jurisdiction"`
// The type of the election for the state sales tax registration.
Type *string `form:"type"`
}

// Options for the state sales tax registration.
type TaxRegistrationCountryOptionsUSStateSalesTaxParams struct {
// Elections for the state sales tax registration.
Elections []*TaxRegistrationCountryOptionsUSStateSalesTaxElectionParams `form:"elections"`
}

// Options for the registration in US.
type TaxRegistrationCountryOptionsUSParams struct {
// Options for the local amusement tax registration.
Expand All @@ -1371,6 +1395,8 @@ type TaxRegistrationCountryOptionsUSParams struct {
LocalLeaseTax *TaxRegistrationCountryOptionsUSLocalLeaseTaxParams `form:"local_lease_tax"`
// Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
State *string `form:"state"`
// Options for the state sales tax registration.
StateSalesTax *TaxRegistrationCountryOptionsUSStateSalesTaxParams `form:"state_sales_tax"`
// Type of registration to be created in the US.
Type *string `form:"type"`
}
Expand Down Expand Up @@ -1895,11 +1921,24 @@ type TaxRegistrationCountryOptionsUSLocalLeaseTax struct {
// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
Jurisdiction string `json:"jurisdiction"`
}

// Elections for the state sales tax registration.
type TaxRegistrationCountryOptionsUSStateSalesTaxElection struct {
// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
Jurisdiction string `json:"jurisdiction"`
// The type of the election for the state sales tax registration.
Type TaxRegistrationCountryOptionsUSStateSalesTaxElectionType `json:"type"`
}
type TaxRegistrationCountryOptionsUSStateSalesTax struct {
// Elections for the state sales tax registration.
Elections []*TaxRegistrationCountryOptionsUSStateSalesTaxElection `json:"elections"`
}
type TaxRegistrationCountryOptionsUS struct {
LocalAmusementTax *TaxRegistrationCountryOptionsUSLocalAmusementTax `json:"local_amusement_tax"`
LocalLeaseTax *TaxRegistrationCountryOptionsUSLocalLeaseTax `json:"local_lease_tax"`
// Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
State string `json:"state"`
State string `json:"state"`
StateSalesTax *TaxRegistrationCountryOptionsUSStateSalesTax `json:"state_sales_tax"`
// Type of registration in the US.
Type TaxRegistrationCountryOptionsUSType `json:"type"`
}
Expand Down
Loading