Skip to content

Commit

Permalink
Update services based on v455 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Aug 10, 2023
1 parent a766a1a commit 1bf1334
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v453
v455
41 changes: 24 additions & 17 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 company's primary address."
@typedoc "The individual's primary address."
@type address :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand All @@ -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 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 @@ -216,13 +216,18 @@ 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 "The card_payments capability."
@type card_payments :: %{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
}
)

(
Expand Down Expand Up @@ -330,7 +335,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 @@ -568,12 +573,11 @@ defmodule Stripe.Account do
)

(
@typedoc "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance)."
@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,
optional(:service_agreement) => binary,
optional(:user_agent) => binary
optional(:user_agent) => binary | binary
}
)

Expand All @@ -583,8 +587,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 @@ -593,8 +597,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 Expand Up @@ -624,7 +631,7 @@ defmodule Stripe.Account do
(
nil

@doc "<p>Updates a <a href=\"/docs/connect/accounts\">connected account</a> by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.</p>\n\n<p>For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an <a href=\"/docs/api/account_links\">Account Link</a>\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as <strong>Custom Only</strong> or <strong>Custom and Express</strong>\nbelow.</p>\n\n<p>To update your own account, use the <a href=\"https://dashboard.stripe.com/account\">Dashboard</a>. Refer to our\n<a href=\"/docs/connect/updating-accounts\">Connect</a> documentation to learn more about updating accounts.</p>\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}`\n"
@doc "<p>Updates a <a href=\"/docs/connect/accounts\">connected account</a> by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.</p>\n\n<p>For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an <a href=\"/docs/api/account_links\">Account Link</a>\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as <strong>Custom Only</strong> or <strong>Custom and Express</strong>\nbelow.</p>\n\n<p>To update your own account, use the <a href=\"https://dashboard.stripe.com/settings/account\">Dashboard</a>. Refer to our\n<a href=\"/docs/connect/updating-accounts\">Connect</a> documentation to learn more about updating accounts.</p>\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}`\n"
(
@spec update(
account :: binary(),
Expand Down Expand Up @@ -750,7 +757,7 @@ defmodule Stripe.Account do
(
nil

@doc "<p>With <a href=\"/docs/connect\">Connect</a>, you can delete accounts you manage.</p>\n\n<p>Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.</p>\n\n<p>If you want to delete your own account, use the <a href=\"https://dashboard.stripe.com/account\">account information tab in your account settings</a> instead.</p>\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}`\n"
@doc "<p>With <a href=\"/docs/connect\">Connect</a>, you can delete accounts you manage.</p>\n\n<p>Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.</p>\n\n<p>If you want to delete your own account, use the <a href=\"https://dashboard.stripe.com/settings/account\">account information tab in your account settings</a> instead.</p>\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}`\n"
(
@spec delete(account :: binary(), opts :: Keyword.t()) ::
{:ok, Stripe.DeletedAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Expand Down
4 changes: 3 additions & 1 deletion lib/generated/customer_cash_balance_transaction.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule Stripe.CustomerCashBalanceTransaction do
@moduledoc "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer."
(
defstruct [
:adjusted_for_overdraft,
:applied_to_payment,
:created,
:currency,
Expand All @@ -19,8 +20,9 @@ defmodule Stripe.CustomerCashBalanceTransaction do
:unapplied_from_payment
]

@typedoc "The `customer_cash_balance_transaction` type.\n\n * `applied_to_payment` \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 whose available cash balance changed as a result of this transaction.\n * `ending_balance` The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `funded` \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 * `net_amount` The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `refunded_from_payment` \n * `type` The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.\n * `unapplied_from_payment` \n"
@typedoc "The `customer_cash_balance_transaction` type.\n\n * `adjusted_for_overdraft` \n * `applied_to_payment` \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 whose available cash balance changed as a result of this transaction.\n * `ending_balance` The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `funded` \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 * `net_amount` The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `refunded_from_payment` \n * `type` The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.\n * `unapplied_from_payment` \n"
@type t :: %__MODULE__{
adjusted_for_overdraft: term,
applied_to_payment: term,
created: integer,
currency: binary,
Expand Down
95 changes: 14 additions & 81 deletions lib/generated/payment_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,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 @@ -190,11 +190,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 @@ -338,24 +335,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
| :rabobank
| :regiobank
| :revolut
| :sns_bank
| :triodos_bank
| :van_lanschot
| :yoursafe
}
@typedoc nil
@type ideal :: %{optional(:setup_future_usage) => :none | :off_session}
)

(
Expand All @@ -364,56 +345,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 @@ -684,13 +617,13 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method."
@type us_bank_account :: %{
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
optional(:account_holder_type) => :company | :individual,
optional(:account_number) => binary,
optional(:account_type) => :checking | :savings,
optional(:financial_connections_account) => binary,
optional(:routing_number) => binary
}
)

Expand Down
10 changes: 4 additions & 6 deletions lib/generated/setup_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,11 @@ defmodule Stripe.SetupIntent do
)

(
@typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method."
@typedoc "If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options."
@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(:verification_method) => :automatic | :instant | :microdeposits
}
)

Expand Down
Loading

0 comments on commit 1bf1334

Please sign in to comment.