Skip to content

Commit

Permalink
Codegen for openapi 442098c
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Mar 20, 2020
1 parent 492c81c commit d7f7067
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 57 deletions.
8 changes: 4 additions & 4 deletions types/2020-03-02/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare module 'stripe' {
alternate_statement_descriptors?: Charge.AlternateStatementDescriptors;

/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
*/
amount: number;

Expand Down Expand Up @@ -710,12 +710,12 @@ declare module 'stripe' {
/**
* Whether or not authentication was performed. 3D Secure will succeed without authentication when the card is not enrolled.
*/
authenticated: boolean;
authenticated?: boolean;

/**
* Whether or not 3D Secure succeeded.
*/
succeeded: boolean;
succeeded?: boolean;

/**
* The version of 3D Secure that was used for this payment.
Expand Down Expand Up @@ -1196,7 +1196,7 @@ declare module 'stripe' {

interface ChargeCreateParams {
/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
*/
amount?: number;

Expand Down
14 changes: 6 additions & 8 deletions types/2020-03-02/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,10 @@ declare module 'stripe' {
client_reference_id?: string;

/**
* ID of an existing customer, if one exists. Only supported for Checkout
* Sessions in `payment` or `subscription` mode, but not Checkout Sessions
* in `setup` mode. The email stored on the customer will be used to prefill
* the email field on the Checkout page. If the customer changes their email
* on the Checkout page, the Customer object will be updated with the new
* email.
* ID of an existing customer, if one exists. The email stored on the
* customer will be used to prefill the email field on the Checkout page.
* If the customer changes their email on the Checkout page, the Customer
* object will be updated with the new email.
* If blank for Checkout Sessions in `payment` or `subscription` mode,
* Checkout will create a new customer object based on information
* provided during the session.
Expand Down Expand Up @@ -610,7 +608,7 @@ declare module 'stripe' {
currency?: string;

/**
* The description for the line item.
* The description for the line item, to be displayed on the Checkout page.
*/
description?: string;

Expand Down Expand Up @@ -694,7 +692,7 @@ declare module 'stripe' {
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
* Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
*
* For more, learn to [save card details during payment](https://stripe.com/docs/payments/save-during-payment).
*
Expand Down
2 changes: 1 addition & 1 deletion types/2020-03-02/IssuerFraudRecords.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ declare module 'stripe' {
fraud_type: string;

/**
* If true, the associated charge is subject to [liability shift](https://stripe.com/docs/sources/three-d-secure#disputed-payments).
* If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments).
*/
has_liability_shift: boolean;

Expand Down
101 changes: 89 additions & 12 deletions types/2020-03-02/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ declare module 'stripe' {
*/
object: 'issuing.authorization';

/**
* The total amount in the card's currency that was authorized or rejected.
*/
amount: number;

/**
* Whether the authorization has been approved.
*/
Expand All @@ -28,12 +33,12 @@ declare module 'stripe' {
/**
* The amount that has been authorized. This will be `0` when the object is created, and increase after it has been approved.
*/
authorized_amount: number;
authorized_amount?: number;

/**
* 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).
*/
authorized_currency: string;
authorized_currency?: string;

/**
* List of balance transactions associated with this authorization.
Expand All @@ -55,26 +60,41 @@ declare module 'stripe' {
*/
created: number;

/**
* 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).
*/
currency: string;

/**
* The amount the authorization is expected to be in `held_currency`. When Stripe holds funds from you, this is the amount reserved for the authorization. This will be `0` when the object is created, and increase after it has been approved. For multi-currency transactions, `held_amount` can be used to determine the expected exchange rate.
*/
held_amount: number;
held_amount?: number;

/**
* The currency of the [held amount](https://stripe.com/docs/api#issuing_authorization_object-held_amount). This will always be the card currency.
*/
held_currency: string;
held_currency?: string;

/**
* If set `true`, you may provide [held_amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-held_amount) to control how much to hold for the authorization.
*/
is_held_amount_controllable: boolean;
is_held_amount_controllable?: boolean;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;

/**
* The total amount that was authorized or rejected in the local merchant_currency.
*/
merchant_amount: number;

/**
* 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).
*/
merchant_currency: string;

merchant_data: Authorization.MerchantData;

/**
Expand All @@ -85,15 +105,20 @@ declare module 'stripe' {
/**
* The amount the user is requesting to be authorized. This field will only be non-zero during an `issuing.authorization.request` webhook.
*/
pending_authorized_amount: number;
pending_authorized_amount?: number;

/**
* The additional amount Stripe will hold if the authorization is approved. This field will only be non-zero during an `issuing.authorization.request` webhook.
*/
pending_held_amount: number;
pending_held_amount?: number;

/**
* The pending authorization request. This field will only be non-null during an `issuing.authorization.request` webhook.
*/
pending_request: Authorization.PendingRequest | null;

/**
* History of every time the authorization was approved/denied (whether approved/denied by you directly, or by Stripe based on your authorization_controls). If the merchant changes the authorization by performing an [incremental authorization or partial capture](https://stripe.com/docs/issuing/authorizations/special_scenarios#incremental-authorizations), you can look at request_history to see the previous states of the authorization.
* History of every time the authorization was approved/denied (whether approved/denied by you directly, or by Stripe based on your authorization_controls). If the merchant changes the authorization by performing an [incremental authorization or partial capture](https://stripe.com/docs/issuing/purchases/authorizations), you can look at request_history to see the previous states of the authorization.
*/
request_history: Array<Authorization.RequestHistory>;

Expand Down Expand Up @@ -170,7 +195,39 @@ declare module 'stripe' {
url: string | null;
}

interface PendingRequest {
/**
* The additional amount Stripe will hold if the authorization is approved, in the [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency), which is always the card's currency.
*/
amount: number;

/**
* 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).
*/
currency: string;

/**
* If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
*/
is_amount_controllable: boolean;

/**
* The amount the merchant is requesting to be authorized in the `merchant_currency`.
*/
merchant_amount: number;

/**
* The local currency the merchant is requesting to authorize.
*/
merchant_currency: string;
}

interface RequestHistory {
/**
* The amount of the authorization is your card's currency. Stripe held this amount from your account to fund the authorization, if the request was approved
*/
amount: number;

/**
* Whether this request was approved.
*/
Expand All @@ -179,27 +236,42 @@ declare module 'stripe' {
/**
* The amount that was authorized at the time of this request
*/
authorized_amount: number;
authorized_amount?: number;

/**
* 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).
*/
authorized_currency: string;
authorized_currency?: string;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;

/**
* 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).
*/
currency: string;

/**
* The amount Stripe held from your account to fund the authorization, if the request was approved
*/
held_amount: number;
held_amount?: number;

/**
* The currency of the [held amount](https://stripe.com/docs/api#issuing_authorization_object-held_amount)
*/
held_currency: string;
held_currency?: string;

/**
* The amount that was authorized at the time of this request
*/
merchant_amount: number;

/**
* The currency that was collected by the merchant and 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).
*/
merchant_currency: string;

/**
* The reason for the approval or decline.
Expand Down Expand Up @@ -373,6 +445,11 @@ declare module 'stripe' {
}

interface AuthorizationApproveParams {
/**
* If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
*/
amount?: number;

/**
* Specifies which fields in the response should be expanded.
*/
Expand Down
6 changes: 3 additions & 3 deletions types/2020-03-02/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare module 'stripe' {
object: 'issuing.cardholder';

/**
* Spending rules that give you some control over how this cardholder's cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/authorizations) documentation for more details.
* Spending rules that give you some control over how this cardholder's cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details.
*/
authorization_controls: Cardholder.AuthorizationControls | null;

Expand Down Expand Up @@ -1130,7 +1130,7 @@ declare module 'stripe' {
type: CardholderCreateParams.Type;

/**
* Spending rules that give you control over how your cardholders can make charges. Refer to our [authorizations](https://stripe.com/docs/issuing/authorizations) documentation for more details.
* Spending rules that give you control over how your cardholders can make charges. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details.
*/
authorization_controls?: CardholderCreateParams.AuthorizationControls;

Expand Down Expand Up @@ -2221,7 +2221,7 @@ declare module 'stripe' {

interface CardholderUpdateParams {
/**
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/authorizations) documentation for more details.
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details.
*/
authorization_controls?: CardholderUpdateParams.AuthorizationControls;

Expand Down
11 changes: 8 additions & 3 deletions types/2020-03-02/Issuing/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ declare module 'stripe' {
*/
pin: Card.Pin | null;

/**
* The latest card that replaces this card, if any.
*/
replaced_by: string | Stripe.Issuing.Card | null;

/**
* The card this card replaces, if any.
*/
Expand Down Expand Up @@ -1131,7 +1136,7 @@ declare module 'stripe' {
type: CardCreateParams.Type;

/**
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/authorizations) documentation for more details.
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details.
*/
authorization_controls?: CardCreateParams.AuthorizationControls;

Expand Down Expand Up @@ -2176,7 +2181,7 @@ declare module 'stripe' {

interface CardUpdateParams {
/**
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/authorizations) documentation for more details.
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details.
*/
authorization_controls?: CardUpdateParams.AuthorizationControls;

Expand Down Expand Up @@ -3227,7 +3232,7 @@ declare module 'stripe' {
list(options?: RequestOptions): ApiListPromise<Stripe.Issuing.Card>;

/**
* For virtual cards only. Retrieves an Issuing card_details object that contains [the sensitive details](https://stripe.com/docs/issuing/cards/management#virtual-card-info) of a virtual card.
* For virtual cards only. Retrieves an Issuing card_details object that contains [the sensitive details](https://stripe.com/docs/issuing/cards/virtual#virtual-card-info) of a virtual card.
*/
retrieveDetails(
id: string,
Expand Down
Loading

0 comments on commit d7f7067

Please sign in to comment.