Skip to content

Commit

Permalink
Update services based on v628 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Oct 28, 2023
1 parent 03c3cbe commit 0a9a17c
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v627
v628
20 changes: 12 additions & 8 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,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 @@ -576,11 +576,12 @@ defmodule Stripe.Account do
)

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

Expand All @@ -590,8 +591,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 @@ -600,8 +601,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: 9 additions & 1 deletion lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,15 @@ defmodule Stripe.Checkout.Session do

(
@typedoc nil
@type custom_fields :: %{optional(:name) => binary, optional(:value) => binary}
@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
}
)

(
Expand Down
98 changes: 71 additions & 27 deletions lib/generated/payment_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ 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
}
)

Expand Down Expand Up @@ -136,8 +136,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type au_becs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session}
@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}
)

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

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

(
Expand Down Expand Up @@ -372,8 +375,25 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type ideal :: %{optional(:setup_future_usage) => :none | :off_session}
@typedoc "If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method."
@type ideal :: %{
optional(:bank) =>
:abn_amro
| :asn_bank
| :bunq
| :handelsbanken
| :ing
| :knab
| :moneyou
| :n26
| :rabobank
| :regiobank
| :revolut
| :sns_bank
| :triodos_bank
| :van_lanschot
| :yoursafe
}
)

(
Expand Down Expand Up @@ -493,10 +513,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 @@ -671,16 +715,13 @@ defmodule Stripe.PaymentIntent do
)

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

(
@typedoc nil
@type sepa_debit :: %{
optional(:mandate_options) => map(),
optional(:setup_future_usage) => :none | :off_session | :on_session
}
@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 All @@ -695,8 +736,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 @@ -705,13 +749,13 @@ 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(: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
12 changes: 6 additions & 6 deletions lib/generated/setup_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ defmodule Stripe.SetupIntent do
)

(
@typedoc "If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options."
@typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method."
@type acss_debit :: %{
optional(:currency) => :cad | :usd,
optional(:mandate_options) => mandate_options,
optional(:verification_method) => :automatic | :instant | :microdeposits
optional(:account_number) => binary,
optional(:institution_number) => binary,
optional(:transit_number) => binary
}
)

Expand Down Expand Up @@ -424,8 +424,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
22 changes: 13 additions & 9 deletions lib/generated/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ defmodule Stripe.Token do
)

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

Expand All @@ -39,7 +40,7 @@ defmodule Stripe.Token do
)

(
@typedoc "The person's address."
@typedoc "The company's primary address."
@type address :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand All @@ -51,7 +52,7 @@ defmodule Stripe.Token do
)

(
@typedoc "The Kana variation of the the individual'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 All @@ -64,7 +65,7 @@ defmodule Stripe.Token do
)

(
@typedoc "The Kanji variation of the person's address (Japan only)."
@typedoc "The Kanji variation of the the individual's primary address (Japan only)."
@type address_kanji :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand Down Expand Up @@ -293,8 +294,11 @@ defmodule Stripe.Token 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
31 changes: 30 additions & 1 deletion priv/openapi/spec3.sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,7 +2725,7 @@
"instant_available": {
"description": "Funds that you can pay out using Instant Payouts.",
"items": {
"$ref": "#/components/schemas/balance_amount"
"$ref": "#/components/schemas/balance_amount_net"
},
"type": "array"
},
Expand Down Expand Up @@ -2850,6 +2850,35 @@
"in_package": ""
}
},
"balance_amount_net": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"type": "integer"
},
"currency": {
"description": "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).",
"type": "string"
},
"source_types": {
"$ref": "#/components/schemas/balance_amount_by_source_type"
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmountNet",
"type": "object",
"x-expandableFields": [
"source_types"
],
"x-stripeResource": {
"class_name": "Money",
"in_package": ""
}
},
"balance_detail": {
"description": "",
"properties": {
Expand Down

0 comments on commit 0a9a17c

Please sign in to comment.