Skip to content

Commit

Permalink
Update services based on v709 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Dec 9, 2023
1 parent 74329c3 commit 097df76
Show file tree
Hide file tree
Showing 9 changed files with 312 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v706
v709
17 changes: 6 additions & 11 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ defmodule Stripe.Account do
)

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

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

(
@typedoc "Settings specific to card charging on the account."
@type card_payments :: %{
optional(:decline_on) => decline_on,
optional(:statement_descriptor_prefix) => binary,
optional(:statement_descriptor_prefix_kana) => binary | binary,
optional(:statement_descriptor_prefix_kanji) => binary | binary
}
@typedoc "The card_payments capability."
@type card_payments :: %{optional(:requested) => boolean}
)

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

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

Expand Down Expand Up @@ -583,7 +578,7 @@ 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 Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance)."
@type tos_acceptance :: %{
optional(:date) => integer,
optional(:ip) => binary,
Expand Down
29 changes: 18 additions & 11 deletions lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ defmodule Stripe.Checkout.Session do
@type after_expiration :: %{optional(:recovery) => recovery}
)

(
@typedoc nil
@type after_submit :: %{optional(:message) => binary}
)

(
@typedoc "contains details about the Afterpay Clearpay payment method options."
@type afterpay_clearpay :: %{optional(:setup_future_usage) => :none}
Expand Down Expand Up @@ -231,6 +236,7 @@ defmodule Stripe.Checkout.Session do
(
@typedoc "Configure fields for the Checkout Session to gather active consent from customers."
@type consent_collection :: %{
optional(:payment_method_reuse_agreement) => payment_method_reuse_agreement,
optional(:promotions) => :auto | :none,
optional(:terms_of_service) => :none | :required
}
Expand All @@ -248,20 +254,13 @@ 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}
)

(
@typedoc "Display additional text for your customers using custom text."
@type custom_text :: %{
optional(:after_submit) => after_submit | binary,
optional(:shipping_address) => shipping_address | binary,
optional(:submit) => submit | binary,
optional(:terms_of_service_acceptance) => terms_of_service_acceptance | binary
Expand Down Expand Up @@ -527,6 +526,11 @@ defmodule Stripe.Checkout.Session do
}
)

(
@typedoc "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 payment_method_reuse_agreement :: %{optional(:position) => :auto | :hidden}
)

(
@typedoc "contains details about the PayNow payment method options."
@type paynow :: %{optional(:setup_future_usage) => :none}
Expand Down Expand Up @@ -966,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
96 changes: 54 additions & 42 deletions lib/generated/payment_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@typedoc "Shipping address."
@type address :: %{
optional(:city) => binary,
optional(:country) => 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 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 @@ -295,38 +295,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method."
@type eps :: %{
optional(:bank) =>
:arzte_und_apotheker_bank
| :austrian_anadi_bank_ag
| :bank_austria
| :bankhaus_carl_spangler
| :bankhaus_schelhammer_und_schattera_ag
| :bawag_psk_ag
| :bks_bank_ag
| :brull_kallmus_bank_ag
| :btv_vier_lander_bank
| :capital_bank_grawe_gruppe_ag
| :deutsche_bank_ag
| :dolomitenbank
| :easybank_ag
| :erste_bank_und_sparkassen
| :hypo_alpeadriabank_international_ag
| :hypo_bank_burgenland_aktiengesellschaft
| :hypo_noe_lb_fur_niederosterreich_u_wien
| :hypo_oberosterreich_salzburg_steiermark
| :hypo_tirol_bank_ag
| :hypo_vorarlberg_bank_ag
| :marchfelder_bank
| :oberbank_ag
| :raiffeisen_bankengruppe_osterreich
| :schoellerbank_ag
| :sparda_bank_wien
| :volksbank_gruppe
| :volkskreditbank_ag
| :vr_bank_braunau
}
@typedoc nil
@type eps :: %{optional(:setup_future_usage) => :none}
)

(
Expand All @@ -345,8 +315,33 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type fpx :: %{optional(:setup_future_usage) => :none}
@typedoc "If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method."
@type fpx :: %{
optional(:account_holder_type) => :company | :individual,
optional(:bank) =>
:affin_bank
| :agrobank
| :alliance_bank
| :ambank
| :bank_islam
| :bank_muamalat
| :bank_of_china
| :bank_rakyat
| :bsn
| :cimb
| :deutsche_bank
| :hong_leong_bank
| :hsbc
| :kfh
| :maybank2e
| :maybank2u
| :ocbc
| :pb_enterprise
| :public_bank
| :rhb
| :standard_chartered
| :uob
}
)

(
Expand All @@ -360,8 +355,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 @@ -662,7 +674,7 @@ 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}
)

Expand Down
22 changes: 13 additions & 9 deletions lib/generated/payment_link.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ defmodule Stripe.PaymentLink do
}
)

(
@typedoc nil
@type after_submit :: %{optional(:message) => binary}
)

