Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for amount_details on Issuing Authorization and Transaction #987

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/2020-03-02/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ declare module 'stripe' {
/**
* The customer's payment sources, if any.
*/
sources: ApiList<CustomerSource>;
sources: ApiList<CustomerSource> | null;

/**
* The customer's current subscriptions, if any.
Expand Down
38 changes: 38 additions & 0 deletions types/2020-03-02/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ declare module 'stripe' {
*/
amount: number;

/**
* Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
*/
amount_details: Authorization.AmountDetails | null;

/**
* Whether the authorization has been approved.
*/
Expand Down Expand Up @@ -107,6 +112,13 @@ declare module 'stripe' {
}

namespace Authorization {
interface AmountDetails {
/**
* The fee charged by the ATM for the cash withdrawal.
*/
atm_fee: number | null;
}

type AuthorizationMethod =
| 'chip'
| 'contactless'
Expand Down Expand Up @@ -157,6 +169,11 @@ declare module 'stripe' {
*/
amount: number;

/**
* Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
*/
amount_details: PendingRequest.AmountDetails | null;

/**
* 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).
*/
Expand All @@ -178,12 +195,26 @@ declare module 'stripe' {
merchant_currency: string;
}

namespace PendingRequest {
interface AmountDetails {
/**
* The fee charged by the ATM for the cash withdrawal.
*/
atm_fee: number | null;
}
}

interface RequestHistory {
/**
* The authorization amount in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.
*/
amount: number;

/**
* Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
*/
amount_details: RequestHistory.AmountDetails | null;

/**
* Whether this request was approved.
*/
Expand Down Expand Up @@ -216,6 +247,13 @@ declare module 'stripe' {
}

namespace RequestHistory {
interface AmountDetails {
/**
* The fee charged by the ATM for the cash withdrawal.
*/
atm_fee: number | null;
}

type Reason =
| 'account_disabled'
| 'card_active'
Expand Down
12 changes: 12 additions & 0 deletions types/2020-03-02/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ declare module 'stripe' {
*/
amount: number;

/**
* Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
*/
amount_details: Transaction.AmountDetails | null;

/**
* The `Authorization` object that led to this transaction.
*/
Expand Down Expand Up @@ -85,6 +90,13 @@ declare module 'stripe' {
}

namespace Transaction {
interface AmountDetails {
/**
* The fee charged by the ATM for the cash withdrawal.
*/
atm_fee: number | null;
}

interface MerchantData {
/**
* A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
Expand Down