Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v755
v2129
644 changes: 451 additions & 193 deletions lib/generated/account.ex

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion lib/generated/account_link.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ defmodule Stripe.AccountLink do
@type t :: %__MODULE__{created: integer, expires_at: integer, object: binary, url: binary}
)

(
@typedoc "Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow."
@type collection_options :: %{
optional(:fields) => :currently_due | :eventually_due,
optional(:future_requirements) => :include | :omit
}
)

(
nil

Expand All @@ -18,6 +26,7 @@ defmodule Stripe.AccountLink do
params :: %{
optional(:account) => binary,
optional(:collect) => :currently_due | :eventually_due,
optional(:collection_options) => collection_options,
optional(:expand) => list(binary),
optional(:refresh_url) => binary,
optional(:return_url) => binary,
Expand All @@ -36,4 +45,4 @@ defmodule Stripe.AccountLink do
end
)
)
end
end
111 changes: 104 additions & 7 deletions lib/generated/account_session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,141 @@ defmodule Stripe.AccountSession do
)

(
@typedoc "Configuration for the account onboarding embedded component."
@type account_onboarding :: %{optional(:enabled) => boolean, optional(:features) => map()}
@typedoc "Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component."
@type account_management :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component."
@type account_onboarding :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component."
@type balances :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not)."
@type components :: %{
optional(:account_management) => account_management,
optional(:account_onboarding) => account_onboarding,
optional(:balances) => balances,
optional(:disputes_list) => disputes_list,
optional(:documents) => documents,
optional(:financial_account) => financial_account,
optional(:financial_account_transactions) => financial_account_transactions,
optional(:instant_payouts_promotion) => instant_payouts_promotion,
optional(:issuing_card) => issuing_card,
optional(:issuing_cards_list) => issuing_cards_list,
optional(:notification_banner) => notification_banner,
optional(:payment_details) => payment_details,
optional(:payment_disputes) => payment_disputes,
optional(:payments) => payments,
optional(:payouts) => payouts
optional(:payout_details) => payout_details,
optional(:payouts) => payouts,
optional(:payouts_list) => payouts_list,
optional(:tax_registrations) => tax_registrations,
optional(:tax_settings) => tax_settings
}
)

(
@typedoc "Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component."
@type disputes_list :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component."
@type documents :: %{optional(:enabled) => boolean, optional(:features) => map()}
)

(
@typedoc "The list of features enabled in the embedded component."
@type features :: %{
optional(:capture_payments) => boolean,
optional(:destination_on_behalf_of_charge_management) => boolean,
optional(:dispute_management) => boolean,
optional(:refund_management) => boolean
}
)

(
@typedoc "Configuration for the payment details embedded component."
@typedoc "Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component."
@type financial_account :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component."
@type financial_account_transactions :: %{
optional(:enabled) => boolean,
optional(:features) => features
}
)

(
@typedoc "Configuration for the [instant payouts promotion](/connect/supported-embedded-components/instant-payouts-promotion/) embedded component."
@type instant_payouts_promotion :: %{
optional(:enabled) => boolean,
optional(:features) => features
}
)

(
@typedoc "Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component."
@type issuing_card :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component."
@type issuing_cards_list :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component."
@type notification_banner :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component."
@type payment_details :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the payments embedded component."
@typedoc "Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component."
@type payment_disputes :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component."
@type payments :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the payouts embedded component."
@typedoc "Configuration for the [payout details](/connect/supported-embedded-components/payout-details/) embedded component."
@type payout_details :: %{optional(:enabled) => boolean, optional(:features) => map()}
)

(
@typedoc "Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component."
@type payouts :: %{optional(:enabled) => boolean, optional(:features) => features}
)

(
@typedoc "Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component."
@type payouts_list :: %{optional(:enabled) => boolean, optional(:features) => map()}
)

(
@typedoc "Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component."
@type tax_registrations :: %{optional(:enabled) => boolean, optional(:features) => map()}
)

(
@typedoc "Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component."
@type tax_settings :: %{optional(:enabled) => boolean, optional(:features) => map()}
)

