Skip to content

Commit 02f0811

Browse files
Merge pull request #1958 from stripe/latest-codegen-beta
Update generated code for beta
2 parents 3359c0e + 88b8f17 commit 02f0811

25 files changed

+654
-42
lines changed

.github/pull_request_template.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Why?
2+
<!-- Describe why this change is being made. Briefly include history and context, high-level what this PR does, and what the world looks like afterward. -->
3+
4+
### What?
5+
<!--
6+
List out the key changes made in this PR, e.g.
7+
- implements the antimatter particle trace in the nitronium microfilament drive
8+
- updated tests -->
9+
10+
### See Also
11+
<!-- Include any links or additional information that help explain this change. -->

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## 81.2.0 - 2024-12-18
4+
* [#1957](https://github.com/stripe/stripe-go/pull/1957) This release changes the pinned API version to `2024-12-18.acacia`.
5+
* Add support for `NetworkAdviceCode` and `NetworkDeclineCode` on `ChargeOutcome`, `InvoiceLastFinalizationError`, `PaymentIntentLastPaymentError`, `SetupAttemptSetupError`, `SetupIntentLastSetupError`, and `StripeError`
6+
* Add support for new values `payout_minimum_balance_hold` and `payout_minimum_balance_release` on enum `BalanceTransactionType`
7+
* Add support for `CreditsApplicationInvoiceVoided` on `BillingCreditBalanceTransactionCredit`
8+
* Change type of `BillingCreditBalanceTransactionCreditType` from `literal('credits_granted')` to `enum('credits_application_invoice_voided'|'credits_granted')`
9+
* Add support for `AllowRedisplay` on `Card` and `Source`
10+
* Add support for `RegulatedStatus` on `Card`, `ChargePaymentMethodDetailsCard`, `ConfirmationTokenPaymentMethodPreviewCard`, and `PaymentMethodCard`
11+
* Add support for `Funding` on `ChargePaymentMethodDetailsAmazonPay` and `ChargePaymentMethodDetailsRevolutPay`
12+
* Add support for `NetworkTransactionID` on `ChargePaymentMethodDetailsCard`
13+
* Add support for `ReferencePrefix` on `CheckoutSessionPaymentMethodOptionsBacsDebitMandateOptionsParams`, `CheckoutSessionPaymentMethodOptionsBacsDebitMandateOptions`, `CheckoutSessionPaymentMethodOptionsSepaDebitMandateOptionsParams`, `CheckoutSessionPaymentMethodOptionsSepaDebitMandateOptions`, `PaymentIntentConfirmPaymentMethodOptionsBacsDebitMandateOptionsParams`, `PaymentIntentConfirmPaymentMethodOptionsSepaDebitMandateOptionsParams`, `PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsParams`, `PaymentIntentPaymentMethodOptionsBacsDebitMandateOptions`, `PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsParams`, `PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions`, `SetupIntentConfirmPaymentMethodOptionsBacsDebitMandateOptionsParams`, `SetupIntentConfirmPaymentMethodOptionsSepaDebitMandateOptionsParams`, `SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsParams`, `SetupIntentPaymentMethodOptionsBacsDebitMandateOptions`, `SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsParams`, and `SetupIntentPaymentMethodOptionsSepaDebitMandateOptions`
14+
* Add support for new values `al_tin`, `am_tin`, `ao_tin`, `ba_tin`, `bb_tin`, `bs_tin`, `cd_nif`, `gn_nif`, `kh_tin`, `me_pib`, `mk_vat`, `mr_nif`, `np_pan`, `sn_ninea`, `sr_fin`, `tj_tin`, `ug_tin`, `zm_tin`, and `zw_tin` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, `TaxIdType`, and `TaxTransactionCustomerDetailsTaxIdsType`
15+
* Add support for `VisaCompliance` on `DisputeEvidenceDetailsEnhancedEligibility`, `DisputeEvidenceEnhancedEvidenceParams`, and `DisputeEvidenceEnhancedEvidence`
16+
* Add support for new value `request_signature` on enum `ForwardingRequestReplacements`
17+
* Add support for `AccountHolderAddress` and `BankAddress` on `FundingInstructionsBankTransferFinancialAddressesIban`, `FundingInstructionsBankTransferFinancialAddressesSortCode`, `FundingInstructionsBankTransferFinancialAddressesSpei`, `FundingInstructionsBankTransferFinancialAddressesZengin`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesIban`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSortCode`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSpei`, and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesZengin`
18+
* Add support for `AccountHolderName` on `FundingInstructionsBankTransferFinancialAddressesSpei` and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSpei`
19+
* Add support for `DisabledReason` on `InvoiceAutomaticTax`, `SubscriptionAutomaticTax`, `SubscriptionScheduleDefaultSettingsAutomaticTax`, and `SubscriptionSchedulePhasesAutomaticTax`
20+
* Add support for `TaxID` on `IssuingAuthorizationMerchantData` and `IssuingTransactionMerchantData`
21+
* Add support for `TrialPeriodDays` on `PaymentLinkSubscriptionDataParams`
22+
* Add support for `Al`, `Am`, `Ao`, `Ba`, `Bb`, `Bs`, `Cd`, `Gn`, `Kh`, `Me`, `Mk`, `Mr`, `Np`, `Pe`, `Sn`, `Sr`, `Tj`, `Ug`, `Uy`, `Zm`, and `Zw` on `TaxRegistrationCountryOptionsParams` and `TaxRegistrationCountryOptions`
23+
324
## 81.2.0-beta.3 - 2024-12-12
425
* [#1956](https://github.com/stripe/stripe-go/pull/1956) Update generated code for beta
526
* Add support for `AllowRedisplay` on `Card` and `Source`
@@ -31,7 +52,6 @@
3152
* Add support for `RequestPartialAuthorization` on `PaymentIntentConfirmPaymentMethodOptionsCardParams`, `PaymentIntentPaymentMethodOptionsCardParams`, and `PaymentIntentPaymentMethodOptionsCard`
3253
* Add support for `PaymentMethodOptions` on `PaymentIntentIncrementAuthorizationParams`
3354

34-
3555
## 81.1.0 - 2024-11-20
3656
* [#1951](https://github.com/stripe/stripe-go/pull/1951) This release changes the pinned API version to `2024-11-20.acacia`.
3757
* Add support for `Respond` test helper method on resource `Issuing.Authorization`

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1406
1+
v1435

account.go

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ const (
3232
AccountCapabilityStatusPending AccountCapabilityStatus = "pending"
3333
)
3434

35+
type AccountCompanyOwnershipExemptionReason string
36+
37+
// List of values that AccountCompanyOwnershipExemptionReason can take
38+
const (
39+
AccountCompanyOwnershipExemptionReasonQualifiedEntityExceedsOwnershipThreshold AccountCompanyOwnershipExemptionReason = "qualified_entity_exceeds_ownership_threshold"
40+
AccountCompanyOwnershipExemptionReasonQualifiesAsFinancialInstitution AccountCompanyOwnershipExemptionReason = "qualifies_as_financial_institution"
41+
)
42+
3543
// The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
3644
type AccountCompanyStructure string
3745

@@ -965,7 +973,8 @@ type AccountCompanyParams struct {
965973
// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
966974
OwnershipDeclaration *AccountCompanyOwnershipDeclarationParams `form:"ownership_declaration"`
967975
// This parameter can only be used on Token creation.
968-
OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
976+
OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
977+
OwnershipExemptionReason *string `form:"ownership_exemption_reason"`
969978
// Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement.
970979
OwnersProvided *bool `form:"owners_provided"`
971980
// The company's phone number (used for verification).
@@ -1575,6 +1584,16 @@ type AccountCompanyAddressKanji struct {
15751584
Town string `json:"town"`
15761585
}
15771586

1587+
// This hash is used to attest that the director information provided to Stripe is both current and correct.
1588+
type AccountCompanyDirectorshipDeclaration struct {
1589+
// The Unix timestamp marking when the directorship declaration attestation was made.
1590+
Date int64 `json:"date"`
1591+
// The IP address from which the directorship declaration attestation was made.
1592+
IP string `json:"ip"`
1593+
// The user-agent string from the browser where the directorship declaration attestation was made.
1594+
UserAgent string `json:"user_agent"`
1595+
}
1596+
15781597
// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
15791598
type AccountCompanyOwnershipDeclaration struct {
15801599
// The Unix timestamp marking when the beneficial owner attestation was made.
@@ -1605,6 +1624,8 @@ type AccountCompany struct {
16051624
AddressKana *AccountCompanyAddressKana `json:"address_kana"`
16061625
// The Kanji variation of the company's primary address (Japan only).
16071626
AddressKanji *AccountCompanyAddressKanji `json:"address_kanji"`
1627+
// This hash is used to attest that the director information provided to Stripe is both current and correct.
1628+
DirectorshipDeclaration *AccountCompanyDirectorshipDeclaration `json:"directorship_declaration"`
16081629
// Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).
16091630
DirectorsProvided bool `json:"directors_provided"`
16101631
// Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.
@@ -1620,7 +1641,8 @@ type AccountCompany struct {
16201641
// The Kanji variation of the company's legal name (Japan only).
16211642
NameKanji string `json:"name_kanji"`
16221643
// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
1623-
OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"`
1644+
OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"`
1645+
OwnershipExemptionReason AccountCompanyOwnershipExemptionReason `json:"ownership_exemption_reason"`
16241646
// Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).
16251647
OwnersProvided bool `json:"owners_provided"`
16261648
// The company's phone number (used for verification).

billingportal_configuration.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior strin
5050

5151
// List of values that BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior can take
5252
const (
53-
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorAlwaysInvoice BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "always_invoice"
5453
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "create_prorations"
5554
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorNone BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "none"
5655
)

card.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ type Card struct {
338338
AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"`
339339
// Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
340340
Brand CardBrand `json:"brand"`
341+
// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
342+
BrandProduct string `json:"brand_product"`
341343
// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
342344
Country string `json:"country"`
343345
// Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.

charge.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ const (
2525
ChargeFraudUserReportSafe ChargeFraudUserReport = "safe"
2626
)
2727

28+
// An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
29+
type ChargeOutcomeAdviceCode string
30+
31+
// List of values that ChargeOutcomeAdviceCode can take
32+
const (
33+
ChargeOutcomeAdviceCodeConfirmCardData ChargeOutcomeAdviceCode = "confirm_card_data"
34+
ChargeOutcomeAdviceCodeDoNotTryAgain ChargeOutcomeAdviceCode = "do_not_try_again"
35+
ChargeOutcomeAdviceCodeTryAgainLater ChargeOutcomeAdviceCode = "try_again_later"
36+
)
37+
2838
// funding type of the underlying payment method.
2939
type ChargePaymentMethodDetailsAmazonPayFundingType string
3040

@@ -1271,6 +1281,8 @@ type ChargeOutcomeRule struct {
12711281

12721282
// Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
12731283
type ChargeOutcome struct {
1284+
// An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
1285+
AdviceCode ChargeOutcomeAdviceCode `json:"advice_code"`
12741286
// For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
12751287
NetworkAdviceCode string `json:"network_advice_code"`
12761288
// For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
@@ -1941,6 +1953,8 @@ type ChargePaymentMethodDetailsPaypalSellerProtection struct {
19411953
Status ChargePaymentMethodDetailsPaypalSellerProtectionStatus `json:"status"`
19421954
}
19431955
type ChargePaymentMethodDetailsPaypal struct {
1956+
// Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1957+
Country string `json:"country"`
19441958
// Owner's email. Values are provided by PayPal directly
19451959
// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
19461960
PayerEmail string `json:"payer_email"`

0 commit comments

Comments
 (0)