Skip to content

Commit

Permalink
API Updates for beta branch (#1480)
Browse files Browse the repository at this point in the history
* Fix test assert to allow beta versions (#1478)

* Codegen for openapi v157 (#1477)

* Bump version to 72.115.0

* Set version to 72.115.0 to simplify merge

* Reset version to 72.115.0-beta.1

* Codegen for openapi v158

Co-authored-by: Kamil Pajdzik <[email protected]>
Co-authored-by: Kamil Pajdzik <[email protected]>
  • Loading branch information
3 people authored Jun 21, 2022
1 parent d1ca86a commit b200cf5
Show file tree
Hide file tree
Showing 26 changed files with 266 additions and 28 deletions.
21 changes: 12 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 72.115.0 - 2022-06-17
* [#1477](https://github.com/stripe/stripe-go/pull/1477) API Updates
* Add support for `FundCashBalance` test helper method on resource `Customer`
* Add support for `StatementDescriptorPrefixKana` and `StatementDescriptorPrefixKanji` on `AccountSettingsCardPaymentsParams`, `AccountSettingsCardPayments`, and `AccountSettingsPayments`
* Add support for `StatementDescriptorSuffixKana` and `StatementDescriptorSuffixKanji` on `CheckoutSessionPaymentMethodOptionsCardParams`, `CheckoutSessionPaymentMethodOptionsCard`, `PaymentIntentConfirmPaymentMethodOptionsCardParams`, `PaymentIntentPaymentMethodOptionsCardParams`, and `PaymentIntentPaymentMethodOptionsCard`
* Add support for `TotalExcludingTax` on `CreditNote`
* Change type of `CustomerInvoiceSettingsRenderingOptionsParams` from `rendering_options_param` to `emptyStringable(rendering_options_param)`
* Add support for `RenderingOptions` on `CustomerInvoiceSettings` and `Invoice`
* [#1478](https://github.com/stripe/stripe-go/pull/1478) Fix test assert to allow beta versions
* [#1475](https://github.com/stripe/stripe-go/pull/1475) Trigger workflows on beta branches

## 72.115.0-beta.1 - 2022-06-15
* [#1476](https://github.com/stripe/stripe-go/pull/1476) API Updates for beta branch
Add support for NetworkDetails properties on ReceivedCredits/ReceivedDebits resource
Expand Down Expand Up @@ -41,7 +52,6 @@
* Add support for `HostedInstructionsURL` on `PaymentIntentNextActionDisplayBankTransferInstructions`
* Add support for `IDNumberSecondaryProvided` on `Person`
* Add support for `CardIssuing` on `TreasuryFinancialAccountFeaturesParams` and `TreasuryFinancialAccountUpdateFeaturesParams`


## 72.110.0 - 2022-05-23
* [#1465](https://github.com/stripe/stripe-go/pull/1465) API Updates
Expand Down Expand Up @@ -80,14 +90,12 @@
## 72.107.0 - 2022-05-11
* [#1459](https://github.com/stripe/stripe-go/pull/1459) API Updates
* Add support for `AmountDiscount`, `AmountTax`, and `Product` on `LineItem`


## 72.106.0 - 2022-05-05
* [#1457](https://github.com/stripe/stripe-go/pull/1457) API Updates
* Add support for `DefaultPriceData` on `ProductParams`
* Add support for `DefaultPrice` on `ProductParams` and `Product`
* Add support for `InstructionsEmail` on `RefundParams` and `Refund`


## 72.105.0 - 2022-05-05
* [#1455](https://github.com/stripe/stripe-go/pull/1455) API Updates
Expand All @@ -98,7 +106,6 @@
* [#1454](https://github.com/stripe/stripe-go/pull/1454) API Updates
* Add support for `RegisteredAddress` on `AccountIndividualParams`, `PersonParams`, `Person`, `TokenAccountIndividualParams`, and `TokenPersonParams`
* Add support for `PaymentMethodData` on `SetupIntentConfirmParams` and `SetupIntentParams`


## 72.104.0 - 2022-05-03
* [#1453](https://github.com/stripe/stripe-go/pull/1453) API Updates
Expand All @@ -108,7 +115,6 @@
* Add support for new value `eu_oss_vat` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, and `TaxIdType`
* Add support for `CashBalance` on `Customer`
* Add support for `Application` on `Invoice`, `Quote`, `SubscriptionSchedule`, and `Subscription`


## 72.103.0 - 2022-04-21
* [#1452](https://github.com/stripe/stripe-go/pull/1452) API Updates
Expand Down Expand Up @@ -220,7 +226,6 @@
* [#1425](https://github.com/stripe/stripe-go/pull/1425) API Updates
* Add support for new resources `InvoiceLineProrationDetails` and `InvoiceLineProrationDetailsCreditedItems`
* Add support for `ProrationDetails` on `InvoiceLine`


## 72.90.0 - 2022-03-01
* [#1423](https://github.com/stripe/stripe-go/pull/1423) [#1424](https://github.com/stripe/stripe-go/pull/1424) API Updates
Expand Down Expand Up @@ -380,7 +385,6 @@
* [#1371](https://github.com/stripe/stripe-go/pull/1371) API Updates
* Remove support for `OwnershipDeclarationShownAndSigned` on `TokenAccountParams`. This API was unused.
* Add support for `OwnershipDeclarationShownAndSigned` on `TokenAccountCompanyParams`


## 72.73.0 - 2021-11-01
* [#1368](https://github.com/stripe/stripe-go/pull/1368) API Updates
Expand Down Expand Up @@ -471,7 +475,6 @@
* Add support for `AfterExpiration`, `ConsentCollection`, and `ExpiresAt` on `CheckoutSessionParams` and `CheckoutSession`
* Add support for `Consent` and `RecoveredFrom` on `CheckoutSession`


## 72.62.0 - 2021-08-27
* [#1329](https://github.com/stripe/stripe-go/pull/1329) API Updates
* Add support for `CancellationReason` on `BillingPortalConfigurationFeaturesSubscriptionCancelParams`, `BillingPortalConfigurationFeaturesSubscriptionCancelParams`, and `BillingPortalConfigurationFeaturesSubscriptionCancel`
Expand Down Expand Up @@ -570,7 +573,6 @@
* Add support for `Object` on `BalanceTransaction` and `Transfer`
* Removed a redundant form-encoding conversion for `UpTo` in `PriceTierParams.AppendTo` method


## 72.48.0 - 2021-06-04
* [#1291](https://github.com/stripe/stripe-go/pull/1291) API Updates
* Add new resource `TaxCode`.
Expand Down Expand Up @@ -2665,3 +2667,4 @@ Version 71 of stripe-go contains some major changes. Many of them are breaking,

## 1.0.0 - 2014-09-22
* Initial version

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v154
v158
32 changes: 32 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ const (
AccountCapabilitiesPayNowPaymentsPending AccountCapabilitiesPayNowPayments = "pending"
)

// The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
type AccountCapabilitiesPromptpayPayments string

// List of values that AccountCapabilitiesPromptpayPayments can take
const (
AccountCapabilitiesPromptpayPaymentsActive AccountCapabilitiesPromptpayPayments = "active"
AccountCapabilitiesPromptpayPaymentsInactive AccountCapabilitiesPromptpayPayments = "inactive"
AccountCapabilitiesPromptpayPaymentsPending AccountCapabilitiesPromptpayPayments = "pending"
)

// The status of the banking capability, or whether the account can have bank accounts.
type AccountCapabilitiesTreasury string

Expand Down Expand Up @@ -447,6 +457,12 @@ type AccountCapabilitiesPayNowPaymentsParams struct {
Requested *bool `form:"requested"`
}

// The promptpay_payments capability.
type AccountCapabilitiesPromptpayPaymentsParams struct {
// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Requested *bool `form:"requested"`
}

// The sepa_debit_payments capability.
type AccountCapabilitiesSEPADebitPaymentsParams struct {
// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -539,6 +555,8 @@ type AccountCapabilitiesParams struct {
P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"`
// The paynow_payments capability.
PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"`
// The promptpay_payments capability.
PromptpayPayments *AccountCapabilitiesPromptpayPaymentsParams `form:"promptpay_payments"`
// The sepa_debit_payments capability.
SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"`
// The sofort_payments capability.
Expand Down Expand Up @@ -749,6 +767,10 @@ type AccountSettingsCardPaymentsParams struct {
DeclineOn *AccountDeclineSettingsParams `form:"decline_on"`
// The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefix *string `form:"statement_descriptor_prefix"`
// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefixKana *string `form:"statement_descriptor_prefix_kana"`
// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefixKanji *string `form:"statement_descriptor_prefix_kanji"`
}

// AccountSettingsDashboardParams represent allowed parameters to configure settings for the
Expand Down Expand Up @@ -941,6 +963,8 @@ type AccountCapabilities struct {
P24Payments AccountCapabilityStatus `json:"p24_payments"`
// The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.
PayNowPayments AccountCapabilitiesPayNowPayments `json:"paynow_payments"`
// The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
PromptpayPayments AccountCapabilitiesPromptpayPayments `json:"promptpay_payments"`
// The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
SEPADebitPayments AccountCapabilityStatus `json:"sepa_debit_payments"`
// The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.
Expand Down Expand Up @@ -1150,6 +1174,10 @@ type AccountSettingsCardPayments struct {
DeclineOn *AccountDeclineOn `json:"decline_on"`
// The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefix string `json:"statement_descriptor_prefix"`
// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"`
// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"`
}
type AccountSettingsDashboard struct {
// The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.
Expand All @@ -1164,6 +1192,10 @@ type AccountSettingsPayments struct {
StatementDescriptorKana string `json:"statement_descriptor_kana"`
// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)
StatementDescriptorKanji string `json:"statement_descriptor_kanji"`
// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"`
// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"`
}
type AccountPayoutSchedule struct {
// The number of days charges for the account will be held before being paid out.
Expand Down
5 changes: 5 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,10 @@ type ChargePaymentMethodDetailsPayNow struct {
// Reference number associated with this PayNow payment
Reference string `json:"reference"`
}
type ChargePaymentMethodDetailsPromptpay struct {
// Bill reference generated by PromptPay
Reference string `json:"reference"`
}
type ChargePaymentMethodDetailsSepaCreditTransfer struct {
// Name of the bank associated with the bank account.
BankName string `json:"bank_name"`
Expand Down Expand Up @@ -877,6 +881,7 @@ type ChargePaymentMethodDetails struct {
OXXO *ChargePaymentMethodDetailsOXXO `json:"oxxo"`
P24 *ChargePaymentMethodDetailsP24 `json:"p24"`
PayNow *ChargePaymentMethodDetailsPayNow `json:"paynow"`
Promptpay *ChargePaymentMethodDetailsPromptpay `json:"promptpay"`
SepaCreditTransfer *ChargePaymentMethodDetailsSepaCreditTransfer `json:"sepa_credit_transfer"`
SepaDebit *ChargePaymentMethodDetailsSepaDebit `json:"sepa_debit"`
Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"`
Expand Down
8 changes: 8 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,10 @@ type CheckoutSessionPaymentMethodOptionsCardParams struct {
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage *string `form:"setup_future_usage"`
// Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
StatementDescriptorSuffixKana *string `form:"statement_descriptor_suffix_kana"`
// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
StatementDescriptorSuffixKanji *string `form:"statement_descriptor_suffix_kanji"`
}

// contains details about the EPS payment method options.
Expand Down Expand Up @@ -1449,6 +1453,10 @@ type CheckoutSessionPaymentMethodOptionsCard struct {
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage `json:"setup_future_usage"`
// Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
StatementDescriptorSuffixKana string `json:"statement_descriptor_suffix_kana"`
// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
StatementDescriptorSuffixKanji string `json:"statement_descriptor_suffix_kanji"`
}
type CheckoutSessionPaymentMethodOptionsEPS struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
Expand Down
4 changes: 4 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import (
terminalconnectiontoken "github.com/stripe/stripe-go/v72/terminal/connectiontoken"
terminallocation "github.com/stripe/stripe-go/v72/terminal/location"
terminalreader "github.com/stripe/stripe-go/v72/terminal/reader"
testhelperscustomer "github.com/stripe/stripe-go/v72/testhelpers/customer"
testhelpersrefund "github.com/stripe/stripe-go/v72/testhelpers/refund"
testhelpersterminalreader "github.com/stripe/stripe-go/v72/testhelpers/terminal/reader"
testhelperstestclock "github.com/stripe/stripe-go/v72/testhelpers/testclock"
Expand Down Expand Up @@ -274,6 +275,8 @@ type API struct {
TerminalLocations *terminallocation.Client
// TerminalReaders is the client used to invoke /terminal/readers APIs.
TerminalReaders *terminalreader.Client
// TestHelpersCustomers is the client used to invoke /customers APIs.
TestHelpersCustomers *testhelperscustomer.Client
// TestHelpersRefunds is the client used to invoke /refunds APIs.
TestHelpersRefunds *testhelpersrefund.Client
// TestHelpersTerminalReaders is the client used to invoke /terminal/readers APIs.
Expand Down Expand Up @@ -413,6 +416,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.TerminalConnectionTokens = &terminalconnectiontoken.Client{B: backends.API, Key: key}
a.TerminalLocations = &terminallocation.Client{B: backends.API, Key: key}
a.TerminalReaders = &terminalreader.Client{B: backends.API, Key: key}
a.TestHelpersCustomers = &testhelperscustomer.Client{B: backends.API, Key: key}
a.TestHelpersRefunds = &testhelpersrefund.Client{B: backends.API, Key: key}
a.TestHelpersTerminalReaders = &testhelpersterminalreader.Client{B: backends.API, Key: key}
a.TestHelpersTestClocks = &testhelperstestclock.Client{B: backends.API, Key: key}
Expand Down
6 changes: 5 additions & 1 deletion creditnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,16 @@ type CreditNote struct {
Refund *Refund `json:"refund"`
// Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
Status CreditNoteStatus `json:"status"`
// The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts.
// The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
Subtotal int64 `json:"subtotal"`
// The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"`
// The aggregate amounts calculated per tax rate for all line items.
TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"`
// The integer amount in %s representing the total amount of the credit note, including tax and all discount.
Total int64 `json:"total"`
// The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
TotalExcludingTax int64 `json:"total_excluding_tax"`
// Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
Type CreditNoteType `json:"type"`
// The time that the credit note was voided.
Expand Down
Loading

0 comments on commit b200cf5

Please sign in to comment.