Skip to content

Commit

Permalink
Update services based on v581 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Oct 4, 2023
1 parent 094fd0e commit 5682174
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 211 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v580
v581
22 changes: 9 additions & 13 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 Down Expand Up @@ -216,18 +216,13 @@ defmodule Stripe.Account do
)

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

(
@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 @@ -337,7 +332,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 @@ -575,11 +570,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 Down
17 changes: 14 additions & 3 deletions lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,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 Expand Up @@ -934,8 +942,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
4 changes: 1 addition & 3 deletions lib/generated/line_item.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defmodule Stripe.LineItem do
:id,
:invoice_item,
:livemode,
:margins,
:metadata,
:object,
:period,
Expand All @@ -30,7 +29,7 @@ defmodule Stripe.LineItem do
:unit_amount_excluding_tax
]

@typedoc "The `line_item` type.\n\n * `amount` The amount, in cents (or local equivalent).\n * `amount_excluding_tax` The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.\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 * `description` An arbitrary string attached to the object. Often useful for displaying to users.\n * `discount_amounts` The amount of discount calculated per discount for this line item.\n * `discountable` If true, discounts will apply to this line item. Always false for prorations.\n * `discounts` The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.\n * `id` Unique identifier for the object.\n * `invoice_item` The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.\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 * `margins` The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin.\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. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `period` \n * `plan` The plan of the subscription, if the line item is a subscription or a proration.\n * `price` The price of the line item.\n * `proration` Whether this is a proration.\n * `proration_details` Additional details for proration line items\n * `quantity` The quantity of the subscription, if the line item is a subscription or a proration.\n * `subscription` The subscription that the invoice item pertains to, if any.\n * `subscription_item` The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.\n * `tax_amounts` The amount of tax calculated per tax rate for this line item\n * `tax_rates` The tax rates which apply to the line item.\n * `type` A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.\n * `unit_amount_excluding_tax` The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.\n"
@typedoc "The `line_item` type.\n\n * `amount` The amount, in cents (or local equivalent).\n * `amount_excluding_tax` The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.\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 * `description` An arbitrary string attached to the object. Often useful for displaying to users.\n * `discount_amounts` The amount of discount calculated per discount for this line item.\n * `discountable` If true, discounts will apply to this line item. Always false for prorations.\n * `discounts` The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.\n * `id` Unique identifier for the object.\n * `invoice_item` The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.\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. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `period` \n * `plan` The plan of the subscription, if the line item is a subscription or a proration.\n * `price` The price of the line item.\n * `proration` Whether this is a proration.\n * `proration_details` Additional details for proration line items\n * `quantity` The quantity of the subscription, if the line item is a subscription or a proration.\n * `subscription` The subscription that the invoice item pertains to, if any.\n * `subscription_item` The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.\n * `tax_amounts` The amount of tax calculated per tax rate for this line item\n * `tax_rates` The tax rates which apply to the line item.\n * `type` A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.\n * `unit_amount_excluding_tax` The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.\n"
@type t :: %__MODULE__{
amount: integer,
amount_excluding_tax: integer | nil,
Expand All @@ -42,7 +41,6 @@ defmodule Stripe.LineItem do
id: binary,
invoice_item: binary | Stripe.Invoiceitem.t(),
livemode: boolean,
margins: term | nil,
metadata: term,
object: binary,
period: term,
Expand Down
123 changes: 31 additions & 92 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 "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 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 @@ -283,38 +283,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 @@ -333,33 +303,8 @@ defmodule Stripe.PaymentIntent do
)

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

(
Expand All @@ -373,25 +318,8 @@ defmodule Stripe.PaymentIntent do
)

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

(
Expand Down Expand Up @@ -430,12 +358,17 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "Additional fields for Mandate creation"
@typedoc "Configuration options for setting up an eMandate for cards issued in India."
@type mandate_options :: %{
optional(:custom_mandate_url) => binary | binary,
optional(:interval_description) => binary,
optional(:payment_schedule) => :combined | :interval | :sporadic,
optional(:transaction_type) => :business | :personal
optional(:amount) => integer,
optional(:amount_type) => :fixed | :maximum,
optional(:description) => binary,
optional(:end_date) => integer,
optional(:interval) => :day | :month | :sporadic | :week | :year,
optional(:interval_count) => integer,
optional(:reference) => binary,
optional(:start_date) => integer,
optional(:supported_types) => list(:india)
}
)

Expand Down Expand Up @@ -641,8 +574,11 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account."
@type sepa_debit :: %{optional(:iban) => binary}
@typedoc nil
@type sepa_debit :: %{
optional(:mandate_options) => map(),
optional(:setup_future_usage) => :none | :off_session | :on_session
}
)

(
Expand All @@ -657,8 +593,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 Down
4 changes: 3 additions & 1 deletion lib/generated/payment_link.ex
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ defmodule Stripe.PaymentLink do
@type payment_intent_data :: %{
optional(:capture_method) => :automatic | :automatic_async | :manual,
optional(:metadata) => %{optional(binary) => binary},
optional(:setup_future_usage) => :off_session | :on_session
optional(:setup_future_usage) => :off_session | :on_session,
optional(:statement_descriptor) => binary,
optional(:statement_descriptor_suffix) => binary
}
)

Expand Down
Loading

0 comments on commit 5682174

Please sign in to comment.