Skip to content

Commit

Permalink
API Updates (#1541)
Browse files Browse the repository at this point in the history
Codegen for openapi v188
  • Loading branch information
pakrym-stripe authored Aug 31, 2022
1 parent 64fb560 commit bfc88f6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v186
v188
2 changes: 1 addition & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ type ChargePaymentMethodDetailsKlarna struct {
// Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
PaymentMethodCategory ChargePaymentMethodDetailsKlarnaPaymentMethodCategory `json:"payment_method_category"`
// Preferred language of the Klarna authorization page that the customer is redirected to.
// Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, or `fr-CA`
// Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
PreferredLocale string `json:"preferred_locale"`
}

Expand Down
8 changes: 4 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ type CheckoutSessionLineItemPriceDataParams struct {
//
// For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
//
// For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only.
// For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
type CheckoutSessionLineItemParams struct {
// When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
AdjustableQuantity *CheckoutSessionLineItemAdjustableQuantityParams `form:"adjustable_quantity"`
Expand Down Expand Up @@ -953,7 +953,7 @@ type CheckoutSessionPaymentMethodOptionsEPSParams struct {
SetupFutureUsage *string `form:"setup_future_usage"`
}

// contains details about the EPS payment method options.
// contains details about the FPX payment method options.
type CheckoutSessionPaymentMethodOptionsFPXParams struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down Expand Up @@ -1129,7 +1129,7 @@ type CheckoutSessionPaymentMethodOptionsParams struct {
CustomerBalance *CheckoutSessionPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
// contains details about the EPS payment method options.
EPS *CheckoutSessionPaymentMethodOptionsEPSParams `form:"eps"`
// contains details about the EPS payment method options.
// contains details about the FPX payment method options.
FPX *CheckoutSessionPaymentMethodOptionsFPXParams `form:"fpx"`
// contains details about the Giropay payment method options.
Giropay *CheckoutSessionPaymentMethodOptionsGiropayParams `form:"giropay"`
Expand Down Expand Up @@ -1366,7 +1366,7 @@ type CheckoutSessionParams struct {
//
// For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
//
// For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only.
// For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
LineItems []*CheckoutSessionLineItemParams `form:"line_items"`
// The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
Locale *string `form:"locale"`
Expand Down
4 changes: 4 additions & 0 deletions paymentlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ type PaymentLinkShippingOptionParams struct {

// When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
type PaymentLinkSubscriptionDataParams struct {
// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description *string `form:"description"`
// Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
TrialPeriodDays *int64 `form:"trial_period_days"`
}
Expand Down Expand Up @@ -353,6 +355,8 @@ type PaymentLinkShippingOption struct {

// When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
type PaymentLinkSubscriptionData struct {
// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description string `json:"description"`
// Integer representing the number of trial period days before the customer is charged for the first time.
TrialPeriodDays int64 `json:"trial_period_days"`
}
Expand Down
5 changes: 3 additions & 2 deletions testhelpers_customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ package stripe
// Create an incoming testmode bank transfer
type TestHelpersCustomerFundCashBalanceParams struct {
Params `form:"*"`
// Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
// Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
Amount *int64 `form:"amount"`
// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Currency *string `form:"currency"`
Currency *string `form:"currency"`
// A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
Reference *string `form:"reference"`
}

0 comments on commit bfc88f6

Please sign in to comment.