Skip to content

Commit

Permalink
Update services based on v674 of Stripe OpenApi SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Nov 18, 2023
1 parent 5716489 commit 2da6768
Show file tree
Hide file tree
Showing 10 changed files with 233 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-stripe-openapi-sdk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v669
v674
18 changes: 8 additions & 10 deletions lib/generated/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ defmodule Stripe.Account do
)

(
@typedoc "Settings specific to Bacs Direct Debit payments."
@type bacs_debit_payments :: %{optional(:display_name) => binary}
@typedoc "The bacs_debit_payments capability."
@type bacs_debit_payments :: %{optional(:requested) => boolean}
)

(
Expand Down Expand Up @@ -333,7 +333,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 @@ -578,11 +578,12 @@ 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 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 @@ -602,11 +603,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
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
2 changes: 1 addition & 1 deletion lib/generated/event.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Stripe.Event do
use Stripe.Entity

@moduledoc "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent, and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Certain API requests might create multiple\nevents. For example, if you create a new subscription for a\ncustomer, you receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The event's data\nfield embeds the resource's state at the time of the change. For\nexample, a `charge.succeeded` event contains a charge, and an\n`invoice.payment_failed` event contains an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. You can manage\nwebhooks in your\n[account settings](https://dashboard.stripe.com/account/webhooks). Learn how\nto [listen for events]\n(/docs/webhooks) so that your integration can automatically trigger reactions.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive event notifications\nthat occur in connected accounts. For these events, there's an\nadditional `account` attribute in the received `Event` object.\n\nWe only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)\nfor 30 days."
@moduledoc "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent, and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Certain API requests might create multiple\nevents. For example, if you create a new subscription for a\ncustomer, you receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The event's data\nfield embeds the resource's state at the time of the change. For\nexample, a `charge.succeeded` event contains a charge, and an\n`invoice.payment_failed` event contains an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. You can manage\nwebhooks in your\n[account settings](https://dashboard.stripe.com/account/webhooks). Learn how\nto [listen for events](https://stripe.com/docs/webhooks)\nso that your integration can automatically trigger reactions.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive event notifications\nthat occur in connected accounts. For these events, there's an\nadditional `account` attribute in the received `Event` object.\n\nWe only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)\nfor 30 days."
(
defstruct [
:account,
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/issuing__authorization.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule Stripe.Issuing.Authorization do
:wallet
]

@typedoc "The `issuing.authorization` type.\n\n * `amount` The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `amount_details` Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `approved` Whether the authorization has been approved.\n * `authorization_method` How the card details were provided.\n * `balance_transactions` List of balance transactions associated with this authorization.\n * `card` \n * `cardholder` The cardholder to whom this authorization belongs.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\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 * `merchant_amount` The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `merchant_currency` The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n * `merchant_data` \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 * `network_data` Details about the authorization, such as identifiers, set by the card network.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `pending_request` The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.\n * `request_history` History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.\n * `status` The current status of the authorization in its lifecycle.\n * `token` [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null.\n * `transactions` List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.\n * `treasury` [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).\n * `verification_data` \n * `wallet` The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.\n"
@typedoc "The `issuing.authorization` type.\n\n * `amount` The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different.\n * `amount_details` Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `approved` Whether the authorization has been approved.\n * `authorization_method` How the card details were provided.\n * `balance_transactions` List of balance transactions associated with this authorization.\n * `card` \n * `cardholder` The cardholder to whom this authorization belongs.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\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 * `merchant_amount` The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different.\n * `merchant_currency` The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n * `merchant_data` \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 * `network_data` Details about the authorization, such as identifiers, set by the card network.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `pending_request` The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.\n * `request_history` History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.\n * `status` The current status of the authorization in its lifecycle.\n * `token` [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null.\n * `transactions` List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.\n * `treasury` [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).\n * `verification_data` \n * `wallet` The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.\n"
@type t :: %__MODULE__{
amount: integer,
amount_details: term | nil,
Expand Down
Loading

0 comments on commit 2da6768

Please sign in to comment.