diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 55d0a33c44..4dcad4de20 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v704 \ No newline at end of file +v715 \ No newline at end of file diff --git a/accountsession.go b/accountsession.go index cecb8be715..5389e88b49 100644 --- a/accountsession.go +++ b/accountsession.go @@ -52,15 +52,12 @@ type AccountSessionComponentsPaymentsParams struct { // The list of features enabled in the embedded component. Features *AccountSessionComponentsPaymentsFeaturesParams `form:"features"` } - -// The list of features enabled in the embedded component. type AccountSessionComponentsPayoutsFeaturesParams struct{} // Configuration for the payouts embedded component. type AccountSessionComponentsPayoutsParams struct { // Whether the embedded component is enabled. - Enabled *bool `form:"enabled"` - // The list of features enabled in the embedded component. + Enabled *bool `form:"enabled"` Features *AccountSessionComponentsPayoutsFeaturesParams `form:"features"` } diff --git a/checkout_session.go b/checkout_session.go index c0f73d17b7..324492ecb7 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -43,6 +43,17 @@ const ( CheckoutSessionConsentTermsOfServiceAccepted CheckoutSessionConsentTermsOfService = "accepted" ) +// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. +// +// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. +type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string + +// List of values that CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition can take +const ( + CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto" + CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden" +) + // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. @@ -785,8 +796,17 @@ type CheckoutSessionAutomaticTaxParams struct { Enabled *bool `form:"enabled"` } +// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. +type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams struct { + // Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + // defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + Position *string `form:"position"` +} + // Configure fields for the Checkout Session to gather active consent from customers. type CheckoutSessionConsentCollectionParams struct { + // Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams `form:"payment_method_reuse_agreement"` // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. @@ -852,6 +872,12 @@ type CheckoutSessionCustomFieldParams struct { Type *string `form:"type"` } +// Custom text that should be displayed after the payment confirmation button. +type CheckoutSessionCustomTextAfterSubmitParams struct { + // Text may be up to 1200 characters in length. + Message *string `form:"message"` +} + // Custom text that should be displayed alongside shipping address collection. type CheckoutSessionCustomTextShippingAddressParams struct { // Text may be up to 1200 characters in length. @@ -872,6 +898,8 @@ type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams struct { // Display additional text for your customers using custom text. type CheckoutSessionCustomTextParams struct { + // Custom text that should be displayed after the payment confirmation button. + AfterSubmit *CheckoutSessionCustomTextAfterSubmitParams `form:"after_submit"` // Custom text that should be displayed alongside shipping address collection. ShippingAddress *CheckoutSessionCustomTextShippingAddressParams `form:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. @@ -1931,8 +1959,18 @@ type CheckoutSessionConsent struct { TermsOfService CheckoutSessionConsentTermsOfService `json:"terms_of_service"` } +// If set to `hidden`, it will hide legal text related to the reuse of a payment method. +type CheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct { + // Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + // + // When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + Position CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition `json:"position"` +} + // When set, provides configuration for the Checkout Session to gather active consent from customers. type CheckoutSessionConsentCollection struct { + // If set to `hidden`, it will hide legal text related to the reuse of a payment method. + PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement"` // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. @@ -2003,6 +2041,12 @@ type CheckoutSessionCustomField struct { Type CheckoutSessionCustomFieldType `json:"type"` } +// Custom text that should be displayed after the payment confirmation button. +type CheckoutSessionCustomTextAfterSubmit struct { + // Text may be up to 1200 characters in length. + Message string `json:"message"` +} + // Custom text that should be displayed alongside shipping address collection. type CheckoutSessionCustomTextShippingAddress struct { // Text may be up to 1200 characters in length. @@ -2021,6 +2065,8 @@ type CheckoutSessionCustomTextTermsOfServiceAcceptance struct { Message string `json:"message"` } type CheckoutSessionCustomText struct { + // Custom text that should be displayed after the payment confirmation button. + AfterSubmit *CheckoutSessionCustomTextAfterSubmit `json:"after_submit"` // Custom text that should be displayed alongside shipping address collection. ShippingAddress *CheckoutSessionCustomTextShippingAddress `json:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. diff --git a/invoice.go b/invoice.go index 3836ec4ced..189a481528 100644 --- a/invoice.go +++ b/invoice.go @@ -371,7 +371,7 @@ type InvoiceUpcomingParams struct { SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"` SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo - // Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. + // A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. SubscriptionCancelAt *int64 `form:"subscription_cancel_at"` // Boolean indicating whether this subscription should cancel at the end of the current period. SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"` @@ -387,7 +387,7 @@ type InvoiceUpcomingParams struct { SubscriptionProrationDate *int64 `form:"subscription_proration_date"` // For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. SubscriptionResumeAt *string `form:"subscription_resume_at"` - // Date a subscription is intended to start (can be future or past) + // Date a subscription is intended to start (can be future or past). SubscriptionStartDate *int64 `form:"subscription_start_date"` // If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` @@ -985,7 +985,7 @@ type InvoiceUpcomingLinesParams struct { SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"` SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo - // Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. + // A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. SubscriptionCancelAt *int64 `form:"subscription_cancel_at"` // Boolean indicating whether this subscription should cancel at the end of the current period. SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"` @@ -1001,7 +1001,7 @@ type InvoiceUpcomingLinesParams struct { SubscriptionProrationDate *int64 `form:"subscription_proration_date"` // For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. SubscriptionResumeAt *string `form:"subscription_resume_at"` - // Date a subscription is intended to start (can be future or past) + // Date a subscription is intended to start (can be future or past). SubscriptionStartDate *int64 `form:"subscription_start_date"` // If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` diff --git a/paymentintent.go b/paymentintent.go index f36d7fdfee..773f8c9a10 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -43,6 +43,7 @@ const ( PaymentIntentCaptureMethodManual PaymentIntentCaptureMethod = "manual" ) +// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. type PaymentIntentConfirmationMethod string // List of values that PaymentIntentConfirmationMethod can take @@ -1805,7 +1806,8 @@ type PaymentIntentParams struct { // The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. ClientSecret *string `form:"client_secret"` // Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). - Confirm *bool `form:"confirm"` + Confirm *bool `form:"confirm"` + // Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. ConfirmationMethod *string `form:"confirmation_method"` // 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"` @@ -2987,7 +2989,8 @@ type PaymentIntent struct { // The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. // // Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. - ClientSecret string `json:"client_secret"` + ClientSecret string `json:"client_secret"` + // Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. ConfirmationMethod PaymentIntentConfirmationMethod `json:"confirmation_method"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` diff --git a/paymentlink.go b/paymentlink.go index 69dc204195..49cb8b7fee 100644 --- a/paymentlink.go +++ b/paymentlink.go @@ -26,6 +26,17 @@ const ( PaymentLinkBillingAddressCollectionRequired PaymentLinkBillingAddressCollection = "required" ) +// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. +// +// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. +type PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition string + +// List of values that PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition can take +const ( + PaymentLinkConsentCollectionPaymentMethodReuseAgreementPositionAuto PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition = "auto" + PaymentLinkConsentCollectionPaymentMethodReuseAgreementPositionHidden PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition = "hidden" +) + // If set to `auto`, enables the collection of customer consent for promotional communications. type PaymentLinkConsentCollectionPromotions string @@ -197,8 +208,17 @@ type PaymentLinkAutomaticTaxParams struct { Enabled *bool `form:"enabled"` } +// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. +type PaymentLinkConsentCollectionPaymentMethodReuseAgreementParams struct { + // Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + // defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + Position *string `form:"position"` +} + // Configure fields to gather active consent from customers. type PaymentLinkConsentCollectionParams struct { + // Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + PaymentMethodReuseAgreement *PaymentLinkConsentCollectionPaymentMethodReuseAgreementParams `form:"payment_method_reuse_agreement"` // If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout // Session will determine whether to display an option to opt into promotional communication // from the merchant depending on the customer's locale. Only available to US merchants. @@ -264,6 +284,12 @@ type PaymentLinkCustomFieldParams struct { Type *string `form:"type"` } +// Custom text that should be displayed after the payment confirmation button. +type PaymentLinkCustomTextAfterSubmitParams struct { + // Text may be up to 1200 characters in length. + Message *string `form:"message"` +} + // Custom text that should be displayed alongside shipping address collection. type PaymentLinkCustomTextShippingAddressParams struct { // Text may be up to 1200 characters in length. @@ -284,6 +310,8 @@ type PaymentLinkCustomTextTermsOfServiceAcceptanceParams struct { // Display additional text for your customers using custom text. type PaymentLinkCustomTextParams struct { + // Custom text that should be displayed after the payment confirmation button. + AfterSubmit *PaymentLinkCustomTextAfterSubmitParams `form:"after_submit"` // Custom text that should be displayed alongside shipping address collection. ShippingAddress *PaymentLinkCustomTextShippingAddressParams `form:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. @@ -596,8 +624,18 @@ type PaymentLinkAutomaticTax struct { Enabled bool `json:"enabled"` } +// Settings related to the payment method reuse text shown in the Checkout UI. +type PaymentLinkConsentCollectionPaymentMethodReuseAgreement struct { + // Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + // + // When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + Position PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition `json:"position"` +} + // When set, provides configuration to gather active consent from customers. type PaymentLinkConsentCollection struct { + // Settings related to the payment method reuse text shown in the Checkout UI. + PaymentMethodReuseAgreement *PaymentLinkConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement"` // If set to `auto`, enables the collection of customer consent for promotional communications. Promotions PaymentLinkConsentCollectionPromotions `json:"promotions"` // If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. @@ -648,6 +686,12 @@ type PaymentLinkCustomField struct { Type PaymentLinkCustomFieldType `json:"type"` } +// Custom text that should be displayed after the payment confirmation button. +type PaymentLinkCustomTextAfterSubmit struct { + // Text may be up to 1200 characters in length. + Message string `json:"message"` +} + // Custom text that should be displayed alongside shipping address collection. type PaymentLinkCustomTextShippingAddress struct { // Text may be up to 1200 characters in length. @@ -666,6 +710,8 @@ type PaymentLinkCustomTextTermsOfServiceAcceptance struct { Message string `json:"message"` } type PaymentLinkCustomText struct { + // Custom text that should be displayed after the payment confirmation button. + AfterSubmit *PaymentLinkCustomTextAfterSubmit `json:"after_submit"` // Custom text that should be displayed alongside shipping address collection. ShippingAddress *PaymentLinkCustomTextShippingAddress `json:"shipping_address"` // Custom text that should be displayed alongside the payment confirmation button. diff --git a/paymentmethodconfiguration.go b/paymentmethodconfiguration.go index cf7976c200..c7e2b1be42 100644 --- a/paymentmethodconfiguration.go +++ b/paymentmethodconfiguration.go @@ -348,25 +348,6 @@ const ( PaymentMethodConfigurationGrabpayDisplayPreferenceValueOn PaymentMethodConfigurationGrabpayDisplayPreferenceValue = "on" ) -// The account's display preference. -type PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference string - -// List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference can take -const ( - PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceNone PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "none" - PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOff PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "off" - PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOn PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "on" -) - -// The effective display preference value. -type PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue string - -// List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue can take -const ( - PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOff PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "off" - PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOn PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "on" -) - // The account's display preference. type PaymentMethodConfigurationIDEALDisplayPreferencePreference string @@ -462,44 +443,6 @@ const ( PaymentMethodConfigurationLinkDisplayPreferenceValueOn PaymentMethodConfigurationLinkDisplayPreferenceValue = "on" ) -// The account's display preference. -type PaymentMethodConfigurationMultibancoDisplayPreferencePreference string - -// List of values that PaymentMethodConfigurationMultibancoDisplayPreferencePreference can take -const ( - PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceNone PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "none" - PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOff PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "off" - PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOn PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "on" -) - -// The effective display preference value. -type PaymentMethodConfigurationMultibancoDisplayPreferenceValue string - -// List of values that PaymentMethodConfigurationMultibancoDisplayPreferenceValue can take -const ( - PaymentMethodConfigurationMultibancoDisplayPreferenceValueOff PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "off" - PaymentMethodConfigurationMultibancoDisplayPreferenceValueOn PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "on" -) - -// The account's display preference. -type PaymentMethodConfigurationNetbankingDisplayPreferencePreference string - -// List of values that PaymentMethodConfigurationNetbankingDisplayPreferencePreference can take -const ( - PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceNone PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "none" - PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceOff PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "off" - PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceOn PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "on" -) - -// The effective display preference value. -type PaymentMethodConfigurationNetbankingDisplayPreferenceValue string - -// List of values that PaymentMethodConfigurationNetbankingDisplayPreferenceValue can take -const ( - PaymentMethodConfigurationNetbankingDisplayPreferenceValueOff PaymentMethodConfigurationNetbankingDisplayPreferenceValue = "off" - PaymentMethodConfigurationNetbankingDisplayPreferenceValueOn PaymentMethodConfigurationNetbankingDisplayPreferenceValue = "on" -) - // The account's display preference. type PaymentMethodConfigurationOXXODisplayPreferencePreference string @@ -538,25 +481,6 @@ const ( PaymentMethodConfigurationP24DisplayPreferenceValueOn PaymentMethodConfigurationP24DisplayPreferenceValue = "on" ) -// The account's display preference. -type PaymentMethodConfigurationPayByBankDisplayPreferencePreference string - -// List of values that PaymentMethodConfigurationPayByBankDisplayPreferencePreference can take -const ( - PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceNone PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "none" - PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceOff PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "off" - PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceOn PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "on" -) - -// The effective display preference value. -type PaymentMethodConfigurationPayByBankDisplayPreferenceValue string - -// List of values that PaymentMethodConfigurationPayByBankDisplayPreferenceValue can take -const ( - PaymentMethodConfigurationPayByBankDisplayPreferenceValueOff PaymentMethodConfigurationPayByBankDisplayPreferenceValue = "off" - PaymentMethodConfigurationPayByBankDisplayPreferenceValueOn PaymentMethodConfigurationPayByBankDisplayPreferenceValue = "on" -) - // The account's display preference. type PaymentMethodConfigurationPayNowDisplayPreferencePreference string @@ -652,25 +576,6 @@ const ( PaymentMethodConfigurationSofortDisplayPreferenceValueOn PaymentMethodConfigurationSofortDisplayPreferenceValue = "on" ) -// The account's display preference. -type PaymentMethodConfigurationUpiDisplayPreferencePreference string - -// List of values that PaymentMethodConfigurationUpiDisplayPreferencePreference can take -const ( - PaymentMethodConfigurationUpiDisplayPreferencePreferenceNone PaymentMethodConfigurationUpiDisplayPreferencePreference = "none" - PaymentMethodConfigurationUpiDisplayPreferencePreferenceOff PaymentMethodConfigurationUpiDisplayPreferencePreference = "off" - PaymentMethodConfigurationUpiDisplayPreferencePreferenceOn PaymentMethodConfigurationUpiDisplayPreferencePreference = "on" -) - -// The effective display preference value. -type PaymentMethodConfigurationUpiDisplayPreferenceValue string - -// List of values that PaymentMethodConfigurationUpiDisplayPreferenceValue can take -const ( - PaymentMethodConfigurationUpiDisplayPreferenceValueOff PaymentMethodConfigurationUpiDisplayPreferenceValue = "off" - PaymentMethodConfigurationUpiDisplayPreferenceValueOn PaymentMethodConfigurationUpiDisplayPreferenceValue = "on" -) - // The account's display preference. type PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference string @@ -709,6 +614,101 @@ const ( PaymentMethodConfigurationWeChatPayDisplayPreferenceValueOn PaymentMethodConfigurationWeChatPayDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceNone PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "none" + PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOff PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "off" + PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOn PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOff PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "off" + PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOn PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "on" +) + +// The account's display preference. +type PaymentMethodConfigurationMultibancoDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationMultibancoDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceNone PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "none" + PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOff PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "off" + PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOn PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationMultibancoDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationMultibancoDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationMultibancoDisplayPreferenceValueOff PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "off" + PaymentMethodConfigurationMultibancoDisplayPreferenceValueOn PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "on" +) + +// The account's display preference. +type PaymentMethodConfigurationNetbankingDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationNetbankingDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceNone PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "none" + PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceOff PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "off" + PaymentMethodConfigurationNetbankingDisplayPreferencePreferenceOn PaymentMethodConfigurationNetbankingDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationNetbankingDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationNetbankingDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationNetbankingDisplayPreferenceValueOff PaymentMethodConfigurationNetbankingDisplayPreferenceValue = "off" + PaymentMethodConfigurationNetbankingDisplayPreferenceValueOn PaymentMethodConfigurationNetbankingDisplayPreferenceValue = "on" +) + +// The account's display preference. +type PaymentMethodConfigurationPayByBankDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationPayByBankDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceNone PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "none" + PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceOff PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "off" + PaymentMethodConfigurationPayByBankDisplayPreferencePreferenceOn PaymentMethodConfigurationPayByBankDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationPayByBankDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationPayByBankDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationPayByBankDisplayPreferenceValueOff PaymentMethodConfigurationPayByBankDisplayPreferenceValue = "off" + PaymentMethodConfigurationPayByBankDisplayPreferenceValueOn PaymentMethodConfigurationPayByBankDisplayPreferenceValue = "on" +) + +// The account's display preference. +type PaymentMethodConfigurationUpiDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationUpiDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationUpiDisplayPreferencePreferenceNone PaymentMethodConfigurationUpiDisplayPreferencePreference = "none" + PaymentMethodConfigurationUpiDisplayPreferencePreferenceOff PaymentMethodConfigurationUpiDisplayPreferencePreference = "off" + PaymentMethodConfigurationUpiDisplayPreferencePreferenceOn PaymentMethodConfigurationUpiDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationUpiDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationUpiDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationUpiDisplayPreferenceValueOff PaymentMethodConfigurationUpiDisplayPreferenceValue = "off" + PaymentMethodConfigurationUpiDisplayPreferenceValueOn PaymentMethodConfigurationUpiDisplayPreferenceValue = "on" +) + // List payment method configurations type PaymentMethodConfigurationListParams struct { ListParams `form:"*"` @@ -1437,19 +1437,6 @@ type PaymentMethodConfigurationGrabpay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationGrabpayDisplayPreference `json:"display_preference"` } -type PaymentMethodConfigurationIDBankTransferDisplayPreference struct { - // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - Overridable bool `json:"overridable"` - // The account's display preference. - Preference PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference `json:"preference"` - // The effective display preference value. - Value PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue `json:"value"` -} -type PaymentMethodConfigurationIDBankTransfer struct { - // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - Available bool `json:"available"` - DisplayPreference *PaymentMethodConfigurationIDBankTransferDisplayPreference `json:"display_preference"` -} type PaymentMethodConfigurationIDEALDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1515,32 +1502,6 @@ type PaymentMethodConfigurationLink struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationLinkDisplayPreference `json:"display_preference"` } -type PaymentMethodConfigurationMultibancoDisplayPreference struct { - // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - Overridable bool `json:"overridable"` - // The account's display preference. - Preference PaymentMethodConfigurationMultibancoDisplayPreferencePreference `json:"preference"` - // The effective display preference value. - Value PaymentMethodConfigurationMultibancoDisplayPreferenceValue `json:"value"` -} -type PaymentMethodConfigurationMultibanco struct { - // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - Available bool `json:"available"` - DisplayPreference *PaymentMethodConfigurationMultibancoDisplayPreference `json:"display_preference"` -} -type PaymentMethodConfigurationNetbankingDisplayPreference struct { - // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - Overridable bool `json:"overridable"` - // The account's display preference. - Preference PaymentMethodConfigurationNetbankingDisplayPreferencePreference `json:"preference"` - // The effective display preference value. - Value PaymentMethodConfigurationNetbankingDisplayPreferenceValue `json:"value"` -} -type PaymentMethodConfigurationNetbanking struct { - // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - Available bool `json:"available"` - DisplayPreference *PaymentMethodConfigurationNetbankingDisplayPreference `json:"display_preference"` -} type PaymentMethodConfigurationOXXODisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1567,19 +1528,6 @@ type PaymentMethodConfigurationP24 struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationP24DisplayPreference `json:"display_preference"` } -type PaymentMethodConfigurationPayByBankDisplayPreference struct { - // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - Overridable bool `json:"overridable"` - // The account's display preference. - Preference PaymentMethodConfigurationPayByBankDisplayPreferencePreference `json:"preference"` - // The effective display preference value. - Value PaymentMethodConfigurationPayByBankDisplayPreferenceValue `json:"value"` -} -type PaymentMethodConfigurationPayByBank struct { - // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - Available bool `json:"available"` - DisplayPreference *PaymentMethodConfigurationPayByBankDisplayPreference `json:"display_preference"` -} type PaymentMethodConfigurationPayNowDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1645,19 +1593,6 @@ type PaymentMethodConfigurationSofort struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationSofortDisplayPreference `json:"display_preference"` } -type PaymentMethodConfigurationUpiDisplayPreference struct { - // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - Overridable bool `json:"overridable"` - // The account's display preference. - Preference PaymentMethodConfigurationUpiDisplayPreferencePreference `json:"preference"` - // The effective display preference value. - Value PaymentMethodConfigurationUpiDisplayPreferenceValue `json:"value"` -} -type PaymentMethodConfigurationUpi struct { - // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - Available bool `json:"available"` - DisplayPreference *PaymentMethodConfigurationUpiDisplayPreference `json:"display_preference"` -} type PaymentMethodConfigurationUSBankAccountDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1684,6 +1619,71 @@ type PaymentMethodConfigurationWeChatPay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationWeChatPayDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationIDBankTransferDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationIDBankTransfer struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationIDBankTransferDisplayPreference `json:"display_preference"` +} +type PaymentMethodConfigurationMultibancoDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationMultibancoDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationMultibancoDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationMultibanco struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationMultibancoDisplayPreference `json:"display_preference"` +} +type PaymentMethodConfigurationNetbankingDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationNetbankingDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationNetbankingDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationNetbanking struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationNetbankingDisplayPreference `json:"display_preference"` +} +type PaymentMethodConfigurationPayByBankDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationPayByBankDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationPayByBankDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationPayByBank struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationPayByBankDisplayPreference `json:"display_preference"` +} +type PaymentMethodConfigurationUpiDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationUpiDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationUpiDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationUpi struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationUpiDisplayPreference `json:"display_preference"` +} // PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. // diff --git a/radar_earlyfraudwarning.go b/radar_earlyfraudwarning.go index 0688b009b0..dffebc1c11 100644 --- a/radar_earlyfraudwarning.go +++ b/radar_earlyfraudwarning.go @@ -25,6 +25,10 @@ type RadarEarlyFraudWarningListParams struct { ListParams `form:"*"` // Only return early fraud warnings for the charge specified by this charge ID. Charge *string `form:"charge"` + // Only return early fraud warnings that were created during the given date interval. + Created *int64 `form:"created"` + // Only return early fraud warnings that were created during the given date interval. + CreatedRange *RangeQueryParams `form:"created"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. diff --git a/testhelpersissuing_authorization.go b/testhelpersissuing_authorization.go index 86f9a5a7fe..c3e8b5b743 100644 --- a/testhelpersissuing_authorization.go +++ b/testhelpersissuing_authorization.go @@ -75,7 +75,7 @@ type TestHelpersIssuingAuthorizationVerificationDataParams struct { // Create a test-mode authorization. type TestHelpersIssuingAuthorizationParams struct { Params `form:"*"` - // The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + // The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Amount *int64 `form:"amount"` // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). AmountDetails *TestHelpersIssuingAuthorizationAmountDetailsParams `form:"amount_details"`