Skip to content

Commit

Permalink
Update services based on v604 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Oct 17, 2023
1 parent 7804228 commit 878697f
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v602
v604
29 changes: 16 additions & 13 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 the individual's primary address (Japan only)."
@typedoc "The Kana variation of the company'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,8 +216,8 @@ defmodule Stripe.Account do
)

(
@typedoc "The card_issuing capability."
@type card_issuing :: %{optional(:requested) => boolean}
@typedoc "Settings specific to the account's use of the Card Issuing product."
@type card_issuing :: %{optional(:tos_acceptance) => tos_acceptance}
)

(
Expand Down Expand Up @@ -337,7 +337,7 @@ defmodule Stripe.Account do
)

(
@typedoc "An identifying document, either a passport or local ID card."
@typedoc "A document verifying the business."
@type document :: %{optional(:back) => binary, optional(:front) => binary}
)

Expand Down Expand Up @@ -514,6 +514,7 @@ defmodule Stripe.Account do
@type relationship :: %{
optional(:director) => boolean,
optional(:executive) => boolean,
optional(:legal_guardian) => boolean,
optional(:owner) => boolean,
optional(:representative) => boolean
}
Expand Down Expand Up @@ -575,12 +576,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 @@ -590,8 +590,8 @@ defmodule Stripe.Account do
)

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

(
Expand All @@ -600,8 +600,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
10 changes: 9 additions & 1 deletion lib/generated/checkout__session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,15 @@ defmodule Stripe.Checkout.Session do

(
@typedoc nil
@type custom_fields :: %{optional(:name) => binary, optional(:value) => binary}
@type custom_fields :: %{
optional(:dropdown) => dropdown,
optional(:key) => binary,
optional(:label) => label,
optional(:numeric) => numeric,
optional(:optional) => boolean,
optional(:text) => text,
optional(:type) => :dropdown | :numeric | :text
}
)

(
Expand Down
67 changes: 29 additions & 38 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 "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method."
@typedoc nil
@type acss_debit :: %{
optional(:account_number) => binary,
optional(:institution_number) => binary,
optional(:transit_number) => binary
optional(:mandate_options) => mandate_options,
optional(:setup_future_usage) => :none | :off_session | :on_session,
optional(:verification_method) => :automatic | :instant | :microdeposits
}
)

Expand Down Expand Up @@ -136,8 +136,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type au_becs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session}
@typedoc "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account."
@type au_becs_debit :: %{optional(:account_number) => binary, optional(:bsb_number) => binary}
)

(
Expand Down Expand Up @@ -192,8 +192,11 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method."
@type boleto :: %{optional(:tax_id) => binary}
@typedoc nil
@type boleto :: %{
optional(:expires_after_days) => integer,
optional(:setup_future_usage) => :none | :off_session | :on_session
}
)

