Skip to content

Commit

Permalink
Update services based on v746 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Jan 6, 2024
1 parent bbdd5fa commit b5e5b22
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v742
v746
17 changes: 10 additions & 7 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 company's primary address (Japan only)."
@typedoc "The Kana variation of the the individual'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 @@ -592,8 +592,8 @@ defmodule Stripe.Account do
)

(
@typedoc "The treasury capability."
@type treasury :: %{optional(:requested) => boolean}
@typedoc "Settings specific to the account's Treasury FinancialAccounts."
@type treasury :: %{optional(:tos_acceptance) => tos_acceptance}
)

(
Expand All @@ -602,8 +602,11 @@ defmodule Stripe.Account do
)

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

(
Expand Down
10 changes: 1 addition & 9 deletions lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
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
77 changes: 51 additions & 26 deletions lib/generated/payment_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method."
@type acss_debit :: %{
optional(:mandate_options) => mandate_options,
optional(:setup_future_usage) => :none | :off_session | :on_session,
optional(:verification_method) => :automatic | :instant | :microdeposits
optional(:account_number) => binary,
optional(:institution_number) => binary,
optional(:transit_number) => binary
}
)

(
@typedoc "Shipping address."
@typedoc nil
@type address :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand Down Expand Up @@ -136,8 +136,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account."
@type au_becs_debit :: %{optional(:account_number) => binary, optional(:bsb_number) => binary}
@typedoc nil
@type au_becs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session}
)

(
Expand All @@ -149,8 +149,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type bacs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session}
@typedoc "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account."
@type bacs_debit :: %{optional(:account_number) => binary, optional(:sort_code) => binary}
)

(
Expand Down Expand Up @@ -192,11 +192,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type boleto :: %{
optional(:expires_after_days) => integer,
optional(:setup_future_usage) => :none | :off_session | :on_session
}
@typedoc "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method."
@type boleto :: %{optional(:tax_id) => binary}
)

(
Expand Down Expand Up @@ -403,10 +400,34 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@typedoc "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method."
@type p24 :: %{
optional(:setup_future_usage) => :none,
optional(:tos_shown_and_accepted) => boolean
optional(:bank) =>
:alior_bank
| :bank_millennium
| :bank_nowy_bfg_sa
| :bank_pekao_sa
| :banki_spbdzielcze
| :blik
| :bnp_paribas
| :boz
| :citi_handlowy
| :credit_agricole
| :envelobank
| :etransfer_pocztowy24
| :getin_bank
| :ideabank
| :ing
| :inteligo
| :mbank_mtransfer
| :nest_przelew
| :noble_pay
| :pbac_z_ipko
| :plus_bank
| :santander_przelew24
| :tmobile_usbugi_bankowe
| :toyota_bank
| :volkswagen_bank
}
)

Expand Down Expand Up @@ -584,7 +605,7 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session)."
@typedoc "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information."
@type radar_options :: %{optional(:session) => binary}
)

Expand Down Expand Up @@ -613,8 +634,11 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method."
@type sofort :: %{optional(:country) => :AT | :BE | :DE | :ES | :IT | :NL}
@typedoc nil
@type sofort :: %{
optional(:preferred_language) => :de | :en | :es | :fr | :it | :nl | :pl,
optional(:setup_future_usage) => :none | :off_session
}
)

(
Expand All @@ -637,13 +661,14 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method."
@typedoc nil
@type us_bank_account :: %{
optional(:account_holder_type) => :company | :individual,
optional(:account_number) => binary,
optional(:account_type) => :checking | :savings,
optional(:financial_connections_account) => binary,
optional(:routing_number) => binary
optional(:financial_connections) => financial_connections,
optional(:mandate_options) => mandate_options,
optional(:networks) => networks,
optional(:preferred_settlement_speed) => :fastest | :standard,
optional(:setup_future_usage) => :none | :off_session | :on_session,
optional(:verification_method) => :automatic | :instant | :microdeposits
}
)

Expand Down
10 changes: 1 addition & 9 deletions lib/generated/payment_link.ex
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,7 @@ defmodule Stripe.PaymentLink 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
12 changes: 3 additions & 9 deletions lib/generated/setup_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,7 @@ defmodule Stripe.SetupIntent do

