Skip to content

Commit

Permalink
Update services based on v736 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Dec 22, 2023
1 parent 88580d7 commit fb69cd1
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v733
v736
24 changes: 10 additions & 14 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ defmodule Stripe.Account do
)

(
@typedoc "The Kana variation of the the individual's primary address (Japan only)."
@typedoc "The Kana variation of the company's primary address (Japan only)."
@type address_kana :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand Down Expand Up @@ -119,8 +119,8 @@ defmodule Stripe.Account do
)

(
@typedoc "Settings specific to Bacs Direct Debit payments."
@type bacs_debit_payments :: %{optional(:display_name) => binary}
@typedoc "The bacs_debit_payments capability."
@type bacs_debit_payments :: %{optional(:requested) => boolean}
)

(
Expand Down Expand Up @@ -217,8 +217,8 @@ defmodule Stripe.Account do
)

(
@typedoc "The card_issuing capability."
@type card_issuing :: %{optional(:requested) => boolean}
@typedoc "Settings specific to the account's use of the Card Issuing product."
@type card_issuing :: %{optional(:tos_acceptance) => tos_acceptance}
)

(
Expand Down Expand Up @@ -338,7 +338,7 @@ defmodule Stripe.Account do
)

(
@typedoc "An identifying document, either a passport or local ID card."
@typedoc "A document verifying the business."
@type document :: %{optional(:back) => binary, optional(:front) => binary}
)

Expand Down Expand Up @@ -583,12 +583,11 @@ defmodule Stripe.Account do
)

(
@typedoc "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance)."
@typedoc "Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance)."
@type tos_acceptance :: %{
optional(:date) => integer,
optional(:ip) => binary,
optional(:service_agreement) => binary,
optional(:user_agent) => binary
optional(:user_agent) => binary | binary
}
)

Expand All @@ -608,11 +607,8 @@ defmodule Stripe.Account do
)

(
@typedoc "The individual's verification document information."
@type verification :: %{
optional(:additional_document) => additional_document,
optional(:document) => document
}
@typedoc "Information on the verification state of the company."
@type verification :: %{optional(:document) => document}
)

(
Expand Down
19 changes: 7 additions & 12 deletions lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ defmodule Stripe.Checkout.Session do
:payment_status
]