(
nil

Expand All @@ -80,4 +177,4 @@ defmodule Stripe.AccountSession do
end
)
)
end
end
10 changes: 8 additions & 2 deletions lib/generated/api_errors.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ defmodule Stripe.ApiErrors do
@moduledoc ""
(
defstruct [
:advice_code,
:charge,
:code,
:decline_code,
:doc_url,
:message,
:network_advice_code,
:network_decline_code,
:param,
:payment_intent,
:payment_method,
Expand All @@ -18,13 +21,16 @@ defmodule Stripe.ApiErrors do
:type
]

@typedoc "The `api_errors` type.\n\n * `charge` For card errors, the ID of the failed charge.\n * `code` For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.\n * `decline_code` For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.\n * `doc_url` A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.\n * `message` A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.\n * `param` If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.\n * `payment_intent` \n * `payment_method` \n * `payment_method_type` If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.\n * `request_log_url` A URL to the request log entry in your dashboard.\n * `setup_intent` \n * `source` \n * `type` The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`\n"
@typedoc "The `api_errors` type.\n\n * `advice_code` For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.\n * `charge` For card errors, the ID of the failed charge.\n * `code` For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.\n * `decline_code` For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.\n * `doc_url` A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.\n * `message` A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.\n * `network_advice_code` For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.\n * `network_decline_code` For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.\n * `param` If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.\n * `payment_intent` \n * `payment_method` \n * `payment_method_type` If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.\n * `request_log_url` A URL to the request log entry in your dashboard.\n * `setup_intent` \n * `source` \n * `type` The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`\n"
@type t :: %__MODULE__{
advice_code: binary,
charge: binary,
code: binary,
decline_code: binary,
doc_url: binary,
message: binary,
network_advice_code: binary,
network_decline_code: binary,
param: binary,
payment_intent: Stripe.PaymentIntent.t(),
payment_method: Stripe.PaymentMethod.t(),
Expand All @@ -35,4 +41,4 @@ defmodule Stripe.ApiErrors do
type: binary
}
)
end
end
116 changes: 60 additions & 56 deletions lib/generated/apple_pay_domain.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,39 @@ defmodule Stripe.ApplePayDomain do
(
nil

@doc "<p>List apple pay domains.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/apple_pay/domains`\n"
@doc "<p>Delete an apple pay domain.</p>\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/apple_pay/domains/{domain}`\n"
(
@spec list(
params :: %{
optional(:domain_name) => binary,
optional(:ending_before) => binary,
optional(:expand) => list(binary),
optional(:limit) => integer,
optional(:starting_after) => binary
},
opts :: Keyword.t()
) ::
{:ok, Stripe.List.t(Stripe.ApplePayDomain.t())}
@spec delete(domain :: binary(), opts :: Keyword.t()) ::
{:ok, Stripe.DeletedApplePayDomain.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def list(params \\ %{}, opts \\ []) do
path = Stripe.OpenApi.Path.replace_path_params("/v1/apple_pay/domains", [], [])
def delete(domain, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/apple_pay/domains/{domain}",
[
%{
__struct__: OpenApiGen.Blueprint.Parameter,
in: "path",
name: "domain",
required: true,
schema: %{
__struct__: OpenApiGen.Blueprint.Parameter.Schema,
any_of: [],
items: [],
name: "domain",
properties: [],
title: nil,
type: "string"
}
}
],
[domain]
)

Stripe.Request.new_request(opts)
|> Stripe.Request.put_endpoint(path)
|> Stripe.Request.put_params(params)
|> Stripe.Request.put_method(:get)
|> Stripe.Request.put_method(:delete)
|> Stripe.Request.make_request()
end
)
Expand All @@ -47,20 +58,28 @@ defmodule Stripe.ApplePayDomain do
(
nil

@doc "<p>Create an apple pay domain.</p>\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/apple_pay/domains`\n"
@doc "<p>List apple pay domains.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/apple_pay/domains`\n"
(
@spec create(
params :: %{optional(:domain_name) => binary, optional(:expand) => list(binary)},
@spec list(
params :: %{
optional(:domain_name) => binary,
optional(:ending_before) => binary,
optional(:expand) => list(binary),
optional(:limit) => integer,
optional(:starting_after) => binary
},
opts :: Keyword.t()
) ::
{:ok, Stripe.ApplePayDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
def create(params \\ %{}, opts \\ []) do
{:ok, Stripe.List.t(Stripe.ApplePayDomain.t())}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def list(params \\ %{}, opts \\ []) do
path = Stripe.OpenApi.Path.replace_path_params("/v1/apple_pay/domains", [], [])

Stripe.Request.new_request(opts)
|> Stripe.Request.put_endpoint(path)
|> Stripe.Request.put_params(params)
|> Stripe.Request.put_method(:post)
|> Stripe.Request.put_method(:get)
|> Stripe.Request.make_request()
end
)
Expand All @@ -82,17 +101,19 @@ defmodule Stripe.ApplePayDomain do
Stripe.OpenApi.Path.replace_path_params(
"/v1/apple_pay/domains/{domain}",
[
%OpenApiGen.Blueprint.Parameter{
%{
__struct__: OpenApiGen.Blueprint.Parameter,
in: "path",
name: "domain",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "domain",
title: nil,
type: "string",
schema: %{
__struct__: OpenApiGen.Blueprint.Parameter.Schema,
any_of: [],
items: [],
name: "domain",
properties: [],
any_of: []
title: nil,
type: "string"
}
}
],
Expand All @@ -111,39 +132,22 @@ defmodule Stripe.ApplePayDomain do
(
nil

@doc "<p>Delete an apple pay domain.</p>\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/apple_pay/domains/{domain}`\n"
@doc "<p>Create an apple pay domain.</p>\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/apple_pay/domains`\n"
(
@spec delete(domain :: binary(), opts :: Keyword.t()) ::
{:ok, Stripe.DeletedApplePayDomain.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def delete(domain, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/apple_pay/domains/{domain}",
[
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "domain",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "domain",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
}
],
[domain]
)
@spec create(
params :: %{optional(:domain_name) => binary, optional(:expand) => list(binary)},
opts :: Keyword.t()
) ::
{:ok, Stripe.ApplePayDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
def create(params \\ %{}, opts \\ []) do
path = Stripe.OpenApi.Path.replace_path_params("/v1/apple_pay/domains", [], [])

Stripe.Request.new_request(opts)
|> Stripe.Request.put_endpoint(path)
|> Stripe.Request.put_method(:delete)
|> Stripe.Request.put_params(params)
|> Stripe.Request.put_method(:post)
|> Stripe.Request.make_request()
end
)
)
end
end
Loading