(
Expand Down Expand Up @@ -343,25 +346,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 Down Expand Up @@ -400,12 +386,17 @@ defmodule Stripe.PaymentIntent 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(:interval_description) => binary,
optional(:payment_schedule) => :combined | :interval | :sporadic,
optional(:transaction_type) => :business | :personal
optional(:amount) => integer,
optional(:amount_type) => :fixed | :maximum,
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 @@ -664,13 +655,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
21 changes: 20 additions & 1 deletion lib/generated/person.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ defmodule Stripe.Person do
(
defstruct [
:account,
:additional_tos_acceptances,
:address,
:address_kana,
:address_kanji,
Expand Down Expand Up @@ -36,9 +37,10 @@ defmodule Stripe.Person do
:verification
]

@typedoc "The `person` type.\n\n * `account` The account the person is associated with.\n * `address` \n * `address_kana` The Kana variation of the person's address (Japan only).\n * `address_kanji` The Kanji variation of the person's address (Japan only).\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `dob` \n * `email` The person's email address.\n * `first_name` The person's first name.\n * `first_name_kana` The Kana variation of the person's first name (Japan only).\n * `first_name_kanji` The Kanji variation of the person's first name (Japan only).\n * `full_name_aliases` A list of alternate names or aliases that the person is known by.\n * `future_requirements` Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.\n * `gender` The person's gender (International regulations require either \"male\" or \"female\").\n * `id` Unique identifier for the object.\n * `id_number_provided` Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`).\n * `id_number_secondary_provided` Whether the person's `id_number_secondary` was provided.\n * `last_name` The person's last name.\n * `last_name_kana` The Kana variation of the person's last name (Japan only).\n * `last_name_kanji` The Kanji variation of the person's last name (Japan only).\n * `maiden_name` The person's maiden name.\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 * `nationality` The country where the person is a national.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `phone` The person's phone number.\n * `political_exposure` Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.\n * `registered_address` \n * `relationship` \n * `requirements` Information about the requirements for this person, including what information needs to be collected, and by when.\n * `ssn_last_4_provided` Whether the last four digits of the person's Social Security number have been provided (U.S. only).\n * `verification` \n"
@typedoc "The `person` type.\n\n * `account` The account the person is associated with.\n * `additional_tos_acceptances` \n * `address` \n * `address_kana` The Kana variation of the person's address (Japan only).\n * `address_kanji` The Kanji variation of the person's address (Japan only).\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `dob` \n * `email` The person's email address.\n * `first_name` The person's first name.\n * `first_name_kana` The Kana variation of the person's first name (Japan only).\n * `first_name_kanji` The Kanji variation of the person's first name (Japan only).\n * `full_name_aliases` A list of alternate names or aliases that the person is known by.\n * `future_requirements` Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.\n * `gender` The person's gender (International regulations require either \"male\" or \"female\").\n * `id` Unique identifier for the object.\n * `id_number_provided` Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`).\n * `id_number_secondary_provided` Whether the person's `id_number_secondary` was provided.\n * `last_name` The person's last name.\n * `last_name_kana` The Kana variation of the person's last name (Japan only).\n * `last_name_kanji` The Kanji variation of the person's last name (Japan only).\n * `maiden_name` The person's maiden name.\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 * `nationality` The country where the person is a national.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `phone` The person's phone number.\n * `political_exposure` Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.\n * `registered_address` \n * `relationship` \n * `requirements` Information about the requirements for this person, including what information needs to be collected, and by when.\n * `ssn_last_4_provided` Whether the last four digits of the person's Social Security number have been provided (U.S. only).\n * `verification` \n"
@type t :: %__MODULE__{
account: binary,
additional_tos_acceptances: term,
address: term,
address_kana: term | nil,
address_kanji: term | nil,
Expand Down Expand Up @@ -71,11 +73,25 @@ defmodule Stripe.Person do
}
)

(
@typedoc "Details on the legal guardian's acceptance of the main Stripe service agreement."
@type account :: %{
optional(:date) => integer,
optional(:ip) => binary,
optional(:user_agent) => binary | binary
}
)

(
@typedoc "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company."
@type additional_document :: %{optional(:back) => binary, optional(:front) => binary}
)

(
@typedoc "Details on the legal guardian's acceptance of the required Stripe agreements."
@type additional_tos_acceptances :: %{optional(:account) => account}
)

(
@typedoc "The person's address."
@type address :: %{
Expand Down Expand Up @@ -164,6 +180,7 @@ defmodule Stripe.Person do
@type relationship :: %{
optional(:director) => boolean,
optional(:executive) => boolean,
optional(:legal_guardian) => boolean,
optional(:owner) => boolean,
optional(:representative) => boolean
}
Expand Down Expand Up @@ -295,6 +312,7 @@ defmodule Stripe.Person do
@spec create(
account :: binary(),
params :: %{
optional(:additional_tos_acceptances) => additional_tos_acceptances,
optional(:address) => address,
optional(:address_kana) => address_kana,
optional(:address_kanji) => address_kanji,
Expand Down Expand Up @@ -365,6 +383,7 @@ defmodule Stripe.Person do
account :: binary(),
person :: binary(),
params :: %{
optional(:additional_tos_acceptances) => additional_tos_acceptances,
optional(:address) => address,
optional(:address_kana) => address_kana,
optional(:address_kanji) => address_kanji,
Expand Down
25 changes: 17 additions & 8 deletions lib/generated/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ defmodule Stripe.Token do
)

(
@typedoc "Information for the account this token represents."
@typedoc "Details on the legal guardian's acceptance of the main Stripe service agreement."
@type account :: %{
optional(:business_type) => :company | :government_entity | :individual | :non_profit,
optional(:company) => company,
optional(:individual) => individual,
optional(:tos_shown_and_accepted) => boolean
optional(:date) => integer,
optional(:ip) => binary,
optional(:user_agent) => binary | binary
}
)

Expand All @@ -35,7 +34,12 @@ defmodule Stripe.Token do
)

(
@typedoc "The company's primary address."
@typedoc "Details on the legal guardian's acceptance of the required Stripe agreements."
@type additional_tos_acceptances :: %{optional(:account) => account}
)

(
@typedoc "The person's address."
@type address :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand Down Expand Up @@ -229,6 +233,7 @@ defmodule Stripe.Token do
(
@typedoc "Information for the person this token represents."
@type person :: %{
optional(:additional_tos_acceptances) => additional_tos_acceptances,
optional(:address) => address,
optional(:address_kana) => address_kana,
optional(:address_kanji) => address_kanji,
Expand Down Expand Up @@ -279,6 +284,7 @@ defmodule Stripe.Token do
@type relationship :: %{
optional(:director) => boolean,
optional(:executive) => boolean,
optional(:legal_guardian) => boolean,
optional(:owner) => boolean,
optional(:percent_ownership) => number | binary,
optional(:representative) => boolean,
Expand All @@ -287,8 +293,11 @@ defmodule Stripe.Token do
)

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

(
Expand Down
3 changes: 2 additions & 1 deletion lib/generated/webhook_endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ defmodule Stripe.WebhookEndpoint do
| :"2020-08-27"
| :"2022-08-01"
| :"2022-11-15"
| :"2023-08-16",
| :"2023-08-16"
| :"2023-10-16",
optional(:connect) => boolean,
optional(:description) => binary | binary,
optional(:enabled_events) =>
Expand Down
Loading

0 comments on commit 878697f

Please sign in to comment.