Skip to content

Commit

Permalink
Update services based on v726 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Dec 20, 2023
1 parent 7485693 commit a9a03ff
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 117 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v721
v726
19 changes: 11 additions & 8 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
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 "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}
)

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

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

(
Expand All @@ -607,8 +607,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
7 changes: 5 additions & 2 deletions lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,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
2 changes: 1 addition & 1 deletion lib/generated/file.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Stripe.File do
use Stripe.Entity

@moduledoc "This object represents files hosted on Stripe's servers. You can upload\nfiles with the [create file](https://stripe.com/docs/api#create_file) request\n(for example, when uploading dispute evidence). Stripe also\ncreates files independetly (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File upload guide](https://stripe.com/docs/file-upload)"
@moduledoc "This object represents files hosted on Stripe's servers. You can upload\nfiles with the [create file](https://stripe.com/docs/api#create_file) request\n(for example, when uploading dispute evidence). Stripe also\ncreates files independently (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File upload guide](https://stripe.com/docs/file-upload)"
(
defstruct [
:created,
Expand Down
115 changes: 36 additions & 79 deletions lib/generated/payment_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ defmodule Stripe.PaymentIntent do
)

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

(
Expand Down Expand Up @@ -342,8 +342,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 @@ -357,25 +382,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 All @@ -384,56 +392,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type klarna :: %{
optional(:capture_method) => :manual,
optional(:preferred_locale) =>
:"cs-CZ"
| :"da-DK"
| :"de-AT"
| :"de-CH"
| :"de-DE"
| :"el-GR"
| :"en-AT"
| :"en-AU"
| :"en-BE"
| :"en-CA"
| :"en-CH"
| :"en-CZ"
| :"en-DE"
| :"en-DK"
| :"en-ES"
| :"en-FI"
| :"en-FR"
| :"en-GB"
| :"en-GR"
| :"en-IE"
| :"en-IT"
| :"en-NL"
| :"en-NO"
| :"en-NZ"
| :"en-PL"
| :"en-PT"
| :"en-SE"
| :"en-US"
| :"es-ES"
| :"es-US"
| :"fi-FI"
| :"fr-BE"
| :"fr-CA"
| :"fr-CH"
| :"fr-FR"
| :"it-CH"
| :"it-IT"
| :"nb-NO"
| :"nl-BE"
| :"nl-NL"
| :"pl-PL"
| :"pt-PT"
| :"sv-FI"
| :"sv-SE",
optional(:setup_future_usage) => :none
}
@typedoc "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method."
@type klarna :: %{optional(:dob) => dob}
)

(
Expand Down Expand Up @@ -676,7 +636,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 All @@ -686,11 +646,8 @@ defmodule Stripe.PaymentIntent do
)

(
@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 Down
4 changes: 2 additions & 2 deletions lib/generated/quote.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule Stripe.Quote do
:application_fee_percent
]

@typedoc "The `quote` type.\n\n * `amount_subtotal` Total before any discounts or taxes are applied.\n * `amount_total` Total after discounts and taxes are applied.\n * `application` ID of the Connect Application that created the quote.\n * `application_fee_amount` The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.\n * `application_fee_percent` A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.\n * `automatic_tax` \n * `collection_method` Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.\n * `computed` \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 * `customer` The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.\n * `default_tax_rates` The tax rates applied to this quote.\n * `description` A description that will be displayed on the quote PDF.\n * `discounts` The discounts applied to this quote.\n * `expires_at` The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.\n * `footer` A footer that will be displayed on the quote PDF.\n * `from_quote` Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.\n * `header` A header that will be displayed on the quote PDF.\n * `id` Unique identifier for the object.\n * `invoice` The invoice that was created from this quote.\n * `invoice_settings` All invoices will be billed using the specified settings.\n * `line_items` A list of items the customer is being quoted for.\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 * `number` A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.\n * `status` The status of the quote.\n * `status_transitions` \n * `subscription` The subscription that was created or updated from this quote.\n * `subscription_data` \n * `subscription_schedule` The subscription schedule that was created or updated from this quote.\n * `test_clock` ID of the test clock this quote belongs to.\n * `total_details` \n * `transfer_data` The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.\n"
@typedoc "The `quote` type.\n\n * `amount_subtotal` Total before any discounts or taxes are applied.\n * `amount_total` Total after discounts and taxes are applied.\n * `application` ID of the Connect Application that created the quote.\n * `application_fee_amount` The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.\n * `application_fee_percent` A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.\n * `automatic_tax` \n * `collection_method` Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.\n * `computed` \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 * `customer` The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.\n * `default_tax_rates` The tax rates applied to this quote.\n * `description` A description that will be displayed on the quote PDF.\n * `discounts` The discounts applied to this quote.\n * `expires_at` The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.\n * `footer` A footer that will be displayed on the quote PDF.\n * `from_quote` Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.\n * `header` A header that will be displayed on the quote PDF.\n * `id` Unique identifier for the object.\n * `invoice` The invoice that was created from this quote.\n * `invoice_settings` \n * `line_items` A list of items the customer is being quoted for.\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 * `number` A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.\n * `status` The status of the quote.\n * `status_transitions` \n * `subscription` The subscription that was created or updated from this quote.\n * `subscription_data` \n * `subscription_schedule` The subscription schedule that was created or updated from this quote.\n * `test_clock` ID of the test clock this quote belongs to.\n * `total_details` \n * `transfer_data` The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.\n"
@type t :: %__MODULE__{
amount_subtotal: integer,
amount_total: integer,
Expand All @@ -63,7 +63,7 @@ defmodule Stripe.Quote do
header: binary | nil,
id: binary,
invoice: (binary | Stripe.Invoice.t() | Stripe.DeletedInvoice.t()) | nil,
invoice_settings: term | nil,
invoice_settings: term,
line_items: term,
livemode: boolean,
metadata: term,
Expand Down
25 changes: 15 additions & 10 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 an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method."
@typedoc "If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options."
@type acss_debit :: %{
optional(:account_number) => binary,
optional(:institution_number) => binary,
optional(:transit_number) => binary
optional(:currency) => :cad | :usd,
optional(:mandate_options) => mandate_options,
optional(:verification_method) => :automatic | :instant | :microdeposits
}
)

Expand Down Expand Up @@ -288,13 +288,18 @@ defmodule Stripe.SetupIntent 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(:default_for) => list(:invoice | :subscription),
optional(:interval_description) => binary,
optional(:payment_schedule) => :combined | :interval | :sporadic,
optional(:transaction_type) => :business | :personal
optional(:amount) => integer,
optional(:amount_type) => :fixed | :maximum,
optional(:currency) => binary,
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
16 changes: 10 additions & 6 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 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
Loading

0 comments on commit a9a03ff

Please sign in to comment.