Skip to content

Commit

Permalink
Merge pull request #1958 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Jan 9, 2025
2 parents 3359c0e + 88b8f17 commit 02f0811
Show file tree
Hide file tree
Showing 25 changed files with 654 additions and 42 deletions.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Why?
<!-- 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. -->

### What?
<!--
List out the key changes made in this PR, e.g.
- implements the antimatter particle trace in the nitronium microfilament drive
- updated tests -->

### See Also
<!-- Include any links or additional information that help explain this change. -->
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 81.2.0 - 2024-12-18
* [#1957](https://github.com/stripe/stripe-go/pull/1957) This release changes the pinned API version to `2024-12-18.acacia`.
* Add support for `NetworkAdviceCode` and `NetworkDeclineCode` on `ChargeOutcome`, `InvoiceLastFinalizationError`, `PaymentIntentLastPaymentError`, `SetupAttemptSetupError`, `SetupIntentLastSetupError`, and `StripeError`
* Add support for new values `payout_minimum_balance_hold` and `payout_minimum_balance_release` on enum `BalanceTransactionType`
* Add support for `CreditsApplicationInvoiceVoided` on `BillingCreditBalanceTransactionCredit`
* Change type of `BillingCreditBalanceTransactionCreditType` from `literal('credits_granted')` to `enum('credits_application_invoice_voided'|'credits_granted')`
* Add support for `AllowRedisplay` on `Card` and `Source`
* Add support for `RegulatedStatus` on `Card`, `ChargePaymentMethodDetailsCard`, `ConfirmationTokenPaymentMethodPreviewCard`, and `PaymentMethodCard`
* Add support for `Funding` on `ChargePaymentMethodDetailsAmazonPay` and `ChargePaymentMethodDetailsRevolutPay`
* Add support for `NetworkTransactionID` on `ChargePaymentMethodDetailsCard`
* Add support for `ReferencePrefix` on `CheckoutSessionPaymentMethodOptionsBacsDebitMandateOptionsParams`, `CheckoutSessionPaymentMethodOptionsBacsDebitMandateOptions`, `CheckoutSessionPaymentMethodOptionsSepaDebitMandateOptionsParams`, `CheckoutSessionPaymentMethodOptionsSepaDebitMandateOptions`, `PaymentIntentConfirmPaymentMethodOptionsBacsDebitMandateOptionsParams`, `PaymentIntentConfirmPaymentMethodOptionsSepaDebitMandateOptionsParams`, `PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsParams`, `PaymentIntentPaymentMethodOptionsBacsDebitMandateOptions`, `PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsParams`, `PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions`, `SetupIntentConfirmPaymentMethodOptionsBacsDebitMandateOptionsParams`, `SetupIntentConfirmPaymentMethodOptionsSepaDebitMandateOptionsParams`, `SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsParams`, `SetupIntentPaymentMethodOptionsBacsDebitMandateOptions`, `SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsParams`, and `SetupIntentPaymentMethodOptionsSepaDebitMandateOptions`
* 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`
* Add support for `VisaCompliance` on `DisputeEvidenceDetailsEnhancedEligibility`, `DisputeEvidenceEnhancedEvidenceParams`, and `DisputeEvidenceEnhancedEvidence`
* Add support for new value `request_signature` on enum `ForwardingRequestReplacements`
* Add support for `AccountHolderAddress` and `BankAddress` on `FundingInstructionsBankTransferFinancialAddressesIban`, `FundingInstructionsBankTransferFinancialAddressesSortCode`, `FundingInstructionsBankTransferFinancialAddressesSpei`, `FundingInstructionsBankTransferFinancialAddressesZengin`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesIban`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSortCode`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSpei`, and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesZengin`
* Add support for `AccountHolderName` on `FundingInstructionsBankTransferFinancialAddressesSpei` and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSpei`
* Add support for `DisabledReason` on `InvoiceAutomaticTax`, `SubscriptionAutomaticTax`, `SubscriptionScheduleDefaultSettingsAutomaticTax`, and `SubscriptionSchedulePhasesAutomaticTax`
* Add support for `TaxID` on `IssuingAuthorizationMerchantData` and `IssuingTransactionMerchantData`
* Add support for `TrialPeriodDays` on `PaymentLinkSubscriptionDataParams`
* 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`

## 81.2.0-beta.3 - 2024-12-12
* [#1956](https://github.com/stripe/stripe-go/pull/1956) Update generated code for beta
* Add support for `AllowRedisplay` on `Card` and `Source`
Expand Down Expand Up @@ -31,7 +52,6 @@
* Add support for `RequestPartialAuthorization` on `PaymentIntentConfirmPaymentMethodOptionsCardParams`, `PaymentIntentPaymentMethodOptionsCardParams`, and `PaymentIntentPaymentMethodOptionsCard`
* Add support for `PaymentMethodOptions` on `PaymentIntentIncrementAuthorizationParams`


## 81.1.0 - 2024-11-20
* [#1951](https://github.com/stripe/stripe-go/pull/1951) This release changes the pinned API version to `2024-11-20.acacia`.
* Add support for `Respond` test helper method on resource `Issuing.Authorization`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1406
v1435
26 changes: 24 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const (
AccountCapabilityStatusPending AccountCapabilityStatus = "pending"
)

type AccountCompanyOwnershipExemptionReason string

// List of values that AccountCompanyOwnershipExemptionReason can take
const (
AccountCompanyOwnershipExemptionReasonQualifiedEntityExceedsOwnershipThreshold AccountCompanyOwnershipExemptionReason = "qualified_entity_exceeds_ownership_threshold"
AccountCompanyOwnershipExemptionReasonQualifiesAsFinancialInstitution AccountCompanyOwnershipExemptionReason = "qualifies_as_financial_institution"
)

// 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.
type AccountCompanyStructure string

Expand Down Expand Up @@ -965,7 +973,8 @@ type AccountCompanyParams struct {
// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
OwnershipDeclaration *AccountCompanyOwnershipDeclarationParams `form:"ownership_declaration"`
// This parameter can only be used on Token creation.
OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
OwnershipExemptionReason *string `form:"ownership_exemption_reason"`
// 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.
OwnersProvided *bool `form:"owners_provided"`
// The company's phone number (used for verification).
Expand Down Expand Up @@ -1575,6 +1584,16 @@ type AccountCompanyAddressKanji struct {
Town string `json:"town"`
}

// This hash is used to attest that the director information provided to Stripe is both current and correct.
type AccountCompanyDirectorshipDeclaration struct {
// The Unix timestamp marking when the directorship declaration attestation was made.
Date int64 `json:"date"`
// The IP address from which the directorship declaration attestation was made.
IP string `json:"ip"`
// The user-agent string from the browser where the directorship declaration attestation was made.
UserAgent string `json:"user_agent"`
}

// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
type AccountCompanyOwnershipDeclaration struct {
// The Unix timestamp marking when the beneficial owner attestation was made.
Expand Down Expand Up @@ -1605,6 +1624,8 @@ type AccountCompany struct {
AddressKana *AccountCompanyAddressKana `json:"address_kana"`
// The Kanji variation of the company's primary address (Japan only).
AddressKanji *AccountCompanyAddressKanji `json:"address_kanji"`
// This hash is used to attest that the director information provided to Stripe is both current and correct.
DirectorshipDeclaration *AccountCompanyDirectorshipDeclaration `json:"directorship_declaration"`
// 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).
DirectorsProvided bool `json:"directors_provided"`
// 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.
Expand All @@ -1620,7 +1641,8 @@ type AccountCompany struct {
// The Kanji variation of the company's legal name (Japan only).
NameKanji string `json:"name_kanji"`
// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"`
OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"`
OwnershipExemptionReason AccountCompanyOwnershipExemptionReason `json:"ownership_exemption_reason"`
// 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).
OwnersProvided bool `json:"owners_provided"`
// The company's phone number (used for verification).
Expand Down
1 change: 0 additions & 1 deletion billingportal_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior strin

// List of values that BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior can take
const (
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorAlwaysInvoice BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "always_invoice"
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "create_prorations"
BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorNone BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "none"
)
Expand Down
2 changes: 2 additions & 0 deletions card.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ type Card struct {
AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"`
// Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
Brand CardBrand `json:"brand"`
// 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.)
BrandProduct string `json:"brand_product"`
// 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.
Country string `json:"country"`
// 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.
Expand Down
14 changes: 14 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ const (
ChargeFraudUserReportSafe ChargeFraudUserReport = "safe"
)

// An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
type ChargeOutcomeAdviceCode string

// List of values that ChargeOutcomeAdviceCode can take
const (
ChargeOutcomeAdviceCodeConfirmCardData ChargeOutcomeAdviceCode = "confirm_card_data"
ChargeOutcomeAdviceCodeDoNotTryAgain ChargeOutcomeAdviceCode = "do_not_try_again"
ChargeOutcomeAdviceCodeTryAgainLater ChargeOutcomeAdviceCode = "try_again_later"
)

// funding type of the underlying payment method.
type ChargePaymentMethodDetailsAmazonPayFundingType string

Expand Down Expand Up @@ -1271,6 +1281,8 @@ type ChargeOutcomeRule struct {

// Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
type ChargeOutcome struct {
// An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
AdviceCode ChargeOutcomeAdviceCode `json:"advice_code"`
// 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.
NetworkAdviceCode string `json:"network_advice_code"`
// For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
Expand Down Expand Up @@ -1941,6 +1953,8 @@ type ChargePaymentMethodDetailsPaypalSellerProtection struct {
Status ChargePaymentMethodDetailsPaypalSellerProtectionStatus `json:"status"`
}
type ChargePaymentMethodDetailsPaypal struct {
// 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.
Country string `json:"country"`
// Owner's email. Values are provided by PayPal directly
// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
PayerEmail string `json:"payer_email"`
Expand Down
Loading

0 comments on commit 02f0811

Please sign in to comment.