diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b39b96e379..1f205edf7b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1259 \ No newline at end of file +v1266 \ No newline at end of file diff --git a/bankaccount.go b/bankaccount.go index 4f8ba10047..b5b7e2d45d 100644 --- a/bankaccount.go +++ b/bankaccount.go @@ -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. @@ -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. diff --git a/charge.go b/charge.go index 79f61999eb..0b0cb25bbc 100644 --- a/charge.go +++ b/charge.go @@ -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"` diff --git a/dispute.go b/dispute.go index 4394652cd2..7efc8001f2 100644 --- a/dispute.go +++ b/dispute.go @@ -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 @@ -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). @@ -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"` @@ -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"` } diff --git a/error.go b/error.go index 1d3e4e2539..32e8505602 100644 --- a/error.go +++ b/error.go @@ -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" diff --git a/invoice.go b/invoice.go index c7c7d60228..76c27de045 100644 --- a/invoice.go +++ b/invoice.go @@ -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. diff --git a/invoicerenderingtemplate.go b/invoicerenderingtemplate.go index 9f038b6db4..e797719c45 100644 --- a/invoicerenderingtemplate.go +++ b/invoicerenderingtemplate.go @@ -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. diff --git a/tax_registration.go b/tax_registration.go index 6ff44d5edf..9978bcb9fa 100644 --- a/tax_registration.go +++ b/tax_registration.go @@ -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 @@ -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. @@ -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"` } @@ -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"` }