@typedoc "The `checkout.session` type.\n\n * `after_expiration` When set, provides configuration for actions to take if this Checkout Session expires.\n * `allow_promotion_codes` Enables user redeemable promotion codes.\n * `amount_subtotal` Total of all items before discounts or taxes are applied.\n * `amount_total` Total of all items after discounts and taxes are applied.\n * `automatic_tax` \n * `billing_address_collection` Describes whether Checkout should collect the customer's billing address.\n * `cancel_url` If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.\n * `client_reference_id` A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.\n * `client_secret` Client secret to be used when initializing Stripe.js embedded checkout.\n * `consent` Results of `consent_collection` for this session.\n * `consent_collection` When set, provides configuration for the Checkout Session to gather active consent from customers.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` 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).\n * `currency_conversion` Currency conversion details for automatic currency conversion sessions\n * `custom_fields` Collect additional information from your customer using custom fields. Up to 2 fields are supported.\n * `custom_text` \n * `customer` The ID of the customer for this Session.\nFor Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.\n * `customer_creation` Configure whether a Checkout Session creates a Customer when the Checkout Session completes.\n * `customer_details` The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.\n * `customer_email` If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.\n * `expires_at` The timestamp at which the Checkout Session will expire.\n * `id` Unique identifier for the object.\n * `invoice` ID of the invoice created by the Checkout Session, if it exists.\n * `invoice_creation` Details on the state of invoice creation for the Checkout Session.\n * `line_items` The line items purchased by the customer.\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `locale` The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.\n * `metadata` Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n * `mode` The mode of the Checkout Session.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `payment_intent` The ID of the PaymentIntent for Checkout Sessions in `payment` mode.\n * `payment_link` The ID of the Payment Link that created this Session.\n * `payment_method_collection` Configure whether a Checkout Session should collect a payment method.\n * `payment_method_configuration_details` Information about the payment method configuration used for this Checkout session if using dynamic payment methods.\n * `payment_method_options` Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.\n * `payment_method_types` A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.\n * `payment_status` The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.\n * `phone_number_collection` \n * `recovered_from` The ID of the original expired Checkout Session that triggered the recovery flow.\n * `redirect_on_completion` Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.\n * `return_url` Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.\n * `setup_intent` The ID of the SetupIntent for Checkout Sessions in `setup` mode.\n * `shipping_address_collection` When set, provides configuration for Checkout to collect a shipping address from a customer.\n * `shipping_cost` The details of the customer cost of shipping, including the customer chosen ShippingRate.\n * `shipping_details` Shipping information for this Checkout Session.\n * `shipping_options` The shipping rate options applied to this Session.\n * `status` The status of the Checkout Session, one of `open`, `complete`, or `expired`.\n * `submit_type` Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.\n * `subscription` The ID of the subscription for Checkout Sessions in `subscription` mode.\n * `success_url` The URL the customer will be directed to after the payment or\nsubscription creation is successful.\n * `tax_id_collection` \n * `total_details` Tax and discount details for the computed total amount.\n * `ui_mode` The UI mode of the Session. Can be `hosted` (default) or `embedded`.\n * `url` The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.\n"
@typedoc "The `checkout.session` type.\n\n * `after_expiration` When set, provides configuration for actions to take if this Checkout Session expires.\n * `allow_promotion_codes` Enables user redeemable promotion codes.\n * `amount_subtotal` Total of all items before discounts or taxes are applied.\n * `amount_total` Total of all items after discounts and taxes are applied.\n * `automatic_tax` \n * `billing_address_collection` Describes whether Checkout should collect the customer's billing address.\n * `cancel_url` If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.\n * `client_reference_id` A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.\n * `client_secret` Client secret to be used when initializing Stripe.js embedded checkout.\n * `consent` Results of `consent_collection` for this session.\n * `consent_collection` When set, provides configuration for the Checkout Session to gather active consent from customers.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` 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).\n * `currency_conversion` Currency conversion details for automatic currency conversion sessions\n * `custom_fields` Collect additional information from your customer using custom fields. Up to 2 fields are supported.\n * `custom_text` \n * `customer` The ID of the customer for this Session.\nFor Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.\n * `customer_creation` Configure whether a Checkout Session creates a Customer when the Checkout Session completes.\n * `customer_details` The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.\n * `customer_email` If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.\n * `expires_at` The timestamp at which the Checkout Session will expire.\n * `id` Unique identifier for the object.\n * `invoice` ID of the invoice created by the Checkout Session, if it exists.\n * `invoice_creation` Details on the state of invoice creation for the Checkout Session.\n * `line_items` The line items purchased by the customer.\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `locale` The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.\n * `metadata` Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n * `mode` The mode of the Checkout Session.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `payment_intent` The ID of the PaymentIntent for Checkout Sessions in `payment` mode.\n * `payment_link` The ID of the Payment Link that created this Session.\n * `payment_method_collection` Configure whether a Checkout Session should collect a payment method.\n * `payment_method_configuration_details` Information about the payment method configuration used for this Checkout session if using dynamic payment methods.\n * `payment_method_options` Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.\n * `payment_method_types` A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.\n * `payment_status` The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.\n * `phone_number_collection` \n * `recovered_from` The ID of the original expired Checkout Session that triggered the recovery flow.\n * `redirect_on_completion` Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.\n * `return_url` Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.\n * `setup_intent` The ID of the SetupIntent for Checkout Sessions in `setup` mode.\n * `shipping_address_collection` When set, provides configuration for Checkout to collect a shipping address from a customer.\n * `shipping_cost` The details of the customer cost of shipping, including the customer chosen ShippingRate.\n * `shipping_details` Shipping information for this Checkout Session.\n * `shipping_options` The shipping rate options applied to this Session.\n * `status` The status of the Checkout Session, one of `open`, `complete`, or `expired`.\n * `submit_type` Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode. Possible values are `auto`, `pay`, `book`, `donate`. If blank or `auto`, `pay` is used.\n * `subscription` The ID of the subscription for Checkout Sessions in `subscription` mode.\n * `success_url` The URL the customer will be directed to after the payment or\nsubscription creation is successful.\n * `tax_id_collection` \n * `total_details` Tax and discount details for the computed total amount.\n * `ui_mode` The UI mode of the Session. Can be `hosted` (default) or `embedded`.\n * `url` The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.\n"
@type t :: %__MODULE__{
after_expiration: term | nil,
allow_promotion_codes: boolean | nil,
Expand Down Expand Up @@ -254,15 +254,7 @@ defmodule Stripe.Checkout.Session do

(
@typedoc nil
@type custom_fields :: %{
optional(:dropdown) => dropdown,
optional(:key) => binary,
optional(:label) => label,
optional(:numeric) => numeric,
optional(:optional) => boolean,
optional(:text) => text,
optional(:type) => :dropdown | :numeric | :text
}
@type custom_fields :: %{optional(:name) => binary, optional(:value) => binary}
)

(
Expand Down Expand Up @@ -978,8 +970,11 @@ defmodule Stripe.Checkout.Session do
)

(
@typedoc "The parameters used to automatically create a Transfer when the payment succeeds.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)."
@type transfer_data :: %{optional(:amount) => integer, optional(:destination) => binary}
@typedoc "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges."
@type transfer_data :: %{
optional(:amount_percent) => number,
optional(:destination) => binary
}
)

(
Expand Down
Loading

0 comments on commit fb69cd1

Please sign in to comment.