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

Merged
merged 10 commits into from
Jun 24, 2024
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1083
v1095
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
package stripe

const (
apiVersion string = "2024-04-10"
apiVersion string = "2024-06-20"
)
4 changes: 0 additions & 4 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const (
BalanceTransactionSourceTypeIssuingDispute BalanceTransactionSourceType = "issuing.dispute"
BalanceTransactionSourceTypeIssuingTransaction BalanceTransactionSourceType = "issuing.transaction"
BalanceTransactionSourceTypePayout BalanceTransactionSourceType = "payout"
BalanceTransactionSourceTypePlatformTaxFee BalanceTransactionSourceType = "platform_tax_fee"
BalanceTransactionSourceTypeRefund BalanceTransactionSourceType = "refund"
BalanceTransactionSourceTypeReserveTransaction BalanceTransactionSourceType = "reserve_transaction"
BalanceTransactionSourceTypeTaxDeductedAtSource BalanceTransactionSourceType = "tax_deducted_at_source"
Expand Down Expand Up @@ -225,7 +224,6 @@ type BalanceTransactionSource struct {
IssuingDispute *IssuingDispute `json:"-"`
IssuingTransaction *IssuingTransaction `json:"-"`
Payout *Payout `json:"-"`
PlatformTaxFee *PlatformTaxFee `json:"-"`
Refund *Refund `json:"-"`
ReserveTransaction *ReserveTransaction `json:"-"`
TaxDeductedAtSource *TaxDeductedAtSource `json:"-"`
Expand Down Expand Up @@ -299,8 +297,6 @@ func (b *BalanceTransactionSource) UnmarshalJSON(data []byte) error {
err = json.Unmarshal(data, &b.IssuingTransaction)
case BalanceTransactionSourceTypePayout:
err = json.Unmarshal(data, &b.Payout)
case BalanceTransactionSourceTypePlatformTaxFee:
err = json.Unmarshal(data, &b.PlatformTaxFee)
case BalanceTransactionSourceTypeRefund:
err = json.Unmarshal(data, &b.Refund)
case BalanceTransactionSourceTypeReserveTransaction:
Expand Down
47 changes: 30 additions & 17 deletions capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,38 @@

package stripe

// If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`.
//
// `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
//
// `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
// This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.
type CapabilityFutureRequirementsDisabledReason string

// List of values that CapabilityFutureRequirementsDisabledReason can take
const (
CapabilityFutureRequirementsDisabledReasonOther CapabilityFutureRequirementsDisabledReason = "other"
CapabilityFutureRequirementsDisabledReasonPausedInactivity CapabilityFutureRequirementsDisabledReason = "paused.inactivity"
CapabilityFutureRequirementsDisabledReasonPendingOnboarding CapabilityFutureRequirementsDisabledReason = "pending.onboarding"
CapabilityFutureRequirementsDisabledReasonPendingReview CapabilityFutureRequirementsDisabledReason = "pending.review"
CapabilityFutureRequirementsDisabledReasonPlatformDisabled CapabilityFutureRequirementsDisabledReason = "platform_disabled"
CapabilityFutureRequirementsDisabledReasonPlatformPaused CapabilityFutureRequirementsDisabledReason = "platform_paused"
CapabilityFutureRequirementsDisabledReasonRejectedInactivity CapabilityFutureRequirementsDisabledReason = "rejected.inactivity"
CapabilityFutureRequirementsDisabledReasonRejectedOther CapabilityFutureRequirementsDisabledReason = "rejected.other"
CapabilityFutureRequirementsDisabledReasonRejectedUnsupportedBusiness CapabilityFutureRequirementsDisabledReason = "rejected.unsupported_business"
CapabilityFutureRequirementsDisabledReasonRequirementsFieldsNeeded CapabilityFutureRequirementsDisabledReason = "requirements.fields_needed"
)

// Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
type CapabilityDisabledReason string

// List of values that CapabilityDisabledReason can take
const (
CapabilityDisabledReasonPendingOnboarding CapabilityDisabledReason = "pending.onboarding"
CapabilityDisabledReasonPendingReview CapabilityDisabledReason = "pending.review"
CapabilityDisabledReasonRejectedFraud CapabilityDisabledReason = "rejected_fraud"
CapabilityDisabledReasonRejectedListed CapabilityDisabledReason = "rejected.listed"
CapabilityDisabledReasonRejectedOther CapabilityDisabledReason = "rejected.other"
CapabilityDisabledReasonRequirementsFieldsNeeded CapabilityDisabledReason = "requirement.fields_needed"
CapabilityDisabledReasonOther CapabilityDisabledReason = "other"
CapabilityDisabledReasonPausedInactivity CapabilityDisabledReason = "paused.inactivity"
CapabilityDisabledReasonPendingOnboarding CapabilityDisabledReason = "pending.onboarding"
CapabilityDisabledReasonPendingReview CapabilityDisabledReason = "pending.review"
CapabilityDisabledReasonPlatformDisabled CapabilityDisabledReason = "platform_disabled"
CapabilityDisabledReasonPlatformPaused CapabilityDisabledReason = "platform_paused"
CapabilityDisabledReasonRejectedInactivity CapabilityDisabledReason = "rejected.inactivity"
CapabilityDisabledReasonRejectedOther CapabilityDisabledReason = "rejected.other"
CapabilityDisabledReasonRejectedUnsupportedBusiness CapabilityDisabledReason = "rejected.unsupported_business"
CapabilityDisabledReasonRequirementsFieldsNeeded CapabilityDisabledReason = "requirements.fields_needed"
)

// The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.
Expand Down Expand Up @@ -90,7 +107,7 @@ type CapabilityFutureRequirements struct {
// Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
CurrentlyDue []string `json:"currently_due"`
// This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.
DisabledReason string `json:"disabled_reason"`
DisabledReason CapabilityFutureRequirementsDisabledReason `json:"disabled_reason"`
// Fields that are `currently_due` and need to be collected again because validation or verification failed.
Errors []*CapabilityFutureRequirementsError `json:"errors"`
// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.
Expand All @@ -115,11 +132,7 @@ type CapabilityRequirements struct {
CurrentDeadline int64 `json:"current_deadline"`
// Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
CurrentlyDue []string `json:"currently_due"`
// If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`.
//
// `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
//
// `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
// Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
DisabledReason CapabilityDisabledReason `json:"disabled_reason"`
// Fields that are `currently_due` and need to be collected again because validation or verification failed.
Errors []*AccountRequirementsError `json:"errors"`
Expand Down
11 changes: 6 additions & 5 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const (
CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse"
)

// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown`
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
type CheckoutSessionCustomerDetailsTaxIDType string

// List of values that CheckoutSessionCustomerDetailsTaxIDType can take
Expand All @@ -141,6 +141,7 @@ const (
CheckoutSessionCustomerDetailsTaxIDTypeCAPSTMB CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_mb"
CheckoutSessionCustomerDetailsTaxIDTypeCAPSTSK CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_sk"
CheckoutSessionCustomerDetailsTaxIDTypeCAQST CheckoutSessionCustomerDetailsTaxIDType = "ca_qst"
CheckoutSessionCustomerDetailsTaxIDTypeCHUID CheckoutSessionCustomerDetailsTaxIDType = "ch_uid"
CheckoutSessionCustomerDetailsTaxIDTypeCHVAT CheckoutSessionCustomerDetailsTaxIDType = "ch_vat"
CheckoutSessionCustomerDetailsTaxIDTypeCLTIN CheckoutSessionCustomerDetailsTaxIDType = "cl_tin"
CheckoutSessionCustomerDetailsTaxIDTypeCNTIN CheckoutSessionCustomerDetailsTaxIDType = "cn_tin"
Expand Down Expand Up @@ -1956,9 +1957,9 @@ func (p *CheckoutSessionSubscriptionDataParams) AddMetadata(key string, value st
p.Metadata[key] = value
}

// Controls tax ID collection settings for the session.
// Controls tax ID collection during checkout.
type CheckoutSessionTaxIDCollectionParams struct {
// Set to true to enable Tax ID collection.
// Enable tax ID collection during checkout. Defaults to `false`.
Enabled *bool `form:"enabled"`
}

Expand Down Expand Up @@ -2095,7 +2096,7 @@ type CheckoutSessionParams struct {
// information from the successful Checkout Session on your page, read the
// guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
SuccessURL *string `form:"success_url"`
// Controls tax ID collection settings for the session.
// Controls tax ID collection during checkout.
TaxIDCollection *CheckoutSessionTaxIDCollectionParams `form:"tax_id_collection"`
// The UI mode of the Session. Defaults to `hosted`.
UIMode *string `form:"ui_mode"`
Expand Down Expand Up @@ -2311,7 +2312,7 @@ type CheckoutSessionCustomText struct {

// The customer's tax IDs after a completed Checkout Session.
type CheckoutSessionCustomerDetailsTaxID struct {
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown`
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"`
// The value of the tax ID.
Value string `json:"value"`
Expand Down
2 changes: 1 addition & 1 deletion customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (p *CustomerListParams) AddExpand(f string) {

// The customer's tax IDs.
type CustomerTaxIDDataParams struct {
// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`
// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`
Type *string `form:"type"`
// Value of the tax ID.
Value *string `form:"value"`
Expand Down
6 changes: 3 additions & 3 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,7 @@ func TestTestHelpersIssuingAuthorizationsCapturePost(t *testing.T) {
Type: stripe.String("diesel"),
Unit: stripe.String("liter"),
UnitCostDecimal: stripe.Float64(3.5),
VolumeDecimal: stripe.Float64(10),
QuantityDecimal: stripe.Float64(10),
},
Lodging: &stripe.TestHelpersIssuingAuthorizationCapturePurchaseDetailsLodgingParams{
CheckInAt: stripe.Int64(1633651200),
Expand Down Expand Up @@ -3315,7 +3315,7 @@ func TestTestHelpersIssuingTransactionsCreateForceCapturePost(t *testing.T) {
Type: stripe.String("diesel"),
Unit: stripe.String("liter"),
UnitCostDecimal: stripe.Float64(3.5),
VolumeDecimal: stripe.Float64(10),
QuantityDecimal: stripe.Float64(10),
},
Lodging: &stripe.TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams{
CheckInAt: stripe.Int64(1533651200),
Expand Down Expand Up @@ -3373,7 +3373,7 @@ func TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost(t *testing.T) {
Type: stripe.String("diesel"),
Unit: stripe.String("liter"),
UnitCostDecimal: stripe.Float64(3.5),
VolumeDecimal: stripe.Float64(10),
QuantityDecimal: stripe.Float64(10),
},
Lodging: &stripe.TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams{
CheckInAt: stripe.Int64(1533651200),
Expand Down
Loading
Loading