Skip to content

Commit

Permalink
Update services based on v740 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Jan 3, 2024
1 parent ce39ea6 commit 374eff1
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v737
v740
11 changes: 4 additions & 7 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,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 @@ -602,11 +602,8 @@ defmodule Stripe.Account do
)

(
@typedoc "The individual's verification document information."
@type verification :: %{
optional(:additional_document) => additional_document,
optional(:document) => document
}
@typedoc "Information on the verification state of the company."
@type verification :: %{optional(:document) => document}
)

(
Expand Down
55 changes: 34 additions & 21 deletions lib/generated/payment_intent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method."
@type acss_debit :: %{
optional(:mandate_options) => mandate_options,
optional(:setup_future_usage) => :none | :off_session | :on_session,
optional(:verification_method) => :automatic | :instant | :microdeposits
optional(:account_number) => binary,
optional(:institution_number) => binary,
optional(:transit_number) => binary
}
)

Expand Down 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 @@ -360,8 +360,25 @@ defmodule Stripe.PaymentIntent do
)

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

(
Expand Down Expand Up @@ -401,12 +418,7 @@ defmodule Stripe.PaymentIntent do

(
@typedoc "Additional fields for Mandate creation"
@type mandate_options :: %{
optional(:custom_mandate_url) => binary | binary,
optional(:interval_description) => binary,
optional(:payment_schedule) => :combined | :interval | :sporadic,
optional(:transaction_type) => :business | :personal
}
@type mandate_options :: %{optional(:collection_method) => :paper}
)

(
Expand Down Expand Up @@ -614,7 +626,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 Down Expand Up @@ -667,13 +679,14 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method."
@typedoc nil
@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(:mandate_options) => mandate_options,
optional(:networks) => networks,
optional(:preferred_settlement_speed) => :fastest | :standard,
optional(:setup_future_usage) => :none | :off_session | :on_session,
optional(:verification_method) => :automatic | :instant | :microdeposits
}
)

Expand Down
28 changes: 16 additions & 12 deletions lib/generated/setup_intent.ex
Original file line number Diff line number Diff line change
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 Expand Up @@ -469,13 +474,12 @@ 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(:mandate_options) => mandate_options,
optional(:networks) => networks,
optional(:verification_method) => :automatic | :instant | :microdeposits
}
)

Expand Down
44 changes: 44 additions & 0 deletions lib/generated/tax__registration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,50 @@ defmodule Stripe.Tax.Registration do
)
)

(
nil

@doc "<p>Returns a Tax <code>Registration</code> object.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax/registrations/{id}`\n"
(
@spec retrieve(
id :: binary(),
params :: %{optional(:expand) => list(binary)},
opts :: Keyword.t()
) ::
{:ok, Stripe.Tax.Registration.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def retrieve(id, params \\ %{}, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/tax/registrations/{id}",
[
%OpenApiGen.Blueprint.Parameter{
in: "path",
name: "id",
required: true,
schema: %OpenApiGen.Blueprint.Parameter.Schema{
name: "id",
title: nil,
type: "string",
items: [],
properties: [],
any_of: []
}
}
],
[id]
)

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
11 changes: 4 additions & 7 deletions lib/generated/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Stripe.Token do
)

(
@typedoc "The Kana variation of the person's 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 Down Expand Up @@ -268,7 +268,7 @@ defmodule Stripe.Token do
)

(
@typedoc "The person's registered address."
@typedoc "The individual's registered address."
@type registered_address :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand All @@ -293,11 +293,8 @@ defmodule Stripe.Token do
)

(
@typedoc "The individual's verification document information."
@type verification :: %{
optional(:additional_document) => additional_document,
optional(:document) => document
}
@typedoc "Information on the verification state of the company."
@type verification :: %{optional(:document) => document}
)

(
Expand Down
83 changes: 76 additions & 7 deletions priv/openapi/spec3.sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -28705,6 +28705,7 @@
"custom_text",
"customer_creation",
"id",
"inactive_message",
"invoice_creation",
"livemode",
"metadata",
Expand All @@ -28714,6 +28715,7 @@
"payment_method_collection",
"payment_method_types",
"phone_number_collection",
"restrictions",
"shipping_address_collection",
"shipping_options",
"submit_type",
Expand Down Expand Up @@ -47735,13 +47737,7 @@
"type": "string"
},
"invoice_settings": {
"anyOf": [
{
"$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting"
}
],
"description": "The subscription schedule's default invoice settings.",
"nullable": true
"$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting"
},
"on_behalf_of": {
"anyOf": [
Expand Down Expand Up @@ -48439,6 +48435,13 @@
"operation": "post",
"path": "/v1/tax/registrations"
},
{
"method_name": "retrieve",
"method_on": "service",
"method_type": "retrieve",
"operation": "get",
"path": "/v1/tax/registrations/{id}"
},
{
"method_name": "update",
"method_on": "service",
Expand Down Expand Up @@ -134616,6 +134619,72 @@
}
},
"/v1/tax/registrations/{id}": {
"get": {
"description": "<p>Returns a Tax <code>Registration</code> object.</p>",
"operationId": "GetTaxRegistrationsId",
"parameters": [
{
"description": "Specifies which fields in the response should be expanded.",
"explode": true,
"in": "query",
"name": "expand",
"required": false,
"schema": {
"items": {
"maxLength": 5000,
"type": "string"
},
"type": "array"
},
"style": "deepObject"
},
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"maxLength": 5000,
"type": "string"
},
"style": "simple"
}
],
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"encoding": {},
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tax.registration"
}
}
},
"description": "Successful response."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error response."
}
}
},
"post": {
"description": "<p>Updates an existing Tax <code>Registration</code> object.</p>\n\n<p>A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting <code>expires_at</code>.</p>",
"operationId": "PostTaxRegistrationsId",
Expand Down

0 comments on commit 374eff1

Please sign in to comment.