(
@typedoc "Configuration for automatic tax collection."
@type automatic_tax :: %{optional(:enabled) => boolean}
Expand All @@ -108,27 +113,21 @@ defmodule Stripe.PaymentLink do
(
@typedoc "Configure fields to gather active consent from customers."
@type consent_collection :: %{
optional(:payment_method_reuse_agreement) => payment_method_reuse_agreement,
optional(:promotions) => :auto | :none,
optional(:terms_of_service) => :none | :required
}
)

(
@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}
)

(
@typedoc "Display additional text for your customers using custom text."
@type custom_text :: %{
optional(:after_submit) => after_submit | binary,
optional(:shipping_address) => shipping_address | binary,
optional(:submit) => submit | binary,
optional(:terms_of_service_acceptance) => terms_of_service_acceptance | binary
Expand Down Expand Up @@ -209,6 +208,11 @@ defmodule Stripe.PaymentLink do
}
)

(
@typedoc "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 payment_method_reuse_agreement :: %{optional(:position) => :auto | :hidden}
)

(
@typedoc "Controls phone number collection settings during checkout.\n\nWe recommend that you review your privacy policy and check with your legal contacts."
@type phone_number_collection :: %{optional(:enabled) => boolean}
Expand Down
12 changes: 1 addition & 11 deletions lib/generated/payment_method_configuration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,20 @@ defmodule Stripe.PaymentMethodConfiguration do
:sofort,
:wechat_pay,
:blik,
:netbanking,
:konbini,
:object,
:jcb,
:boleto,
:paypal,
:application,
:us_bank_account,
:pay_by_bank,
:oxxo,
:cashapp,
:promptpay,
:link,
:active,
:multibanco,
:card,
:upi,
:ideal,
:id_bank_transfer,
:giropay,
:alipay,
:is_default,
Expand All @@ -51,7 +46,7 @@ defmodule Stripe.PaymentMethodConfiguration do
:fpx
]

@typedoc "The `payment_method_configuration` type.\n\n * `acss_debit` \n * `active` Whether the configuration can be used for new payments.\n * `affirm` \n * `afterpay_clearpay` \n * `alipay` \n * `apple_pay` \n * `application` For child configs, the Connect application associated with the configuration.\n * `au_becs_debit` \n * `bacs_debit` \n * `bancontact` \n * `blik` \n * `boleto` \n * `card` \n * `cartes_bancaires` \n * `cashapp` \n * `eps` \n * `fpx` \n * `giropay` \n * `google_pay` \n * `grabpay` \n * `id` Unique identifier for the object.\n * `id_bank_transfer` \n * `ideal` \n * `is_default` The default configuration is used whenever a payment method configuration is not specified.\n * `jcb` \n * `klarna` \n * `konbini` \n * `link` \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 * `multibanco` \n * `name` The configuration's name.\n * `netbanking` \n * `object` String representing the object's type. Objects of the same type share the same value.\n * `oxxo` \n * `p24` \n * `parent` For child configs, the configuration's parent configuration.\n * `pay_by_bank` \n * `paynow` \n * `paypal` \n * `promptpay` \n * `sepa_debit` \n * `sofort` \n * `upi` \n * `us_bank_account` \n * `wechat_pay` \n"
@typedoc "The `payment_method_configuration` type.\n\n * `acss_debit` \n * `active` Whether the configuration can be used for new payments.\n * `affirm` \n * `afterpay_clearpay` \n * `alipay` \n * `apple_pay` \n * `application` For child configs, the Connect application associated with the configuration.\n * `au_becs_debit` \n * `bacs_debit` \n * `bancontact` \n * `blik` \n * `boleto` \n * `card` \n * `cartes_bancaires` \n * `cashapp` \n * `eps` \n * `fpx` \n * `giropay` \n * `google_pay` \n * `grabpay` \n * `id` Unique identifier for the object.\n * `ideal` \n * `is_default` The default configuration is used whenever a payment method configuration is not specified.\n * `jcb` \n * `klarna` \n * `konbini` \n * `link` \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 * `name` The configuration's name.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `oxxo` \n * `p24` \n * `parent` For child configs, the configuration's parent configuration.\n * `paynow` \n * `paypal` \n * `promptpay` \n * `sepa_debit` \n * `sofort` \n * `us_bank_account` \n * `wechat_pay` \n"
@type t :: %__MODULE__{
acss_debit: term,
active: boolean,
Expand All @@ -74,28 +69,23 @@ defmodule Stripe.PaymentMethodConfiguration do
google_pay: term,
grabpay: term,
id: binary,
id_bank_transfer: term,
ideal: term,
is_default: boolean,
jcb: term,
klarna: term,
konbini: term,
link: term,
livemode: boolean,
multibanco: term,
name: binary,
netbanking: term,
object: binary,
oxxo: term,
p24: term,
parent: binary | nil,
pay_by_bank: term,
paynow: term,
paypal: term,
promptpay: term,
sepa_debit: term,
sofort: term,
upi: term,
us_bank_account: term,
wechat_pay: term
}
Expand Down
Loading

0 comments on commit 097df76

Please sign in to comment.