Skip to content

Commit

Permalink
Update services based on v550 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Sep 23, 2023
1 parent 622017d commit 0176e27
Show file tree
Hide file tree
Showing 10 changed files with 3,754 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
@@ -1 +1 @@
v545
v550
31 changes: 12 additions & 19 deletions lib/generated/account.ex
Expand Up @@ -91,7 +91,7 @@ defmodule Stripe.Account do
)

(
@typedoc "The Kanji variation of the company's primary address (Japan only)."
@typedoc "The Kanji variation of the the individual's primary address (Japan only)."
@type address_kanji :: %{
optional(:city) => binary,
optional(:country) => binary,
Expand Down Expand Up @@ -216,18 +216,13 @@ 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 "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
}
@typedoc "The card_payments capability."
@type card_payments :: %{optional(:requested) => boolean}
)

(
Expand Down Expand Up @@ -575,11 +570,12 @@ defmodule Stripe.Account do
)

(
@typedoc "Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance)."
@typedoc "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance)."
@type tos_acceptance :: %{
optional(:date) => integer,
optional(:ip) => binary,
optional(:user_agent) => binary | binary
optional(:service_agreement) => binary,
optional(:user_agent) => binary
}
)

Expand All @@ -589,8 +585,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 @@ -599,11 +595,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
17 changes: 14 additions & 3 deletions lib/generated/checkout__session.ex
Expand Up @@ -230,7 +230,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 Expand Up @@ -934,8 +942,11 @@ defmodule Stripe.Checkout.Session do
)

(
@typedoc "The parameters used to automatically create a Transfer when the payment succeeds.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)."
@type transfer_data :: %{optional(:amount) => integer, optional(:destination) => binary}
@typedoc "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges."
@type transfer_data :: %{
optional(:amount_percent) => number,
optional(:destination) => binary
}
)

