Skip to content

Commit

Permalink
Regenerate lib
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvanvliet committed Aug 21, 2023
1 parent c2a41b8 commit d492687
Show file tree
Hide file tree
Showing 127 changed files with 593 additions and 245 deletions.
51 changes: 46 additions & 5 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,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,7 +568,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 Expand Up @@ -609,9 +609,9 @@ defmodule Stripe.Account do

@doc "<p>Retrieves the details of an account.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/account`\n"
(
@spec retrieve(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) ::
@spec show(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) ::
{:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
def retrieve(params \\ %{}, opts \\ []) do
def show(params \\ %{}, opts \\ []) do
path = Stripe.OpenApi.Path.replace_path_params("/v1/account", [], [])

Stripe.Request.new_request(opts)
Expand All @@ -623,6 +623,47 @@ defmodule Stripe.Account do
)
)

(
nil

@doc "<p>Retrieves the details of an account.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}`\n"
(
@spec retrieve(
account :: binary(),
params :: %{optional(:expand) => list(binary)},
opts :: Keyword.t()
) :: {:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
def retrieve(account, params \\ %{}, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/accounts/{account}",
[
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "account",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "account",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
}
],
[account]
)

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

(
nil

Expand Down Expand Up @@ -920,4 +961,4 @@ defmodule Stripe.Account do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/account_link.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ defmodule Stripe.AccountLink do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/api_errors.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ defmodule Stripe.ApiErrors do
type: binary
}
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/apple_pay_domain.ex
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ defmodule Stripe.ApplePayDomain do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/application_fee.ex
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ defmodule Stripe.ApplicationFee do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/apps__secret.ex
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ defmodule Stripe.Apps.Secret do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/balance.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ defmodule Stripe.Balance do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/balance_transaction.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ defmodule Stripe.BalanceTransaction do
end
)
)
end
end
149 changes: 144 additions & 5 deletions lib/generated/bank_account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ defmodule Stripe.BankAccount do
}
)

(
@typedoc "One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check."
@type bank_account_ownership_verification :: %{optional(:files) => list(binary)}
)

(
@typedoc "Documents that may be submitted to satisfy various informational requests."
@type documents :: %{
optional(:bank_account_ownership_verification) => bank_account_ownership_verification
}
)

(
@typedoc nil
@type owner :: %{
Expand All @@ -76,7 +88,7 @@ defmodule Stripe.BankAccount do

@doc "<p>Update a specified source for a given customer.</p>\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/sources/{id}`\n"
(
@spec update(
@spec update_source(
customer :: binary(),
id :: binary(),
params :: %{
Expand All @@ -100,7 +112,7 @@ defmodule Stripe.BankAccount do
{:ok, Stripe.Card.t() | Stripe.BankAccount.t() | Stripe.Source.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def update(customer, id, params \\ %{}, opts \\ []) do
def update_source(customer, id, params \\ %{}, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/customers/{customer}/sources/{id}",
Expand Down Expand Up @@ -149,7 +161,7 @@ defmodule Stripe.BankAccount do

@doc "<p>Delete a specified source for a given customer.</p>\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/customers/{customer}/sources/{id}`\n"
(
@spec delete(
@spec delete_source(
customer :: binary(),
id :: binary(),
params :: %{optional(:expand) => list(binary)},
Expand All @@ -158,7 +170,7 @@ defmodule Stripe.BankAccount do
{:ok, Stripe.PaymentSource.t() | Stripe.DeletedPaymentSource.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def delete(customer, id, params \\ %{}, opts \\ []) do
def delete_source(customer, id, params \\ %{}, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/customers/{customer}/sources/{id}",
Expand Down Expand Up @@ -256,4 +268,131 @@ defmodule Stripe.BankAccount do
end
)
)
end

(
nil

@doc "<p>Updates the metadata, account holder name, account holder type of a bank account belonging to a <a href=\"/docs/connect/custom-accounts\">Custom account</a>, and optionally sets it as the default for its currency. Other bank account details are not editable by design.</p>\n\n<p>You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.</p>\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/external_accounts/{id}`\n"
(
@spec update_external_account(
account :: binary(),
id :: binary(),
params :: %{
optional(:account_holder_name) => binary,
optional(:account_holder_type) => :company | :individual,
optional(:account_type) => :checking | :futsu | :savings | :toza,
optional(:address_city) => binary,
optional(:address_country) => binary,
optional(:address_line1) => binary,
optional(:address_line2) => binary,
optional(:address_state) => binary,
optional(:address_zip) => binary,
optional(:default_for_currency) => boolean,
optional(:documents) => documents,
optional(:exp_month) => binary,
optional(:exp_year) => binary,
optional(:expand) => list(binary),
optional(:metadata) => %{optional(binary) => binary} | binary,
optional(:name) => binary
},
opts :: Keyword.t()
) ::
{:ok, Stripe.ExternalAccount.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def update_external_account(account, id, params \\ %{}, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/accounts/{account}/external_accounts/{id}",
[
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "account",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "account",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
},
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "id",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "id",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
}
],
[account, id]
)

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

(
nil

@doc "<p>Delete a specified external account for a given account.</p>\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}/external_accounts/{id}`\n"
(
@spec delete_external_account(account :: binary(), id :: binary(), opts :: Keyword.t()) ::
{:ok, Stripe.DeletedExternalAccount.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def delete_external_account(account, id, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/accounts/{account}/external_accounts/{id}",
[
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "account",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "account",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
},
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "id",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "id",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
}
],
[account, id]
)

Stripe.Request.new_request(opts)
|> Stripe.Request.put_endpoint(path)
|> Stripe.Request.put_method(:delete)
|> Stripe.Request.make_request()
end
)
)
end
2 changes: 1 addition & 1 deletion lib/generated/billing_portal__configuration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ defmodule Stripe.BillingPortal.Configuration do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/billing_portal__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ defmodule Stripe.BillingPortal.Session do
end
)
)
end
end
2 changes: 1 addition & 1 deletion lib/generated/capability.ex
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ defmodule Stripe.Capability do
end
)
)
end
end
Loading

0 comments on commit d492687

Please sign in to comment.