(
@typedoc "Additional fields for Mandate creation"
@type mandate_options :: %{
optional(:custom_mandate_url) => binary | binary,
optional(:default_for) => list(:invoice | :subscription),
optional(:interval_description) => binary,
optional(:payment_schedule) => :combined | :interval | :sporadic,
optional(:transaction_type) => :business | :personal
}
@type mandate_options :: %{optional(:collection_method) => :paper}
)

(
Expand Down Expand Up @@ -441,8 +435,8 @@ defmodule Stripe.SetupIntent do
)

(
@typedoc "If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options."
@type sepa_debit :: %{optional(:mandate_options) => map()}
@typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account."
@type sepa_debit :: %{optional(:iban) => binary}
)

(
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/subscription_schedule.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Stripe.SubscriptionSchedule do
:test_clock
]

@typedoc "The `subscription_schedule` type.\n\n * `application` ID of the Connect Application that created the schedule.\n * `canceled_at` Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.\n * `completed_at` Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `current_phase` Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.\n * `customer` ID of the customer who owns the subscription schedule.\n * `default_settings` \n * `end_behavior` Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.\n * `id` Unique identifier for the object.\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 * `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 * `object` String representing the object's type. Objects of the same type share the same value.\n * `phases` Configuration for the subscription schedule's phases.\n * `released_at` Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.\n * `released_subscription` ID of the subscription once managed by the subscription schedule (if it is released).\n * `status` The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).\n * `subscription` ID of the subscription managed by the subscription schedule.\n * `test_clock` ID of the test clock this subscription schedule belongs to.\n"
@typedoc "The `subscription_schedule` type.\n\n * `application` ID of the Connect Application that created the schedule.\n * `canceled_at` Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.\n * `completed_at` Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `current_phase` Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.\n * `customer` ID of the customer who owns the subscription schedule.\n * `default_settings` \n * `end_behavior` Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.\n * `id` Unique identifier for the object.\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 * `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 * `object` String representing the object's type. Objects of the same type share the same value.\n * `phases` Configuration for the subscription schedule's phases.\n * `released_at` Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.\n * `released_subscription` ID of the subscription once managed by the subscription schedule (if it is released).\n * `status` The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).\n * `subscription` ID of the subscription managed by the subscription schedule.\n * `test_clock` ID of the test clock this subscription schedule belongs to.\n"
@type t :: %__MODULE__{
application: (binary | term | term) | nil,
canceled_at: integer | nil,
Expand Down
18 changes: 10 additions & 8 deletions lib/generated/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ defmodule Stripe.Token do
)

(
@typedoc "Information for the account this token represents."
@typedoc "Details on the legal guardian's acceptance of the main Stripe service agreement."
@type account :: %{
optional(:business_type) => :company | :government_entity | :individual | :non_profit,
optional(:company) => company,
optional(:individual) => individual,
optional(:tos_shown_and_accepted) => boolean
optional(:date) => integer,
optional(:ip) => binary,
optional(:user_agent) => binary | binary
}
)

Expand All @@ -52,7 +51,7 @@ defmodule Stripe.Token do
)

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

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

(
Expand Down
7 changes: 4 additions & 3 deletions priv/openapi/spec3.sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -46981,7 +46981,7 @@
"$ref": "#/components/schemas/subscription_schedules_resource_default_settings"
},
"end_behavior": {
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.",
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.",
"enum": [
"cancel",
"none",
Expand Down Expand Up @@ -69455,6 +69455,7 @@
},
"return_url": {
"description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the\npayment method's app or site. This parameter is required if ui_mode is `embedded`\nand redirect-based payment methods are enabled on the session.",
"maxLength": 5000,
"type": "string"
},
"setup_intent_data": {
Expand Down Expand Up @@ -128225,7 +128226,7 @@
"type": "object"
},
"end_behavior": {
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.",
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.",
"enum": [
"cancel",
"none",
Expand Down Expand Up @@ -128957,7 +128958,7 @@
"type": "object"
},
"end_behavior": {
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.",
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.",
"enum": [
"cancel",
"none",
Expand Down

0 comments on commit b5e5b22

Please sign in to comment.