(
Expand Down
19 changes: 18 additions & 1 deletion lib/generated/invoice.ex

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/generated/mandate.ex
@@ -1,7 +1,7 @@
defmodule Stripe.Mandate do
use Stripe.Entity

@moduledoc "A Mandate is a record of the permission a customer has given you to debit their payment method."
@moduledoc "A Mandate is a record of the permission that your customer gives you to debit their payment method."
(
defstruct [
:customer_acceptance,
Expand All @@ -17,7 +17,7 @@ defmodule Stripe.Mandate do
:type
]

@typedoc "The `mandate` type.\n\n * `customer_acceptance` \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 * `multi_use` \n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account (if any) for which the mandate is intended.\n * `payment_method` ID of the payment method associated with this mandate.\n * `payment_method_details` \n * `single_use` \n * `status` The status of the mandate, which indicates whether it can be used to initiate a payment.\n * `type` The type of the mandate.\n"
@typedoc "The `mandate` type.\n\n * `customer_acceptance` \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 * `multi_use` \n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account (if any) that the mandate is intended for.\n * `payment_method` ID of the payment method associated with this mandate.\n * `payment_method_details` \n * `single_use` \n * `status` The mandate status indicates whether or not you can use it to initiate a payment.\n * `type` The type of the mandate.\n"
@type t :: %__MODULE__{
customer_acceptance: term,
id: binary,
Expand Down
54 changes: 28 additions & 26 deletions lib/generated/payment_intent.ex
Expand Up @@ -101,7 +101,7 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@typedoc "Shipping address."
@type address :: %{
optional(:city) => binary,
optional(:country) => binary,
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,11 +192,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 @@ -381,12 +378,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 @@ -592,8 +594,11 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account."
@type sepa_debit :: %{optional(:iban) => binary}
@typedoc nil
@type sepa_debit :: %{
optional(:mandate_options) => map(),
optional(:setup_future_usage) => :none | :off_session | :on_session
}
)

(
Expand All @@ -608,11 +613,8 @@ defmodule Stripe.PaymentIntent do
)

(
@typedoc nil
@type sofort :: %{
optional(:preferred_language) => :de | :en | :es | :fr | :it | :nl | :pl,
optional(:setup_future_usage) => :none | :off_session
}
@typedoc "If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method."
@type sofort :: %{optional(:country) => :AT | :BE | :DE | :ES | :IT | :NL}
)

(
Expand All @@ -621,13 +623,13 @@ 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(: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
4 changes: 2 additions & 2 deletions lib/generated/setup_attempt.ex
@@ -1,7 +1,7 @@
defmodule Stripe.SetupAttempt do
use Stripe.Entity

@moduledoc "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent."
@moduledoc "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation is successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent."
(
defstruct [
:application,
Expand Down Expand Up @@ -54,7 +54,7 @@ defmodule Stripe.SetupAttempt do
(
nil

@doc "<p>Returns a list of SetupAttempts associated with a provided SetupIntent.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/setup_attempts`\n"
@doc "<p>Returns a list of SetupAttempts that associate with a provided SetupIntent.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/setup_attempts`\n"
(
@spec list(
params :: %{
Expand Down
21 changes: 13 additions & 8 deletions lib/generated/setup_intent.ex
Expand Up @@ -278,13 +278,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 @@ -424,8 +429,8 @@ defmodule Stripe.SetupIntent do
)

(
@typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account."
@type sepa_debit :: %{optional(:iban) => binary}
@typedoc "If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options."
@type sepa_debit :: %{optional(:mandate_options) => map()}
)

(
Expand Down
14 changes: 0 additions & 14 deletions lib/generated/webhook_endpoint.ex
Expand Up @@ -322,7 +322,6 @@ defmodule Stripe.WebhookEndpoint do
| :"issuing_transaction.created"
| :"issuing_transaction.updated"
| :"mandate.updated"
| :"order.created"
| :"payment_intent.amount_capturable_updated"
| :"payment_intent.canceled"
| :"payment_intent.created"
Expand Down Expand Up @@ -363,9 +362,6 @@ defmodule Stripe.WebhookEndpoint do
| :"quote.finalized"
| :"radar.early_fraud_warning.created"
| :"radar.early_fraud_warning.updated"
| :"recipient.created"
| :"recipient.deleted"
| :"recipient.updated"
| :"refund.created"
| :"refund.updated"
| :"reporting.report_run.failed"
Expand All @@ -379,9 +375,6 @@ defmodule Stripe.WebhookEndpoint do
| :"setup_intent.setup_failed"
| :"setup_intent.succeeded"
| :"sigma.scheduled_query_run.created"
| :"sku.created"
| :"sku.deleted"
| :"sku.updated"
| :"source.canceled"
| :"source.chargeable"
| :"source.failed"
Expand Down Expand Up @@ -579,7 +572,6 @@ defmodule Stripe.WebhookEndpoint do
| :"issuing_transaction.created"
| :"issuing_transaction.updated"
| :"mandate.updated"
| :"order.created"
| :"payment_intent.amount_capturable_updated"
| :"payment_intent.canceled"
| :"payment_intent.created"
Expand Down Expand Up @@ -620,9 +612,6 @@ defmodule Stripe.WebhookEndpoint do
| :"quote.finalized"
| :"radar.early_fraud_warning.created"
| :"radar.early_fraud_warning.updated"
| :"recipient.created"
| :"recipient.deleted"
| :"recipient.updated"
| :"refund.created"
| :"refund.updated"
| :"reporting.report_run.failed"
Expand All @@ -636,9 +625,6 @@ defmodule Stripe.WebhookEndpoint do
| :"setup_intent.setup_failed"
| :"setup_intent.succeeded"
| :"sigma.scheduled_query_run.created"
| :"sku.created"
| :"sku.deleted"
| :"sku.updated"
| :"source.canceled"
| :"source.chargeable"
| :"source.failed"
Expand Down

0 comments on commit 0176e27

Please sign in to comment.