Add subscription support + license extension on renewal

This commit is contained in:
Krystie committed 2026-08-19 12:45:06 -07:00
1 parent 14d0eaa2b3
commit ff722aa4d8
2075 files changed
+357707 -63

No files matched your search

+669
View File
@@ -0,0 +1,669 @@
import { StripeResource } from '../../StripeResource.js';
import { ConfirmationToken } from './../ConfirmationTokens.js';
import { MetadataParam, OtherString, Emptyable, AddressParam } from '../../shared.js';
import { RequestOptions, Response } from '../../lib.js';
export declare class ConfirmationTokenResource extends StripeResource {
/**
* Creates a test mode Confirmation Token server side for your integration tests.
*/
create(params?: TestHelpers.ConfirmationTokenCreateParams, options?: RequestOptions): Promise<Response<ConfirmationToken>>;
}
export declare namespace TestHelpers {
interface ConfirmationTokenCreateParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* ID of an existing PaymentMethod.
*/
payment_method?: string;
/**
* If provided, this hash will be used to create a PaymentMethod.
*/
payment_method_data?: ConfirmationTokenCreateParams.PaymentMethodData;
/**
* Payment-method-specific configuration for this ConfirmationToken.
*/
payment_method_options?: ConfirmationTokenCreateParams.PaymentMethodOptions;
/**
* Return URL used to confirm the Intent.
*/
return_url?: string;
/**
* Indicates that you intend to make future payments with this ConfirmationToken's payment method.
*
* The presence of this property will [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
*/
setup_future_usage?: ConfirmationTokenCreateParams.SetupFutureUsage;
/**
* Shipping information for this ConfirmationToken.
*/
shipping?: ConfirmationTokenCreateParams.Shipping;
}
namespace ConfirmationTokenCreateParams {
interface PaymentMethodData {
/**
* If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
*/
acss_debit?: PaymentMethodData.AcssDebit;
/**
* If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
*/
affirm?: PaymentMethodData.Affirm;
/**
* If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
*/
afterpay_clearpay?: PaymentMethodData.AfterpayClearpay;
/**
* If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
*/
alipay?: PaymentMethodData.Alipay;
/**
* This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
*/
allow_redisplay?: PaymentMethodData.AllowRedisplay;
/**
* If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
*/
alma?: PaymentMethodData.Alma;
/**
* If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
*/
amazon_pay?: PaymentMethodData.AmazonPay;
/**
* If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
*/
au_becs_debit?: PaymentMethodData.AuBecsDebit;
/**
* If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
*/
bacs_debit?: PaymentMethodData.BacsDebit;
/**
* If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
*/
bancontact?: PaymentMethodData.Bancontact;
/**
* If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
*/
billie?: PaymentMethodData.Billie;
/**
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
*/
billing_details?: PaymentMethodData.BillingDetails;
/**
* If this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
*/
bizum?: PaymentMethodData.Bizum;
/**
* If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
*/
blik?: PaymentMethodData.Blik;
/**
* If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
*/
boleto?: PaymentMethodData.Boleto;
/**
* If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
*/
cashapp?: PaymentMethodData.Cashapp;
/**
* If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
*/
crypto?: PaymentMethodData.Crypto;
/**
* If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
*/
customer_balance?: PaymentMethodData.CustomerBalance;
/**
* If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
*/
eps?: PaymentMethodData.Eps;
/**
* If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
*/
fpx?: PaymentMethodData.Fpx;
/**
* If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
*/
giropay?: PaymentMethodData.Giropay;
/**
* If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
*/
grabpay?: PaymentMethodData.Grabpay;
/**
* If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
*/
ideal?: PaymentMethodData.Ideal;
/**
* If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
*/
interac_present?: PaymentMethodData.InteracPresent;
/**
* If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
*/
kakao_pay?: PaymentMethodData.KakaoPay;
/**
* If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
*/
klarna?: PaymentMethodData.Klarna;
/**
* If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
*/
konbini?: PaymentMethodData.Konbini;
/**
* If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
*/
kr_card?: PaymentMethodData.KrCard;
/**
* If this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
*/
link?: PaymentMethodData.Link;
/**
* If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
*/
mb_way?: PaymentMethodData.MbWay;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
/**
* If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
*/
mobilepay?: PaymentMethodData.Mobilepay;
/**
* If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
*/
multibanco?: PaymentMethodData.Multibanco;
/**
* If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
*/
naver_pay?: PaymentMethodData.NaverPay;
/**
* If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
*/
nz_bank_account?: PaymentMethodData.NzBankAccount;
/**
* If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
*/
oxxo?: PaymentMethodData.Oxxo;
/**
* If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
*/
p24?: PaymentMethodData.P24;
/**
* If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
*/
pay_by_bank?: PaymentMethodData.PayByBank;
/**
* If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
*/
payco?: PaymentMethodData.Payco;
/**
* If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
*/
paynow?: PaymentMethodData.Paynow;
/**
* If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
*/
paypal?: PaymentMethodData.Paypal;
/**
* If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
*/
payto?: PaymentMethodData.Payto;
/**
* If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
*/
pix?: PaymentMethodData.Pix;
/**
* If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
*/
promptpay?: PaymentMethodData.Promptpay;
/**
* Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.
*/
radar_options?: PaymentMethodData.RadarOptions;
/**
* If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
*/
revolut_pay?: PaymentMethodData.RevolutPay;
/**
* If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
*/
samsung_pay?: PaymentMethodData.SamsungPay;
/**
* If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
*/
satispay?: PaymentMethodData.Satispay;
/**
* If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
*/
scalapay?: PaymentMethodData.Scalapay;
/**
* If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
*/
sepa_debit?: PaymentMethodData.SepaDebit;
/**
* If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
*/
sofort?: PaymentMethodData.Sofort;
/**
* If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method.
*/
sunbit?: PaymentMethodData.Sunbit;
/**
* If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
*/
swish?: PaymentMethodData.Swish;
/**
* If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
*/
twint?: PaymentMethodData.Twint;
/**
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: PaymentMethodData.Type;
/**
* If this is a `upi` PaymentMethod, this hash contains details about the UPI payment method.
*/
upi?: PaymentMethodData.Upi;
/**
* If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
*/
us_bank_account?: PaymentMethodData.UsBankAccount;
/**
* If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
*/
wechat_pay?: PaymentMethodData.WechatPay;
/**
* If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
*/
zip?: PaymentMethodData.Zip;
}
interface PaymentMethodOptions {
/**
* Configuration for any card payments confirmed using this ConfirmationToken.
*/
card?: PaymentMethodOptions.Card;
}
type SetupFutureUsage = 'off_session' | 'on_session' | OtherString;
interface Shipping {
/**
* Shipping address
*/
address: AddressParam;
/**
* Recipient name.
*/
name: string;
/**
* Recipient phone (including extension)
*/
phone?: Emptyable<string>;
}
namespace PaymentMethodData {
interface AcssDebit {
/**
* Customer's bank account number.
*/
account_number: string;
/**
* Institution number of the customer's bank.
*/
institution_number: string;
/**
* Transit number of the customer's bank.
*/
transit_number: string;
}
interface Affirm {
}
interface AfterpayClearpay {
}
interface Alipay {
}
type AllowRedisplay = 'always' | 'limited' | 'unspecified' | OtherString;
interface Alma {
}
interface AmazonPay {
}
interface AuBecsDebit {
/**
* The account number for the bank account.
*/
account_number: string;
/**
* Bank-State-Branch number of the bank account.
*/
bsb_number: string;
}
interface BacsDebit {
/**
* Account number of the bank account that the funds will be debited from.
*/
account_number?: string;
/**
* Sort code of the bank account. (e.g., `10-20-30`)
*/
sort_code?: string;
}
interface Bancontact {
}
interface Billie {
}
interface BillingDetails {
/**
* Billing address.
*/
address?: Emptyable<AddressParam>;
/**
* Email address.
*/
email?: Emptyable<string>;
/**
* Full name.
*/
name?: Emptyable<string>;
/**
* Billing phone number (including extension).
*/
phone?: Emptyable<string>;
/**
* Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
*/
tax_id?: string;
}
interface Bizum {
}
interface Blik {
}
interface Boleto {
/**
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
*/
tax_id: string;
}
interface Cashapp {
}
interface Crypto {
}
interface CustomerBalance {
}
interface Eps {
/**
* The customer's bank.
*/
bank?: Eps.Bank;
}
interface Fpx {
/**
* Account holder type for FPX transaction
*/
account_holder_type?: Fpx.AccountHolderType;
/**
* The customer's bank.
*/
bank: Fpx.Bank;
}
interface Giropay {
}
interface Grabpay {
}
interface Ideal {
/**
* The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
*/
bank?: Ideal.Bank;
}
interface InteracPresent {
}
interface KakaoPay {
}
interface Klarna {
/**
* Customer's date of birth
*/
dob?: Klarna.Dob;
}
interface Konbini {
}
interface KrCard {
}
interface Link {
}
interface MbWay {
}
interface Mobilepay {
}
interface Multibanco {
}
interface NaverPay {
/**
* Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
*/
funding?: NaverPay.Funding;
}
interface NzBankAccount {
/**
* The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
*/
account_holder_name?: string;
/**
* The account number for the bank account.
*/
account_number: string;
/**
* The numeric code for the bank account's bank.
*/
bank_code: string;
/**
* The numeric code for the bank account's bank branch.
*/
branch_code: string;
reference?: string;
/**
* The suffix of the bank account number.
*/
suffix: string;
}
interface Oxxo {
}
interface P24 {
/**
* The customer's bank.
*/
bank?: P24.Bank;
}
interface PayByBank {
}
interface Payco {
}
interface Paynow {
}
interface Paypal {
}
interface Payto {
/**
* The account number for the bank account.
*/
account_number?: string;
/**
* Bank-State-Branch number of the bank account.
*/
bsb_number?: string;
/**
* The PayID alias for the bank account.
*/
pay_id?: string;
}
interface Pix {
}
interface Promptpay {
}
interface RadarOptions {
/**
* A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
*/
session?: string;
}
interface RevolutPay {
}
interface SamsungPay {
}
interface Satispay {
}
interface Scalapay {
}
interface SepaDebit {
/**
* IBAN of the bank account.
*/
iban: string;
}
interface Sofort {
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
country: Sofort.Country;
}
interface Sunbit {
}
interface Swish {
}
interface Twint {
}
type Type = 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'bizum' | 'blik' | 'boleto' | 'cashapp' | 'crypto' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'scalapay' | 'sepa_debit' | 'sofort' | 'sunbit' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay' | 'zip' | OtherString;
interface Upi {
/**
* Configuration options for setting up an eMandate
*/
mandate_options?: Upi.MandateOptions;
}
interface UsBankAccount {
/**
* Account holder type: individual or company.
*/
account_holder_type?: UsBankAccount.AccountHolderType;
/**
* Account number of the bank account.
*/
account_number?: string;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type?: UsBankAccount.AccountType;
/**
* The ID of a Financial Connections Account to use as a payment method.
*/
financial_connections_account?: string;
/**
* Routing number of the bank account.
*/
routing_number?: string;
}
interface WechatPay {
}
interface Zip {
}
namespace Eps {
type Bank = 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' | 'hypo_alpeadriabank_international_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'marchfelder_bank' | 'oberbank_ag' | 'raiffeisen_bankengruppe_osterreich' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau';
}
namespace Fpx {
type AccountHolderType = 'company' | 'individual';
type Bank = 'affin_bank' | 'agrobank' | 'alliance_bank' | 'ambank' | 'bank_islam' | 'bank_muamalat' | 'bank_of_china' | 'bank_rakyat' | 'bnp_paribas' | 'bsn' | 'cimb' | 'citibank' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | 'mbsb_bank' | 'ocbc' | 'pb_enterprise' | 'public_bank' | 'rhb' | 'standard_chartered' | 'uob';
}
namespace Ideal {
type Bank = 'abn_amro' | 'adyen' | 'asn_bank' | 'bunq' | 'buut' | 'finom' | 'handelsbanken' | 'ing' | 'knab' | 'mollie' | 'moneyou' | 'n26' | 'nn' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'yoursafe';
}
namespace Klarna {
interface Dob {
/**
* The day of birth, between 1 and 31.
*/
day: number;
/**
* The month of birth, between 1 and 12.
*/
month: number;
/**
* The four-digit year of birth.
*/
year: number;
}
}
namespace NaverPay {
type Funding = 'card' | 'points' | OtherString;
}
namespace P24 {
type Bank = 'alior_bank' | 'bank_millennium' | 'bank_nowy_bfg_sa' | 'bank_pekao_sa' | 'banki_spbdzielcze' | 'blik' | 'bnp_paribas' | 'boz' | 'citi_handlowy' | 'credit_agricole' | 'envelobank' | 'etransfer_pocztowy24' | 'getin_bank' | 'ideabank' | 'ing' | 'inteligo' | 'mbank_mtransfer' | 'nest_przelew' | 'noble_pay' | 'pbac_z_ipko' | 'plus_bank' | 'santander_przelew24' | 'tmobile_usbugi_bankowe' | 'toyota_bank' | 'velobank' | 'volkswagen_bank' | OtherString;
}
namespace Sofort {
type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' | OtherString;
}
namespace Upi {
interface MandateOptions {
/**
* Amount to be charged for future payments.
*/
amount?: number;
/**
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
*/
amount_type?: MandateOptions.AmountType;
/**
* A description of the mandate or subscription that is meant to be displayed to the customer.
*/
description?: string;
/**
* End date of the mandate or subscription.
*/
end_date?: number;
}
namespace MandateOptions {
type AmountType = 'fixed' | 'maximum' | OtherString;
}
}
namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual' | OtherString;
type AccountType = 'checking' | 'savings' | OtherString;
}
}
namespace PaymentMethodOptions {
interface Card {
/**
* Installment configuration for payments confirmed using this ConfirmationToken.
*/
installments?: Card.Installments;
}
namespace Card {
interface Installments {
/**
* The selected installment plan to use for this payment attempt.
* This parameter can only be provided during confirmation.
*/
plan: Installments.Plan;
}
namespace Installments {
interface Plan {
/**
* For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
*/
count?: number;
/**
* For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
* One of `month`.
*/
interval?: 'month';
/**
* Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
*/
type: Plan.Type;
}
namespace Plan {
type Type = 'bonus' | 'fixed_count' | 'revolving' | OtherString;
}
}
}
}
}
}
+11
View File
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../StripeResource.js';
export class ConfirmationTokenResource extends StripeResource {
/**
* Creates a test mode Confirmation Token server side for your integration tests.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/test_helpers/confirmation_tokens', params, options);
}
}
//# sourceMappingURL=ConfirmationTokens.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ConfirmationTokens.js","sourceRoot":"","sources":["../../../src/resources/TestHelpers/ConfirmationTokens.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAUvD,MAAM,OAAO,yBAA0B,SAAQ,cAAc;IAC3D;;OAEG;IACH,MAAM,CACJ,MAAkD,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sCAAsC,EACtC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
+29
View File
@@ -0,0 +1,29 @@
import { StripeResource } from '../../StripeResource.js';
import { CustomerCashBalanceTransaction } from './../CustomerCashBalanceTransactions.js';
import { RequestOptions, Response } from '../../lib.js';
export declare class CustomerResource extends StripeResource {
/**
* Create an incoming testmode bank transfer
*/
fundCashBalance(id: string, params: TestHelpers.CustomerFundCashBalanceParams, options?: RequestOptions): Promise<Response<CustomerCashBalanceTransaction>>;
}
export declare namespace TestHelpers {
interface CustomerFundCashBalanceParams {
/**
* Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal 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;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://docs.stripe.com/payments/customer-balance/reconciliation) applies to different user inputs.
*/
reference?: string;
}
}
+11
View File
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../StripeResource.js';
export class CustomerResource extends StripeResource {
/**
* Create an incoming testmode bank transfer
*/
fundCashBalance(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/customers/${encodeURIComponent(id)}/fund_cash_balance`, params, options);
}
}
//# sourceMappingURL=Customers.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"Customers.js","sourceRoot":"","sources":["../../../src/resources/TestHelpers/Customers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAIvD,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IAClD;;OAEG;IACH,eAAe,CACb,EAAU,EACV,MAAiD,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,8BAA8B,kBAAkB,CAAC,EAAE,CAAC,oBAAoB,EACxE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,806 @@
import { StripeResource } from '../../../StripeResource.js';
import { Authorization } from './../../Issuing/Authorizations.js';
import { OtherString, Decimal } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class AuthorizationResource extends StripeResource {
/**
* Create a test-mode authorization.
*/
create(params: TestHelpers.Issuing.AuthorizationCreateParams, options?: RequestOptions): Promise<Response<Authorization>>;
/**
* Capture a test-mode authorization.
*/
capture(id: string, params?: TestHelpers.Issuing.AuthorizationCaptureParams, options?: RequestOptions): Promise<Response<Authorization>>;
/**
* Expire a test-mode Authorization.
*/
expire(id: string, params?: TestHelpers.Issuing.AuthorizationExpireParams, options?: RequestOptions): Promise<Response<Authorization>>;
/**
* Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
*/
finalizeAmount(id: string, params: TestHelpers.Issuing.AuthorizationFinalizeAmountParams, options?: RequestOptions): Promise<Response<Authorization>>;
/**
* Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
*/
respond(id: string, params: TestHelpers.Issuing.AuthorizationRespondParams, options?: RequestOptions): Promise<Response<Authorization>>;
/**
* Increment a test-mode Authorization.
*/
increment(id: string, params: TestHelpers.Issuing.AuthorizationIncrementParams, options?: RequestOptions): Promise<Response<Authorization>>;
/**
* Reverse a test-mode Authorization.
*/
reverse(id: string, params?: TestHelpers.Issuing.AuthorizationReverseParams, options?: RequestOptions): Promise<Response<Authorization>>;
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationCreateParams {
/**
* Card associated with this authorization.
*/
card: string;
/**
* The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
amount?: number;
/**
* Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
amount_details?: AuthorizationCreateParams.AmountDetails;
/**
* How the card details were provided. Defaults to online.
*/
authorization_method?: AuthorizationCreateParams.AuthorizationMethod;
/**
* The currency of the authorization. If not provided, defaults to the currency of the card. 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;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Fleet-specific information for authorizations using Fleet cards.
*/
fleet?: AuthorizationCreateParams.Fleet;
/**
* Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules.
*/
fraud_disputability_likelihood?: AuthorizationCreateParams.FraudDisputabilityLikelihood;
/**
* Information about fuel that was purchased with this transaction.
*/
fuel?: AuthorizationCreateParams.Fuel;
/**
* If set `true`, you may provide [amount](https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
*/
is_amount_controllable?: boolean;
/**
* The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
merchant_amount?: number;
/**
* The currency of the authorization. If not provided, defaults to the currency of the card. 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;
/**
* Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
*/
merchant_data?: AuthorizationCreateParams.MerchantData;
/**
* Details about the authorization, such as identifiers, set by the card network.
*/
network_data?: AuthorizationCreateParams.NetworkData;
/**
* Stripe's assessment of the fraud risk for this authorization.
*/
risk_assessment?: AuthorizationCreateParams.RiskAssessment;
/**
* Verifications that Stripe performed on information that the cardholder provided to the merchant.
*/
verification_data?: AuthorizationCreateParams.VerificationData;
/**
* 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.
*/
wallet?: AuthorizationCreateParams.Wallet;
}
namespace AuthorizationCreateParams {
interface AmountDetails {
/**
* The ATM withdrawal fee.
*/
atm_fee?: number;
/**
* The amount of cash requested by the cardholder.
*/
cashback_amount?: number;
}
type AuthorizationMethod = 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe' | OtherString;
interface Fleet {
/**
* Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
*/
cardholder_prompt_data?: Fleet.CardholderPromptData;
/**
* The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
*/
purchase_type?: Fleet.PurchaseType;
/**
* More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
*/
reported_breakdown?: Fleet.ReportedBreakdown;
/**
* The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
*/
service_type?: Fleet.ServiceType;
}
type FraudDisputabilityLikelihood = 'neutral' | 'unknown' | 'very_likely' | 'very_unlikely' | OtherString;
interface Fuel {
/**
* [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
*/
industry_product_code?: string;
/**
* The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
*/
quantity_decimal?: Decimal;
/**
* The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
*/
type?: Fuel.Type;
/**
* The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
*/
unit?: Fuel.Unit;
/**
* The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
*/
unit_cost_decimal?: Decimal;
}
interface MerchantData {
/**
* A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values.
*/
category?: MerchantData.Category;
/**
* City where the seller is located
*/
city?: string;
/**
* Country where the seller is located
*/
country?: string;
/**
* Name of the seller
*/
name?: string;
/**
* Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
*/
network_id?: string;
/**
* Postal code where the seller is located
*/
postal_code?: string;
/**
* State where the seller is located
*/
state?: string;
/**
* An ID assigned by the seller to the location of the sale.
*/
terminal_id?: string;
/**
* URL provided by the merchant on a 3DS request
*/
url?: string;
}
interface NetworkData {
/**
* Identifier assigned to the acquirer by the card network.
*/
acquiring_institution_id?: string;
}
interface RiskAssessment {
/**
* Stripe's assessment of this authorization's likelihood of being card testing activity.
*/
card_testing_risk?: RiskAssessment.CardTestingRisk;
/**
* Stripe's assessment of this authorization's likelihood to be fraudulent.
*/
fraud_risk?: RiskAssessment.FraudRisk;
/**
* The dispute risk of the merchant (the seller on a purchase) on an authorization based on all Stripe Issuing activity.
*/
merchant_dispute_risk?: RiskAssessment.MerchantDisputeRisk;
}
interface VerificationData {
/**
* Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
*/
address_line1_check?: VerificationData.AddressLine1Check;
/**
* Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`.
*/
address_postal_code_check?: VerificationData.AddressPostalCodeCheck;
/**
* The exemption applied to this authorization.
*/
authentication_exemption?: VerificationData.AuthenticationExemption;
/**
* Whether the cardholder provided a CVC and if it matched Stripe's record.
*/
cvc_check?: VerificationData.CvcCheck;
/**
* Whether the cardholder provided an expiry date and if it matched Stripe's record.
*/
expiry_check?: VerificationData.ExpiryCheck;
/**
* 3D Secure details.
*/
three_d_secure?: VerificationData.ThreeDSecure;
}
type Wallet = 'apple_pay' | 'google_pay' | 'samsung_pay' | OtherString;
namespace Fleet {
interface CardholderPromptData {
/**
* Driver ID.
*/
driver_id?: string;
/**
* Odometer reading.
*/
odometer?: number;
/**
* An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
*/
unspecified_id?: string;
/**
* User ID.
*/
user_id?: string;
/**
* Vehicle number.
*/
vehicle_number?: string;
}
type PurchaseType = 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase';
interface ReportedBreakdown {
/**
* Breakdown of fuel portion of the purchase.
*/
fuel?: ReportedBreakdown.Fuel;
/**
* Breakdown of non-fuel portion of the purchase.
*/
non_fuel?: ReportedBreakdown.NonFuel;
/**
* Information about tax included in this transaction.
*/
tax?: ReportedBreakdown.Tax;
}
type ServiceType = 'full_service' | 'non_fuel_transaction' | 'self_service';
namespace ReportedBreakdown {
interface Fuel {
/**
* Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface NonFuel {
/**
* Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface Tax {
/**
* Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
local_amount_decimal?: Decimal;
/**
* Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
national_amount_decimal?: Decimal;
}
}
}
namespace Fuel {
type Type = 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super';
type Unit = 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon';
}
namespace MerchantData {
type Category = 'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_buLine truncated
}
namespace RiskAssessment {
interface CardTestingRisk {
/**
* The % of declines due to a card number not existing in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of card testing activity, meaning bad actors may be attempting different card number combinations to guess a correct one. Takes on values between 0 and 100.
*/
invalid_account_number_decline_rate_past_hour?: number;
/**
* The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100.
*/
invalid_credentials_decline_rate_past_hour?: number;
/**
* The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour.
*/
level: CardTestingRisk.Level;
}
interface FraudRisk {
/**
* Stripe's assessment of the likelihood of fraud on an authorization.
*/
level: FraudRisk.Level;
/**
* Stripe's numerical model score assessing the likelihood of fraudulent activity. A higher score means a higher likelihood of fraudulent activity, and anything above 25 is considered high risk.
*/
score?: number;
}
interface MerchantDisputeRisk {
/**
* The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100.
*/
dispute_rate?: number;
/**
* The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing.
*/
level: MerchantDisputeRisk.Level;
}
namespace CardTestingRisk {
type Level = 'elevated' | 'highest' | 'low' | 'normal' | 'not_assessed' | 'unknown' | OtherString;
}
namespace FraudRisk {
type Level = 'elevated' | 'highest' | 'low' | 'normal' | 'not_assessed' | 'unknown' | OtherString;
}
namespace MerchantDisputeRisk {
type Level = 'elevated' | 'highest' | 'low' | 'normal' | 'not_assessed' | 'unknown' | OtherString;
}
}
namespace VerificationData {
type AddressLine1Check = 'match' | 'mismatch' | 'not_provided' | OtherString;
type AddressPostalCodeCheck = 'match' | 'mismatch' | 'not_provided' | OtherString;
interface AuthenticationExemption {
/**
* The entity that requested the exemption, either the acquiring merchant or the Issuing user.
*/
claimed_by: AuthenticationExemption.ClaimedBy;
/**
* The specific exemption claimed for this authorization.
*/
type: AuthenticationExemption.Type;
}
type CvcCheck = 'match' | 'mismatch' | 'not_provided' | OtherString;
type ExpiryCheck = 'match' | 'mismatch' | 'not_provided' | OtherString;
interface ThreeDSecure {
/**
* The outcome of the 3D Secure authentication request.
*/
result: ThreeDSecure.Result;
}
namespace AuthenticationExemption {
type ClaimedBy = 'acquirer' | 'issuer' | OtherString;
type Type = 'low_value_transaction' | 'transaction_risk_analysis' | 'unknown' | OtherString;
}
namespace ThreeDSecure {
type Result = 'attempt_acknowledged' | 'authenticated' | 'failed' | 'required' | OtherString;
}
}
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationCaptureParams {
/**
* The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
capture_amount?: number;
/**
* Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.
*/
close_authorization?: boolean;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Additional purchase information that is optionally provided by the merchant.
*/
purchase_details?: AuthorizationCaptureParams.PurchaseDetails;
}
namespace AuthorizationCaptureParams {
interface PurchaseDetails {
/**
* Fleet-specific information for transactions using Fleet cards.
*/
fleet?: PurchaseDetails.Fleet;
/**
* Information about the flight that was purchased with this transaction.
*/
flight?: PurchaseDetails.Flight;
/**
* Information about fuel that was purchased with this transaction.
*/
fuel?: PurchaseDetails.Fuel;
/**
* Information about lodging that was purchased with this transaction.
*/
lodging?: PurchaseDetails.Lodging;
/**
* The line items in the purchase.
*/
receipt?: Array<PurchaseDetails.Receipt>;
/**
* A merchant-specific order number.
*/
reference?: string;
}
namespace PurchaseDetails {
interface Fleet {
/**
* Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
*/
cardholder_prompt_data?: Fleet.CardholderPromptData;
/**
* The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
*/
purchase_type?: Fleet.PurchaseType;
/**
* More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
*/
reported_breakdown?: Fleet.ReportedBreakdown;
/**
* The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
*/
service_type?: Fleet.ServiceType;
}
interface Flight {
/**
* The time that the flight departed.
*/
departure_at?: number;
/**
* The name of the passenger.
*/
passenger_name?: string;
/**
* Whether the ticket is refundable.
*/
refundable?: boolean;
/**
* The legs of the trip.
*/
segments?: Array<Flight.Segment>;
/**
* The travel agency that issued the ticket.
*/
travel_agency?: string;
}
interface Fuel {
/**
* [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
*/
industry_product_code?: string;
/**
* The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
*/
quantity_decimal?: Decimal;
/**
* The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
*/
type?: Fuel.Type;
/**
* The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
*/
unit?: Fuel.Unit;
/**
* The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
*/
unit_cost_decimal?: Decimal;
}
interface Lodging {
/**
* The time of checking into the lodging.
*/
check_in_at?: number;
/**
* The number of nights stayed at the lodging.
*/
nights?: number;
}
interface Receipt {
description?: string;
quantity?: Decimal;
total?: number;
unit_cost?: number;
}
namespace Fleet {
interface CardholderPromptData {
/**
* Driver ID.
*/
driver_id?: string;
/**
* Odometer reading.
*/
odometer?: number;
/**
* An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
*/
unspecified_id?: string;
/**
* User ID.
*/
user_id?: string;
/**
* Vehicle number.
*/
vehicle_number?: string;
}
type PurchaseType = 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase';
interface ReportedBreakdown {
/**
* Breakdown of fuel portion of the purchase.
*/
fuel?: ReportedBreakdown.Fuel;
/**
* Breakdown of non-fuel portion of the purchase.
*/
non_fuel?: ReportedBreakdown.NonFuel;
/**
* Information about tax included in this transaction.
*/
tax?: ReportedBreakdown.Tax;
}
type ServiceType = 'full_service' | 'non_fuel_transaction' | 'self_service';
namespace ReportedBreakdown {
interface Fuel {
/**
* Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface NonFuel {
/**
* Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface Tax {
/**
* Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
local_amount_decimal?: Decimal;
/**
* Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
national_amount_decimal?: Decimal;
}
}
}
namespace Flight {
interface Segment {
/**
* The three-letter IATA airport code of the flight's destination.
*/
arrival_airport_code?: string;
/**
* The airline carrier code.
*/
carrier?: string;
/**
* The three-letter IATA airport code that the flight departed from.
*/
departure_airport_code?: string;
/**
* The flight number.
*/
flight_number?: string;
/**
* The flight's service class.
*/
service_class?: string;
/**
* Whether a stopover is allowed on this flight.
*/
stopover_allowed?: boolean;
}
}
namespace Fuel {
type Type = 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super';
type Unit = 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon';
}
}
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationExpireParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationFinalizeAmountParams {
/**
* The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
final_amount: number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Fleet-specific information for authorizations using Fleet cards.
*/
fleet?: AuthorizationFinalizeAmountParams.Fleet;
/**
* Information about fuel that was purchased with this transaction.
*/
fuel?: AuthorizationFinalizeAmountParams.Fuel;
}
namespace AuthorizationFinalizeAmountParams {
interface Fleet {
/**
* Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
*/
cardholder_prompt_data?: Fleet.CardholderPromptData;
/**
* The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
*/
purchase_type?: Fleet.PurchaseType;
/**
* More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
*/
reported_breakdown?: Fleet.ReportedBreakdown;
/**
* The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
*/
service_type?: Fleet.ServiceType;
}
interface Fuel {
/**
* [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
*/
industry_product_code?: string;
/**
* The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
*/
quantity_decimal?: Decimal;
/**
* The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
*/
type?: Fuel.Type;
/**
* The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
*/
unit?: Fuel.Unit;
/**
* The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
*/
unit_cost_decimal?: Decimal;
}
namespace Fleet {
interface CardholderPromptData {
/**
* Driver ID.
*/
driver_id?: string;
/**
* Odometer reading.
*/
odometer?: number;
/**
* An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
*/
unspecified_id?: string;
/**
* User ID.
*/
user_id?: string;
/**
* Vehicle number.
*/
vehicle_number?: string;
}
type PurchaseType = 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase';
interface ReportedBreakdown {
/**
* Breakdown of fuel portion of the purchase.
*/
fuel?: ReportedBreakdown.Fuel;
/**
* Breakdown of non-fuel portion of the purchase.
*/
non_fuel?: ReportedBreakdown.NonFuel;
/**
* Information about tax included in this transaction.
*/
tax?: ReportedBreakdown.Tax;
}
type ServiceType = 'full_service' | 'non_fuel_transaction' | 'self_service';
namespace ReportedBreakdown {
interface Fuel {
/**
* Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface NonFuel {
/**
* Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface Tax {
/**
* Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
local_amount_decimal?: Decimal;
/**
* Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
national_amount_decimal?: Decimal;
}
}
}
namespace Fuel {
type Type = 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super';
type Unit = 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon';
}
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationIncrementParams {
/**
* The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
increment_amount: number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* If set `true`, you may provide [amount](https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
*/
is_amount_controllable?: boolean;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationRespondParams {
/**
* Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).
*/
confirmed: boolean;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface AuthorizationReverseParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
reverse_amount?: number;
}
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1 @@
{"version":3,"file":"Authorizations.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Issuing/Authorizations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AE,gBAAgB,EAAC;oDAC9C,uBAAuB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;iDAClD;6CACF;yCACF;qCACF;iCACF;6BACF;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,MAAM,EAAE;oCACN,gBAAgB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;oCAC1C,iBAAiB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;iCAC5C;6BACF;4BACD,OAAO,EAAE;gCACP,IAAI,EAAE,OAAO;gCACb,OAAO,EAAE;oCACP,IAAI,EAAE,QAAQ;oCACd,MAAM,EAAE,EAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,EAAC;iCAC7C;6BACF;yBACF;qBACF;iBACF;aACF;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE;oBACN,KAAK,EAAE;wBACL,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACLine truncated
+75
View File
@@ -0,0 +1,75 @@
import { StripeResource } from '../../../StripeResource.js';
import { Card } from './../../Issuing/Cards.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class CardResource extends StripeResource {
/**
* Updates the shipping status of the specified Issuing Card object to delivered.
*/
deliverCard(id: string, params?: TestHelpers.Issuing.CardDeliverCardParams, options?: RequestOptions): Promise<Response<Card>>;
/**
* Updates the shipping status of the specified Issuing Card object to failure.
*/
failCard(id: string, params?: TestHelpers.Issuing.CardFailCardParams, options?: RequestOptions): Promise<Response<Card>>;
/**
* Updates the shipping status of the specified Issuing Card object to returned.
*/
returnCard(id: string, params?: TestHelpers.Issuing.CardReturnCardParams, options?: RequestOptions): Promise<Response<Card>>;
/**
* Updates the shipping status of the specified Issuing Card object to shipped.
*/
shipCard(id: string, params?: TestHelpers.Issuing.CardShipCardParams, options?: RequestOptions): Promise<Response<Card>>;
/**
* Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
*/
submitCard(id: string, params?: TestHelpers.Issuing.CardSubmitCardParams, options?: RequestOptions): Promise<Response<Card>>;
}
export declare namespace TestHelpers {
namespace Issuing {
interface CardDeliverCardParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface CardFailCardParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface CardReturnCardParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface CardShipCardParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface CardSubmitCardParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
+35
View File
@@ -0,0 +1,35 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class CardResource extends StripeResource {
/**
* Updates the shipping status of the specified Issuing Card object to delivered.
*/
deliverCard(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/cards/${encodeURIComponent(id)}/shipping/deliver`, params, options);
}
/**
* Updates the shipping status of the specified Issuing Card object to failure.
*/
failCard(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/cards/${encodeURIComponent(id)}/shipping/fail`, params, options);
}
/**
* Updates the shipping status of the specified Issuing Card object to returned.
*/
returnCard(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/cards/${encodeURIComponent(id)}/shipping/return`, params, options);
}
/**
* Updates the shipping status of the specified Issuing Card object to shipped.
*/
shipCard(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/cards/${encodeURIComponent(id)}/shipping/ship`, params, options);
}
/**
* Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
*/
submitCard(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/cards/${encodeURIComponent(id)}/shipping/submit`, params, options);
}
}
//# sourceMappingURL=Cards.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Issuing/Cards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAI1D,MAAM,OAAO,YAAa,SAAQ,cAAc;IAC9C;;OAEG;IACH,WAAW,CACT,EAAU,EACV,MAAkD,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAClD,EAAE,CACH,mBAAmB,EACpB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAAC,EAAE,CAAC,gBAAgB,EACxE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,UAAU,CACR,EAAU,EACV,MAAiD,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAClD,EAAE,CACH,kBAAkB,EACnB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAAC,EAAE,CAAC,gBAAgB,EACxE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,UAAU,CACR,EAAU,EACV,MAAiD,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAClD,EAAE,CACH,kBAAkB,EACnB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,68 @@
import { StripeResource } from '../../../StripeResource.js';
import { PersonalizationDesign } from './../../Issuing/PersonalizationDesigns.js';
import { OtherString } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class PersonalizationDesignResource extends StripeResource {
/**
* Updates the status of the specified testmode personalization design object to active.
*/
activate(id: string, params?: TestHelpers.Issuing.PersonalizationDesignActivateParams, options?: RequestOptions): Promise<Response<PersonalizationDesign>>;
/**
* Updates the status of the specified testmode personalization design object to inactive.
*/
deactivate(id: string, params?: TestHelpers.Issuing.PersonalizationDesignDeactivateParams, options?: RequestOptions): Promise<Response<PersonalizationDesign>>;
/**
* Updates the status of the specified testmode personalization design object to rejected.
*/
reject(id: string, params: TestHelpers.Issuing.PersonalizationDesignRejectParams, options?: RequestOptions): Promise<Response<PersonalizationDesign>>;
}
export declare namespace TestHelpers {
namespace Issuing {
interface PersonalizationDesignActivateParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface PersonalizationDesignDeactivateParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface PersonalizationDesignRejectParams {
/**
* The reason(s) the personalization design was rejected.
*/
rejection_reasons: PersonalizationDesignRejectParams.RejectionReasons;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
namespace PersonalizationDesignRejectParams {
interface RejectionReasons {
/**
* The reason(s) the card logo was rejected.
*/
card_logo?: Array<RejectionReasons.CardLogo>;
/**
* The reason(s) the carrier text was rejected.
*/
carrier_text?: Array<RejectionReasons.CarrierText>;
}
namespace RejectionReasons {
type CardLogo = 'geographic_location' | 'inappropriate' | 'network_name' | 'non_binary_image' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material' | OtherString;
type CarrierText = 'geographic_location' | 'inappropriate' | 'network_name' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material' | OtherString;
}
}
}
}
@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class PersonalizationDesignResource extends StripeResource {
/**
* Updates the status of the specified testmode personalization design object to active.
*/
activate(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/personalization_designs/${encodeURIComponent(id)}/activate`, params, options);
}
/**
* Updates the status of the specified testmode personalization design object to inactive.
*/
deactivate(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/personalization_designs/${encodeURIComponent(id)}/deactivate`, params, options);
}
/**
* Updates the status of the specified testmode personalization design object to rejected.
*/
reject(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/personalization_designs/${encodeURIComponent(id)}/reject`, params, options);
}
}
//# sourceMappingURL=PersonalizationDesigns.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PersonalizationDesigns.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Issuing/PersonalizationDesigns.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAK1D,MAAM,OAAO,6BAA8B,SAAQ,cAAc;IAC/D;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAgE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,oDAAoD,kBAAkB,CACpE,EAAE,CACH,WAAW,EACZ,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,UAAU,CACR,EAAU,EACV,MAAkE,EAClE,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,oDAAoD,kBAAkB,CACpE,EAAE,CACH,aAAa,EACd,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAA6D,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,oDAAoD,kBAAkB,CACpE,EAAE,CACH,SAAS,EACV,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
+582
View File
@@ -0,0 +1,582 @@
import { StripeResource } from '../../../StripeResource.js';
import { Transaction } from './../../Issuing/Transactions.js';
import { Decimal } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class TransactionResource extends StripeResource {
/**
* Refund a test-mode Transaction.
*/
refund(id: string, params?: TestHelpers.Issuing.TransactionRefundParams, options?: RequestOptions): Promise<Response<Transaction>>;
/**
* Allows the user to capture an arbitrary amount, also known as a forced capture.
*/
createForceCapture(params: TestHelpers.Issuing.TransactionCreateForceCaptureParams, options?: RequestOptions): Promise<Response<Transaction>>;
/**
* Allows the user to refund an arbitrary amount, also known as a unlinked refund.
*/
createUnlinkedRefund(params: TestHelpers.Issuing.TransactionCreateUnlinkedRefundParams, options?: RequestOptions): Promise<Response<Transaction>>;
}
export declare namespace TestHelpers {
namespace Issuing {
interface TransactionCreateForceCaptureParams {
/**
* The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
amount: number;
/**
* Card associated with this transaction.
*/
card: string;
/**
* The currency of the capture. If not provided, defaults to the currency of the card. 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;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
*/
merchant_data?: TransactionCreateForceCaptureParams.MerchantData;
/**
* Additional purchase information that is optionally provided by the merchant.
*/
purchase_details?: TransactionCreateForceCaptureParams.PurchaseDetails;
}
namespace TransactionCreateForceCaptureParams {
interface MerchantData {
/**
* A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values.
*/
category?: MerchantData.Category;
/**
* City where the seller is located
*/
city?: string;
/**
* Country where the seller is located
*/
country?: string;
/**
* Name of the seller
*/
name?: string;
/**
* Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
*/
network_id?: string;
/**
* Postal code where the seller is located
*/
postal_code?: string;
/**
* State where the seller is located
*/
state?: string;
/**
* An ID assigned by the seller to the location of the sale.
*/
terminal_id?: string;
/**
* URL provided by the merchant on a 3DS request
*/
url?: string;
}
interface PurchaseDetails {
/**
* Fleet-specific information for transactions using Fleet cards.
*/
fleet?: PurchaseDetails.Fleet;
/**
* Information about the flight that was purchased with this transaction.
*/
flight?: PurchaseDetails.Flight;
/**
* Information about fuel that was purchased with this transaction.
*/
fuel?: PurchaseDetails.Fuel;
/**
* Information about lodging that was purchased with this transaction.
*/
lodging?: PurchaseDetails.Lodging;
/**
* The line items in the purchase.
*/
receipt?: Array<PurchaseDetails.Receipt>;
/**
* A merchant-specific order number.
*/
reference?: string;
}
namespace MerchantData {
type Category = 'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_buLine truncated
}
namespace PurchaseDetails {
interface Fleet {
/**
* Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
*/
cardholder_prompt_data?: Fleet.CardholderPromptData;
/**
* The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
*/
purchase_type?: Fleet.PurchaseType;
/**
* More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
*/
reported_breakdown?: Fleet.ReportedBreakdown;
/**
* The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
*/
service_type?: Fleet.ServiceType;
}
interface Flight {
/**
* The time that the flight departed.
*/
departure_at?: number;
/**
* The name of the passenger.
*/
passenger_name?: string;
/**
* Whether the ticket is refundable.
*/
refundable?: boolean;
/**
* The legs of the trip.
*/
segments?: Array<Flight.Segment>;
/**
* The travel agency that issued the ticket.
*/
travel_agency?: string;
}
interface Fuel {
/**
* [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
*/
industry_product_code?: string;
/**
* The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
*/
quantity_decimal?: Decimal;
/**
* The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
*/
type?: Fuel.Type;
/**
* The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
*/
unit?: Fuel.Unit;
/**
* The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
*/
unit_cost_decimal?: Decimal;
}
interface Lodging {
/**
* The time of checking into the lodging.
*/
check_in_at?: number;
/**
* The number of nights stayed at the lodging.
*/
nights?: number;
}
interface Receipt {
description?: string;
quantity?: Decimal;
total?: number;
unit_cost?: number;
}
namespace Fleet {
interface CardholderPromptData {
/**
* Driver ID.
*/
driver_id?: string;
/**
* Odometer reading.
*/
odometer?: number;
/**
* An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
*/
unspecified_id?: string;
/**
* User ID.
*/
user_id?: string;
/**
* Vehicle number.
*/
vehicle_number?: string;
}
type PurchaseType = 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase';
interface ReportedBreakdown {
/**
* Breakdown of fuel portion of the purchase.
*/
fuel?: ReportedBreakdown.Fuel;
/**
* Breakdown of non-fuel portion of the purchase.
*/
non_fuel?: ReportedBreakdown.NonFuel;
/**
* Information about tax included in this transaction.
*/
tax?: ReportedBreakdown.Tax;
}
type ServiceType = 'full_service' | 'non_fuel_transaction' | 'self_service';
namespace ReportedBreakdown {
interface Fuel {
/**
* Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface NonFuel {
/**
* Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface Tax {
/**
* Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
local_amount_decimal?: Decimal;
/**
* Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
national_amount_decimal?: Decimal;
}
}
}
namespace Flight {
interface Segment {
/**
* The three-letter IATA airport code of the flight's destination.
*/
arrival_airport_code?: string;
/**
* The airline carrier code.
*/
carrier?: string;
/**
* The three-letter IATA airport code that the flight departed from.
*/
departure_airport_code?: string;
/**
* The flight number.
*/
flight_number?: string;
/**
* The flight's service class.
*/
service_class?: string;
/**
* Whether a stopover is allowed on this flight.
*/
stopover_allowed?: boolean;
}
}
namespace Fuel {
type Type = 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super';
type Unit = 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon';
}
}
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface TransactionCreateUnlinkedRefundParams {
/**
* The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
amount: number;
/**
* Card associated with this unlinked refund transaction.
*/
card: string;
/**
* The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
*/
merchant_data?: TransactionCreateUnlinkedRefundParams.MerchantData;
/**
* Additional purchase information that is optionally provided by the merchant.
*/
purchase_details?: TransactionCreateUnlinkedRefundParams.PurchaseDetails;
}
namespace TransactionCreateUnlinkedRefundParams {
interface MerchantData {
/**
* A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values.
*/
category?: MerchantData.Category;
/**
* City where the seller is located
*/
city?: string;
/**
* Country where the seller is located
*/
country?: string;
/**
* Name of the seller
*/
name?: string;
/**
* Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
*/
network_id?: string;
/**
* Postal code where the seller is located
*/
postal_code?: string;
/**
* State where the seller is located
*/
state?: string;
/**
* An ID assigned by the seller to the location of the sale.
*/
terminal_id?: string;
/**
* URL provided by the merchant on a 3DS request
*/
url?: string;
}
interface PurchaseDetails {
/**
* Fleet-specific information for transactions using Fleet cards.
*/
fleet?: PurchaseDetails.Fleet;
/**
* Information about the flight that was purchased with this transaction.
*/
flight?: PurchaseDetails.Flight;
/**
* Information about fuel that was purchased with this transaction.
*/
fuel?: PurchaseDetails.Fuel;
/**
* Information about lodging that was purchased with this transaction.
*/
lodging?: PurchaseDetails.Lodging;
/**
* The line items in the purchase.
*/
receipt?: Array<PurchaseDetails.Receipt>;
/**
* A merchant-specific order number.
*/
reference?: string;
}
namespace MerchantData {
type Category = 'ac_refrigeration_repair' | 'accounting_bookkeeping_services' | 'advertising_services' | 'agricultural_cooperative' | 'airlines_air_carriers' | 'airports_flying_fields' | 'ambulance_services' | 'amusement_parks_carnivals' | 'antique_reproductions' | 'antique_shops' | 'aquariums' | 'architectural_surveying_services' | 'art_dealers_and_galleries' | 'artists_supply_and_craft_shops' | 'auto_and_home_supply_stores' | 'auto_body_repair_shops' | 'auto_paint_shops' | 'auto_service_shops' | 'automated_cash_disburse' | 'automated_fuel_dispensers' | 'automobile_associations' | 'automotive_parts_and_accessories_stores' | 'automotive_tire_stores' | 'bail_and_bond_payments' | 'bakeries' | 'bands_orchestras' | 'barber_and_beauty_shops' | 'betting_casino_gambling' | 'bicycle_shops' | 'billiard_pool_establishments' | 'boat_dealers' | 'boat_rentals_and_leases' | 'book_stores' | 'books_periodicals_and_newspapers' | 'bowling_alleys' | 'bus_lines' | 'business_secretarial_schools' | 'buying_shopping_services' | 'cable_satellite_and_other_pay_television_and_radio' | 'camera_and_photographic_supply_stores' | 'candy_nut_and_confectionery_stores' | 'car_and_truck_dealers_new_used' | 'car_and_truck_dealers_used_only' | 'car_rental_agencies' | 'car_washes' | 'carpentry_services' | 'carpet_upholstery_cleaning' | 'caterers' | 'charitable_and_social_service_organizations_fundraising' | 'chemicals_and_allied_products' | 'child_care_services' | 'childrens_and_infants_wear_stores' | 'chiropodists_podiatrists' | 'chiropractors' | 'cigar_stores_and_stands' | 'civic_social_fraternal_associations' | 'cleaning_and_maintenance' | 'clothing_rental' | 'colleges_universities' | 'commercial_equipment' | 'commercial_footwear' | 'commercial_photography_art_and_graphics' | 'commuter_transport_and_ferries' | 'computer_network_services' | 'computer_programming' | 'computer_repair' | 'computer_software_stores' | 'computers_peripherals_and_software' | 'concrete_work_services' | 'construction_materials' | 'consulting_public_relations' | 'correspondence_schools' | 'cosmetic_stores' | 'counseling_services' | 'country_clubs' | 'courier_services' | 'court_costs' | 'credit_reporting_agencies' | 'cruise_lines' | 'dairy_products_stores' | 'dance_hall_studios_schools' | 'dating_escort_services' | 'dentists_orthodontists' | 'department_stores' | 'detective_agencies' | 'digital_goods_applications' | 'digital_goods_games' | 'digital_goods_large_volume' | 'digital_goods_media' | 'direct_marketing_catalog_merchant' | 'direct_marketing_combination_catalog_and_retail_merchant' | 'direct_marketing_inbound_telemarketing' | 'direct_marketing_insurance_services' | 'direct_marketing_other' | 'direct_marketing_outbound_telemarketing' | 'direct_marketing_subscription' | 'direct_marketing_travel' | 'discount_stores' | 'doctors' | 'door_to_door_sales' | 'drapery_window_covering_and_upholstery_stores' | 'drinking_places' | 'drug_stores_and_pharmacies' | 'drugs_drug_proprietaries_and_druggist_sundries' | 'dry_cleaners' | 'durable_goods' | 'duty_free_stores' | 'eating_places_restaurants' | 'educational_services' | 'electric_razor_stores' | 'electric_vehicle_charging' | 'electrical_parts_and_equipment' | 'electrical_services' | 'electronics_repair_shops' | 'electronics_stores' | 'elementary_secondary_schools' | 'emergency_services_gcas_visa_use_only' | 'employment_temp_agencies' | 'equipment_rental' | 'exterminating_services' | 'family_clothing_stores' | 'fast_food_restaurants' | 'financial_institutions' | 'fines_government_administrative_entities' | 'fireplace_fireplace_screens_and_accessories_stores' | 'floor_covering_stores' | 'florists' | 'florists_supplies_nursery_stock_and_flowers' | 'freezer_and_locker_meat_provisioners' | 'fuel_dealers_non_automotive' | 'funeral_services_crematories' | 'furniture_home_furnishings_and_equipment_stores_except_appliances' | 'furniture_repair_refinishing' | 'furriers_and_fur_shops' | 'general_services' | 'gift_card_novelty_and_souvenir_shops' | 'glass_paint_and_wallpaper_stores' | 'glassware_crystal_stores' | 'golf_courses_public' | 'government_licensed_horse_dog_racing_us_region_only' | 'government_licensed_online_casions_online_gambling_us_region_only' | 'government_owned_lotteries_non_us_region' | 'government_owned_lotteries_us_region_only' | 'government_services' | 'grocery_stores_supermarkets' | 'hardware_equipment_and_supplies' | 'hardware_stores' | 'health_and_beauty_spas' | 'hearing_aids_sales_and_supplies' | 'heating_plumbing_a_c' | 'hobby_toy_and_game_shops' | 'home_supply_warehouse_stores' | 'hospitals' | 'hotels_motels_and_resorts' | 'household_appliance_stores' | 'industrial_supplies' | 'information_retrieval_services' | 'insurance_default' | 'insurance_underwriting_premiums' | 'intra_company_purchases' | 'jewelry_stores_watches_clocks_and_silverware_stores' | 'landscaping_services' | 'laundries' | 'laundry_cleaning_services' | 'legal_services_attorneys' | 'luggage_and_leather_goods_stores' | 'lumber_buLine truncated
}
namespace PurchaseDetails {
interface Fleet {
/**
* Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
*/
cardholder_prompt_data?: Fleet.CardholderPromptData;
/**
* The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
*/
purchase_type?: Fleet.PurchaseType;
/**
* More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
*/
reported_breakdown?: Fleet.ReportedBreakdown;
/**
* The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
*/
service_type?: Fleet.ServiceType;
}
interface Flight {
/**
* The time that the flight departed.
*/
departure_at?: number;
/**
* The name of the passenger.
*/
passenger_name?: string;
/**
* Whether the ticket is refundable.
*/
refundable?: boolean;
/**
* The legs of the trip.
*/
segments?: Array<Flight.Segment>;
/**
* The travel agency that issued the ticket.
*/
travel_agency?: string;
}
interface Fuel {
/**
* [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
*/
industry_product_code?: string;
/**
* The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
*/
quantity_decimal?: Decimal;
/**
* The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
*/
type?: Fuel.Type;
/**
* The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
*/
unit?: Fuel.Unit;
/**
* The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
*/
unit_cost_decimal?: Decimal;
}
interface Lodging {
/**
* The time of checking into the lodging.
*/
check_in_at?: number;
/**
* The number of nights stayed at the lodging.
*/
nights?: number;
}
interface Receipt {
description?: string;
quantity?: Decimal;
total?: number;
unit_cost?: number;
}
namespace Fleet {
interface CardholderPromptData {
/**
* Driver ID.
*/
driver_id?: string;
/**
* Odometer reading.
*/
odometer?: number;
/**
* An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
*/
unspecified_id?: string;
/**
* User ID.
*/
user_id?: string;
/**
* Vehicle number.
*/
vehicle_number?: string;
}
type PurchaseType = 'fuel_and_non_fuel_purchase' | 'fuel_purchase' | 'non_fuel_purchase';
interface ReportedBreakdown {
/**
* Breakdown of fuel portion of the purchase.
*/
fuel?: ReportedBreakdown.Fuel;
/**
* Breakdown of non-fuel portion of the purchase.
*/
non_fuel?: ReportedBreakdown.NonFuel;
/**
* Information about tax included in this transaction.
*/
tax?: ReportedBreakdown.Tax;
}
type ServiceType = 'full_service' | 'non_fuel_transaction' | 'self_service';
namespace ReportedBreakdown {
interface Fuel {
/**
* Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface NonFuel {
/**
* Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
*/
gross_amount_decimal?: Decimal;
}
interface Tax {
/**
* Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
local_amount_decimal?: Decimal;
/**
* Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
*/
national_amount_decimal?: Decimal;
}
}
}
namespace Flight {
interface Segment {
/**
* The three-letter IATA airport code of the flight's destination.
*/
arrival_airport_code?: string;
/**
* The airline carrier code.
*/
carrier?: string;
/**
* The three-letter IATA airport code that the flight departed from.
*/
departure_airport_code?: string;
/**
* The flight number.
*/
flight_number?: string;
/**
* The flight's service class.
*/
service_class?: string;
/**
* Whether a stopover is allowed on this flight.
*/
stopover_allowed?: boolean;
}
}
namespace Fuel {
type Type = 'diesel' | 'other' | 'unleaded_plus' | 'unleaded_regular' | 'unleaded_super';
type Unit = 'charging_minute' | 'imperial_gallon' | 'kilogram' | 'kilowatt_hour' | 'liter' | 'other' | 'pound' | 'us_gallon';
}
}
}
}
}
export declare namespace TestHelpers {
namespace Issuing {
interface TransactionRefundParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
*/
refund_amount?: number;
}
}
}
+378
View File
@@ -0,0 +1,378 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class TransactionResource extends StripeResource {
/**
* Refund a test-mode Transaction.
*/
refund(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/issuing/transactions/${encodeURIComponent(id)}/refund`, params, options, {
responseSchema: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
national_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
});
}
/**
* Allows the user to capture an arbitrary amount, also known as a forced capture.
*/
createForceCapture(params, options) {
return this._makeRequest('POST', '/v1/test_helpers/issuing/transactions/create_force_capture', params, options, {
requestSchema: {
kind: 'object',
fields: {
purchase_details: {
kind: 'object',
fields: {
fleet: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'object',
fields: {
fuel: {
kind: 'object',
fields: {
gross_amount_decimal: { kind: 'decimal_string' },
},
},
non_fuel: {
kind: 'object',
fields: {
gross_amount_decimal: { kind: 'decimal_string' },
},
},
tax: {
kind: 'object',
fields: {
local_amount_decimal: { kind: 'decimal_string' },
national_amount_decimal: { kind: 'decimal_string' },
},
},
},
},
},
},
fuel: {
kind: 'object',
fields: {
quantity_decimal: { kind: 'decimal_string' },
unit_cost_decimal: { kind: 'decimal_string' },
},
},
receipt: {
kind: 'array',
element: {
kind: 'object',
fields: { quantity: { kind: 'decimal_string' } },
},
},
},
},
},
},
responseSchema: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
national_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
});
}
/**
* Allows the user to refund an arbitrary amount, also known as a unlinked refund.
*/
createUnlinkedRefund(params, options) {
return this._makeRequest('POST', '/v1/test_helpers/issuing/transactions/create_unlinked_refund', params, options, {
requestSchema: {
kind: 'object',
fields: {
purchase_details: {
kind: 'object',
fields: {
fleet: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'object',
fields: {
fuel: {
kind: 'object',
fields: {
gross_amount_decimal: { kind: 'decimal_string' },
},
},
non_fuel: {
kind: 'object',
fields: {
gross_amount_decimal: { kind: 'decimal_string' },
},
},
tax: {
kind: 'object',
fields: {
local_amount_decimal: { kind: 'decimal_string' },
national_amount_decimal: { kind: 'decimal_string' },
},
},
},
},
},
},
fuel: {
kind: 'object',
fields: {
quantity_decimal: { kind: 'decimal_string' },
unit_cost_decimal: { kind: 'decimal_string' },
},
},
receipt: {
kind: 'array',
element: {
kind: 'object',
fields: { quantity: { kind: 'decimal_string' } },
},
},
},
},
},
},
responseSchema: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
national_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
});
}
}
//# sourceMappingURL=Transactions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Transactions.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Issuing/Transactions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4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CACd,MAAM,EAAE;4CACN,IAAI,EAAE;gDACJ,IAAI,EAAE,QAAQ;gDACd,MAAM,EAAE;oDACN,oBAAoB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;iDAC/C;6CACF;4CACD,QAAQ,EAAE;gDACR,IAAI,EAAE,QAAQ;gDACd,MAAM,EAAE;oDACN,oBAAoB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;iDAC/C;6CACF;4CACD,GAAG,EAAE;gDACH,IAAI,EAAE,QAAQ;gDACd,MAAM,EAAE;oDACN,oBAAoB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;oDAC9C,uBAAuB,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;iDAClD;6CACF;yCACF;qCACF;iCACF;6BACF;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,MAAM,EAAE;oCACN,gBAAgB,EAAE,Line truncated
+14
View File
@@ -0,0 +1,14 @@
import { Stripe } from '../../../stripe.core.js';
import { AuthorizationResource } from './Authorizations.js';
import { CardResource } from './Cards.js';
import { PersonalizationDesignResource } from './PersonalizationDesigns.js';
import { TransactionResource } from './Transactions.js';
export declare class Issuing {
private readonly stripe;
authorizations: AuthorizationResource;
cards: CardResource;
personalizationDesigns: PersonalizationDesignResource;
transactions: TransactionResource;
constructor(stripe: Stripe);
}
export declare namespace Issuing { }
+15
View File
@@ -0,0 +1,15 @@
// File generated from our OpenAPI spec
import { AuthorizationResource, } from './Authorizations.js';
import { CardResource } from './Cards.js';
import { PersonalizationDesignResource, } from './PersonalizationDesigns.js';
import { TransactionResource, } from './Transactions.js';
export class Issuing {
constructor(stripe) {
this.stripe = stripe;
this.authorizations = new AuthorizationResource(stripe);
this.cards = new CardResource(stripe);
this.personalizationDesigns = new PersonalizationDesignResource(stripe);
this.transactions = new TransactionResource(stripe);
}
}
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Issuing/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAGvC,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAuC,YAAY,EAAC,MAAM,YAAY,CAAC;AAC9E,OAAO,EAEL,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,OAAO,OAAO;IAMlB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,sBAAsB,GAAG,IAAI,6BAA6B,CAAC,MAAM,CAAC,CAAC;QACxE,IAAI,CAAC,YAAY,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;CACF"}
+17
View File
@@ -0,0 +1,17 @@
import { StripeResource } from '../../StripeResource.js';
import { Refund } from './../Refunds.js';
import { RequestOptions, Response } from '../../lib.js';
export declare class RefundResource extends StripeResource {
/**
* Expire a refund with a status of requires_action.
*/
expire(id: string, params?: TestHelpers.RefundExpireParams, options?: RequestOptions): Promise<Response<Refund>>;
}
export declare namespace TestHelpers {
interface RefundExpireParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
+11
View File
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../StripeResource.js';
export class RefundResource extends StripeResource {
/**
* Expire a refund with a status of requires_action.
*/
expire(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/refunds/${encodeURIComponent(id)}/expire`, params, options);
}
}
//# sourceMappingURL=Refunds.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"Refunds.js","sourceRoot":"","sources":["../../../src/resources/TestHelpers/Refunds.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAIvD,MAAM,OAAO,cAAe,SAAQ,cAAc;IAChD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,4BAA4B,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAC3D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
+108
View File
@@ -0,0 +1,108 @@
import { StripeResource } from '../../../StripeResource.js';
import { Reader } from './../../Terminal/Readers.js';
import { OtherString } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class ReaderResource extends StripeResource {
/**
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
*/
presentPaymentMethod(id: string, params?: TestHelpers.Terminal.ReaderPresentPaymentMethodParams, options?: RequestOptions): Promise<Response<Reader>>;
/**
* Use this endpoint to trigger a successful input collection on a simulated reader.
*/
succeedInputCollection(id: string, params?: TestHelpers.Terminal.ReaderSucceedInputCollectionParams, options?: RequestOptions): Promise<Response<Reader>>;
/**
* Use this endpoint to complete an input collection with a timeout error on a simulated reader.
*/
timeoutInputCollection(id: string, params?: TestHelpers.Terminal.ReaderTimeoutInputCollectionParams, options?: RequestOptions): Promise<Response<Reader>>;
}
export declare namespace TestHelpers {
namespace Terminal {
interface ReaderPresentPaymentMethodParams {
/**
* Simulated on-reader tip amount.
*/
amount_tip?: number;
/**
* Simulated data for the card payment method.
*/
card?: ReaderPresentPaymentMethodParams.Card;
/**
* Simulated data for the card_present payment method.
*/
card_present?: ReaderPresentPaymentMethodParams.CardPresent;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Simulated data for the interac_present payment method.
*/
interac_present?: ReaderPresentPaymentMethodParams.InteracPresent;
/**
* Simulated payment type.
*/
type?: ReaderPresentPaymentMethodParams.Type;
}
namespace ReaderPresentPaymentMethodParams {
interface Card {
/**
* Card security code.
*/
cvc?: string;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Two- or four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* The card number, as a string without any separators.
*/
number: string;
}
interface CardPresent {
/**
* The card number, as a string without any separators.
*/
number?: string;
}
interface InteracPresent {
/**
* The Interac card number.
*/
number?: string;
}
type Type = 'card' | 'card_present' | 'interac_present' | OtherString;
}
}
}
export declare namespace TestHelpers {
namespace Terminal {
interface ReaderSucceedInputCollectionParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* This parameter defines the skip behavior for input collection.
*/
skip_non_required_inputs?: ReaderSucceedInputCollectionParams.SkipNonRequiredInputs;
}
namespace ReaderSucceedInputCollectionParams {
type SkipNonRequiredInputs = 'all' | 'none' | OtherString;
}
}
}
export declare namespace TestHelpers {
namespace Terminal {
interface ReaderTimeoutInputCollectionParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
+23
View File
@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class ReaderResource extends StripeResource {
/**
* Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
*/
presentPaymentMethod(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/terminal/readers/${encodeURIComponent(id)}/present_payment_method`, params, options);
}
/**
* Use this endpoint to trigger a successful input collection on a simulated reader.
*/
succeedInputCollection(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/terminal/readers/${encodeURIComponent(id)}/succeed_input_collection`, params, options);
}
/**
* Use this endpoint to complete an input collection with a timeout error on a simulated reader.
*/
timeoutInputCollection(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/terminal/readers/${encodeURIComponent(id)}/timeout_input_collection`, params, options);
}
}
//# sourceMappingURL=Readers.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Readers.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Terminal/Readers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAK1D,MAAM,OAAO,cAAe,SAAQ,cAAc;IAChD;;OAEG;IACH,oBAAoB,CAClB,EAAU,EACV,MAA8D,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,qCAAqC,kBAAkB,CACrD,EAAE,CACH,yBAAyB,EAC1B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,sBAAsB,CACpB,EAAU,EACV,MAAgE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,qCAAqC,kBAAkB,CACrD,EAAE,CACH,2BAA2B,EAC5B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,sBAAsB,CACpB,EAAU,EACV,MAAgE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,qCAAqC,kBAAkB,CACrD,EAAE,CACH,2BAA2B,EAC5B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
+8
View File
@@ -0,0 +1,8 @@
import { Stripe } from '../../../stripe.core.js';
import { ReaderResource } from './Readers.js';
export declare class Terminal {
private readonly stripe;
readers: ReaderResource;
constructor(stripe: Stripe);
}
export declare namespace Terminal { }
+9
View File
@@ -0,0 +1,9 @@
// File generated from our OpenAPI spec
import { ReaderResource, } from './Readers.js';
export class Terminal {
constructor(stripe) {
this.stripe = stripe;
this.readers = new ReaderResource(stripe);
}
}
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Terminal/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAGvC,OAAO,EAEL,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,MAAM,OAAO,QAAQ;IAGnB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACF"}
+144
View File
@@ -0,0 +1,144 @@
import { StripeResource } from '../../StripeResource.js';
import { PaginationParams, OtherString } from '../../shared.js';
import { RequestOptions, Response, ApiListPromise } from '../../lib.js';
export declare class TestClockResource extends StripeResource {
/**
* Deletes a test clock.
*/
del(id: string, params?: TestHelpers.TestClockDeleteParams, options?: RequestOptions): Promise<Response<DeletedTestClock>>;
/**
* Retrieves a test clock.
*/
retrieve(id: string, params?: TestHelpers.TestClockRetrieveParams, options?: RequestOptions): Promise<Response<TestClock>>;
/**
* Returns a list of your test clocks.
*/
list(params?: TestHelpers.TestClockListParams, options?: RequestOptions): ApiListPromise<TestClock>;
/**
* Creates a new test clock that can be attached to new customers and quotes.
*/
create(params: TestHelpers.TestClockCreateParams, options?: RequestOptions): Promise<Response<TestClock>>;
/**
* Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
*/
advance(id: string, params: TestHelpers.TestClockAdvanceParams, options?: RequestOptions): Promise<Response<TestClock>>;
}
export interface TestClock {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'test_helpers.test_clock';
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Always true for a deleted object
*/
deleted?: void;
/**
* Time at which this clock is scheduled to auto delete.
*/
deletes_after: number;
/**
* Time at which all objects belonging to this clock are frozen.
*/
frozen_time: number;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* The custom name supplied at creation.
*/
name: string | null;
/**
* The status of the Test Clock.
*/
status: TestClock.Status;
status_details: TestClock.StatusDetails;
}
export interface DeletedTestClock {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'test_helpers.test_clock';
/**
* Always true for a deleted object
*/
deleted: true;
}
export declare namespace TestClock {
type Status = 'advancing' | 'internal_failure' | 'ready' | OtherString;
interface StatusDetails {
advancing?: StatusDetails.Advancing;
}
namespace StatusDetails {
interface Advancing {
/**
* The `frozen_time` that the Test Clock is advancing towards.
*/
target_frozen_time: number;
}
}
}
export declare namespace TestHelpers {
interface TestClockCreateParams {
/**
* The initial frozen time for this test clock.
*/
frozen_time: number;
/**
* Existing customer this test clock will be attached to. Once attached, customers can't be removed from a test clock.
*/
customer?: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* The name for this test clock.
*/
name?: string;
}
}
export declare namespace TestHelpers {
interface TestClockRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace TestHelpers {
interface TestClockListParams extends PaginationParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace TestHelpers {
interface TestClockDeleteParams {
}
}
export declare namespace TestHelpers {
interface TestClockAdvanceParams {
/**
* The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.
*/
frozen_time: number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
+37
View File
@@ -0,0 +1,37 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../StripeResource.js';
export class TestClockResource extends StripeResource {
/**
* Deletes a test clock.
*/
del(id, params, options) {
return this._makeRequest('DELETE', `/v1/test_helpers/test_clocks/${encodeURIComponent(id)}`, params, options);
}
/**
* Retrieves a test clock.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/test_helpers/test_clocks/${encodeURIComponent(id)}`, params, options);
}
/**
* Returns a list of your test clocks.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/test_helpers/test_clocks', params, options, {
methodType: 'list',
});
}
/**
* Creates a new test clock that can be attached to new customers and quotes.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/test_helpers/test_clocks', params, options);
}
/**
* Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
*/
advance(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/test_clocks/${encodeURIComponent(id)}/advance`, params, options);
}
}
//# sourceMappingURL=TestClocks.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"TestClocks.js","sourceRoot":"","sources":["../../../src/resources/TestHelpers/TestClocks.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAIvD,MAAM,OAAO,iBAAkB,SAAQ,cAAc;IACnD;;OAEG;IACH,GAAG,CACD,EAAU,EACV,MAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,QAAQ,EACR,gCAAgC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACxD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,gCAAgC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACxD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,IAAI,CACF,MAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,8BAA8B,EAC9B,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,8BAA8B,EAC9B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,OAAO,CACL,EAAU,EACV,MAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gCAAgC,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAChE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,63 @@
import { StripeResource } from '../../../StripeResource.js';
import { InboundTransfer } from './../../Treasury/InboundTransfers.js';
import { OtherString } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class InboundTransferResource extends StripeResource {
/**
* Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
*/
fail(id: string, params?: TestHelpers.Treasury.InboundTransferFailParams, options?: RequestOptions): Promise<Response<InboundTransfer>>;
/**
* Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
*/
returnInboundTransfer(id: string, params?: TestHelpers.Treasury.InboundTransferReturnInboundTransferParams, options?: RequestOptions): Promise<Response<InboundTransfer>>;
/**
* Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
*/
succeed(id: string, params?: TestHelpers.Treasury.InboundTransferSucceedParams, options?: RequestOptions): Promise<Response<InboundTransfer>>;
}
export declare namespace TestHelpers {
namespace Treasury {
interface InboundTransferFailParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Details about a failed InboundTransfer.
*/
failure_details?: InboundTransferFailParams.FailureDetails;
}
namespace InboundTransferFailParams {
interface FailureDetails {
/**
* Reason for the failure.
*/
code?: FailureDetails.Code;
}
namespace FailureDetails {
type Code = 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'debit_not_authorized' | 'incorrect_account_holder_address' | 'incorrect_account_holder_name' | 'incorrect_account_holder_tax_id' | 'insufficient_funds' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other' | OtherString;
}
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface InboundTransferReturnInboundTransferParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface InboundTransferSucceedParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class InboundTransferResource extends StripeResource {
/**
* Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
*/
fail(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/inbound_transfers/${encodeURIComponent(id)}/fail`, params, options);
}
/**
* Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
*/
returnInboundTransfer(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/inbound_transfers/${encodeURIComponent(id)}/return`, params, options);
}
/**
* Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
*/
succeed(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/inbound_transfers/${encodeURIComponent(id)}/succeed`, params, options);
}
}
//# sourceMappingURL=InboundTransfers.js.map
@@ -0,0 +1 @@
{"version":3,"file":"InboundTransfers.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Treasury/InboundTransfers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAK1D,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IACzD;;OAEG;IACH,IAAI,CACF,EAAU,EACV,MAAuD,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAC/D,EAAE,CACH,OAAO,EACR,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,qBAAqB,CACnB,EAAU,EACV,MAAwE,EACxE,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAC/D,EAAE,CACH,SAAS,EACV,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,OAAO,CACL,EAAU,EACV,MAA0D,EAC1D,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAC/D,EAAE,CACH,UAAU,EACX,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,120 @@
import { StripeResource } from '../../../StripeResource.js';
import { OutboundPayment } from './../../Treasury/OutboundPayments.js';
import { OtherString } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class OutboundPaymentResource extends StripeResource {
/**
* Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
*/
update(id: string, params: TestHelpers.Treasury.OutboundPaymentUpdateParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
/**
* Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
*/
fail(id: string, params?: TestHelpers.Treasury.OutboundPaymentFailParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
/**
* Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
*/
post(id: string, params?: TestHelpers.Treasury.OutboundPaymentPostParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
/**
* Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
*/
returnOutboundPayment(id: string, params?: TestHelpers.Treasury.OutboundPaymentReturnOutboundPaymentParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundPaymentUpdateParams {
/**
* Details about network-specific tracking information.
*/
tracking_details: OutboundPaymentUpdateParams.TrackingDetails;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
namespace OutboundPaymentUpdateParams {
interface TrackingDetails {
/**
* ACH network tracking details.
*/
ach?: TrackingDetails.Ach;
/**
* The US bank account network used to send funds.
*/
type: TrackingDetails.Type;
/**
* US domestic wire network tracking details.
*/
us_domestic_wire?: TrackingDetails.UsDomesticWire;
}
namespace TrackingDetails {
interface Ach {
/**
* ACH trace ID for funds sent over the `ach` network.
*/
trace_id: string;
}
type Type = 'ach' | 'us_domestic_wire' | OtherString;
interface UsDomesticWire {
/**
* CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
*/
chips?: string;
/**
* IMAD for funds sent over the `us_domestic_wire` network.
*/
imad?: string;
/**
* OMAD for funds sent over the `us_domestic_wire` network.
*/
omad?: string;
}
}
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundPaymentFailParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundPaymentPostParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundPaymentReturnOutboundPaymentParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Optional hash to set the return code.
*/
returned_details?: OutboundPaymentReturnOutboundPaymentParams.ReturnedDetails;
}
namespace OutboundPaymentReturnOutboundPaymentParams {
interface ReturnedDetails {
/**
* The return code to be set on the OutboundPayment object.
*/
code?: ReturnedDetails.Code;
}
namespace ReturnedDetails {
type Code = 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other' | OtherString;
}
}
}
}
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class OutboundPaymentResource extends StripeResource {
/**
* Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
*/
update(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(id)}`, params, options);
}
/**
* Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
*/
fail(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(id)}/fail`, params, options);
}
/**
* Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
*/
post(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(id)}/post`, params, options);
}
/**
* Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
*/
returnOutboundPayment(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_payments/${encodeURIComponent(id)}/return`, params, options);
}
}
//# sourceMappingURL=OutboundPayments.js.map
@@ -0,0 +1 @@
{"version":3,"file":"OutboundPayments.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Treasury/OutboundPayments.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAK1D,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IACzD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAAwD,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACvE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,IAAI,CACF,EAAU,EACV,MAAuD,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAC/D,EAAE,CACH,OAAO,EACR,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,IAAI,CACF,EAAU,EACV,MAAuD,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAC/D,EAAE,CACH,OAAO,EACR,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,qBAAqB,CACnB,EAAU,EACV,MAAwE,EACxE,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+CAA+C,kBAAkB,CAC/D,EAAE,CACH,SAAS,EACV,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,120 @@
import { StripeResource } from '../../../StripeResource.js';
import { OutboundTransfer } from './../../Treasury/OutboundTransfers.js';
import { OtherString } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class OutboundTransferResource extends StripeResource {
/**
* Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
*/
update(id: string, params: TestHelpers.Treasury.OutboundTransferUpdateParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
/**
* Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
*/
fail(id: string, params?: TestHelpers.Treasury.OutboundTransferFailParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
/**
* Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
*/
post(id: string, params?: TestHelpers.Treasury.OutboundTransferPostParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
/**
* Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
*/
returnOutboundTransfer(id: string, params?: TestHelpers.Treasury.OutboundTransferReturnOutboundTransferParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundTransferUpdateParams {
/**
* Details about network-specific tracking information.
*/
tracking_details: OutboundTransferUpdateParams.TrackingDetails;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
namespace OutboundTransferUpdateParams {
interface TrackingDetails {
/**
* ACH network tracking details.
*/
ach?: TrackingDetails.Ach;
/**
* The US bank account network used to send funds.
*/
type: TrackingDetails.Type;
/**
* US domestic wire network tracking details.
*/
us_domestic_wire?: TrackingDetails.UsDomesticWire;
}
namespace TrackingDetails {
interface Ach {
/**
* ACH trace ID for funds sent over the `ach` network.
*/
trace_id: string;
}
type Type = 'ach' | 'us_domestic_wire' | OtherString;
interface UsDomesticWire {
/**
* CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
*/
chips?: string;
/**
* IMAD for funds sent over the `us_domestic_wire` network.
*/
imad?: string;
/**
* OMAD for funds sent over the `us_domestic_wire` network.
*/
omad?: string;
}
}
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundTransferFailParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundTransferPostParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}
export declare namespace TestHelpers {
namespace Treasury {
interface OutboundTransferReturnOutboundTransferParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Details about a returned OutboundTransfer.
*/
returned_details?: OutboundTransferReturnOutboundTransferParams.ReturnedDetails;
}
namespace OutboundTransferReturnOutboundTransferParams {
interface ReturnedDetails {
/**
* Reason for the return.
*/
code?: ReturnedDetails.Code;
}
namespace ReturnedDetails {
type Code = 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other' | OtherString;
}
}
}
}
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class OutboundTransferResource extends StripeResource {
/**
* Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
*/
update(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(id)}`, params, options);
}
/**
* Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
*/
fail(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(id)}/fail`, params, options);
}
/**
* Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
*/
post(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(id)}/post`, params, options);
}
/**
* Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
*/
returnOutboundTransfer(id, params, options) {
return this._makeRequest('POST', `/v1/test_helpers/treasury/outbound_transfers/${encodeURIComponent(id)}/return`, params, options);
}
}
//# sourceMappingURL=OutboundTransfers.js.map
@@ -0,0 +1 @@
{"version":3,"file":"OutboundTransfers.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Treasury/OutboundTransfers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAK1D,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IAC1D;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAAyD,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gDAAgD,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACxE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,IAAI,CACF,EAAU,EACV,MAAwD,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gDAAgD,kBAAkB,CAChE,EAAE,CACH,OAAO,EACR,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,IAAI,CACF,EAAU,EACV,MAAwD,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gDAAgD,kBAAkB,CAChE,EAAE,CACH,OAAO,EACR,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,sBAAsB,CACpB,EAAU,EACV,MAA0E,EAC1E,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gDAAgD,kBAAkB,CAChE,EAAE,CACH,SAAS,EACV,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,73 @@
import { StripeResource } from '../../../StripeResource.js';
import { ReceivedCredit } from './../../Treasury/ReceivedCredits.js';
import { OtherString } from '../../../shared.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class ReceivedCreditResource extends StripeResource {
/**
* Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
*/
create(params: TestHelpers.Treasury.ReceivedCreditCreateParams, options?: RequestOptions): Promise<Response<ReceivedCredit>>;
}
export declare namespace TestHelpers {
namespace Treasury {
interface ReceivedCreditCreateParams {
/**
* Amount (in cents) to be transferred.
*/
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;
/**
* The FinancialAccount to send funds to.
*/
financial_account: string;
/**
* Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network: ReceivedCreditCreateParams.Network;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description?: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Initiating payment method details for the object.
*/
initiating_payment_method_details?: ReceivedCreditCreateParams.InitiatingPaymentMethodDetails;
}
namespace ReceivedCreditCreateParams {
type Network = 'ach' | 'us_domestic_wire' | OtherString;
interface InitiatingPaymentMethodDetails {
/**
* The source type.
*/
type: 'us_bank_account';
/**
* Optional fields for `us_bank_account`.
*/
us_bank_account?: InitiatingPaymentMethodDetails.UsBankAccount;
}
namespace InitiatingPaymentMethodDetails {
interface UsBankAccount {
/**
* The bank account holder's name.
*/
account_holder_name?: string;
/**
* The bank account number.
*/
account_number?: string;
/**
* The bank account's routing number.
*/
routing_number?: string;
}
}
}
}
}
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class ReceivedCreditResource extends StripeResource {
/**
* Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/test_helpers/treasury/received_credits', params, options);
}
}
//# sourceMappingURL=ReceivedCredits.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ReceivedCredits.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Treasury/ReceivedCredits.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAK1D,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACxD;;OAEG;IACH,MAAM,CACJ,MAAuD,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,4CAA4C,EAC5C,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,71 @@
import { StripeResource } from '../../../StripeResource.js';
import { ReceivedDebit } from './../../Treasury/ReceivedDebits.js';
import { RequestOptions, Response } from '../../../lib.js';
export declare class ReceivedDebitResource extends StripeResource {
/**
* Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
*/
create(params: TestHelpers.Treasury.ReceivedDebitCreateParams, options?: RequestOptions): Promise<Response<ReceivedDebit>>;
}
export declare namespace TestHelpers {
namespace Treasury {
interface ReceivedDebitCreateParams {
/**
* Amount (in cents) to be transferred.
*/
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;
/**
* The FinancialAccount to pull funds from.
*/
financial_account: string;
/**
* Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network: 'ach';
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description?: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Initiating payment method details for the object.
*/
initiating_payment_method_details?: ReceivedDebitCreateParams.InitiatingPaymentMethodDetails;
}
namespace ReceivedDebitCreateParams {
interface InitiatingPaymentMethodDetails {
/**
* The source type.
*/
type: 'us_bank_account';
/**
* Optional fields for `us_bank_account`.
*/
us_bank_account?: InitiatingPaymentMethodDetails.UsBankAccount;
}
namespace InitiatingPaymentMethodDetails {
interface UsBankAccount {
/**
* The bank account holder's name.
*/
account_holder_name?: string;
/**
* The bank account number.
*/
account_number?: string;
/**
* The bank account's routing number.
*/
routing_number?: string;
}
}
}
}
}
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
import { StripeResource } from '../../../StripeResource.js';
export class ReceivedDebitResource extends StripeResource {
/**
* Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/test_helpers/treasury/received_debits', params, options);
}
}
//# sourceMappingURL=ReceivedDebits.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ReceivedDebits.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Treasury/ReceivedDebits.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAI1D,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IACvD;;OAEG;IACH,MAAM,CACJ,MAAsD,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,2CAA2C,EAC3C,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
+16
View File
@@ -0,0 +1,16 @@
import { Stripe } from '../../../stripe.core.js';
import { InboundTransferResource } from './InboundTransfers.js';
import { OutboundPaymentResource } from './OutboundPayments.js';
import { OutboundTransferResource } from './OutboundTransfers.js';
import { ReceivedCreditResource } from './ReceivedCredits.js';
import { ReceivedDebitResource } from './ReceivedDebits.js';
export declare class Treasury {
private readonly stripe;
inboundTransfers: InboundTransferResource;
outboundPayments: OutboundPaymentResource;
outboundTransfers: OutboundTransferResource;
receivedCredits: ReceivedCreditResource;
receivedDebits: ReceivedDebitResource;
constructor(stripe: Stripe);
}
export declare namespace Treasury { }
+17
View File
@@ -0,0 +1,17 @@
// File generated from our OpenAPI spec
import { InboundTransferResource, } from './InboundTransfers.js';
import { OutboundPaymentResource, } from './OutboundPayments.js';
import { OutboundTransferResource, } from './OutboundTransfers.js';
import { ReceivedCreditResource, } from './ReceivedCredits.js';
import { ReceivedDebitResource, } from './ReceivedDebits.js';
export class Treasury {
constructor(stripe) {
this.stripe = stripe;
this.inboundTransfers = new InboundTransferResource(stripe);
this.outboundPayments = new OutboundPaymentResource(stripe);
this.outboundTransfers = new OutboundTransferResource(stripe);
this.receivedCredits = new ReceivedCreditResource(stripe);
this.receivedDebits = new ReceivedDebitResource(stripe);
}
}
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/TestHelpers/Treasury/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAGvC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,QAAQ;IAOnB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,iBAAiB,GAAG,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,CAAC,eAAe,GAAG,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;CACF"}
+32
View File
@@ -0,0 +1,32 @@
import { Stripe } from '../../stripe.core.js';
import { ConfirmationTokenResource } from './ConfirmationTokens.js';
import { CustomerResource } from './Customers.js';
import { RefundResource } from './Refunds.js';
import { TestHelpers as TestHelpersNamespace3, TestClock, DeletedTestClock, TestClockResource } from './TestClocks.js';
import { Issuing } from './Issuing/index.js';
import { Terminal } from './Terminal/index.js';
import { Treasury } from './Treasury/index.js';
export { TestClock } from './TestClocks.js';
export declare class TestHelpers {
private readonly stripe;
confirmationTokens: ConfirmationTokenResource;
customers: CustomerResource;
refunds: RefundResource;
testClocks: TestClockResource;
issuing: Issuing;
terminal: Terminal;
treasury: Treasury;
constructor(stripe: Stripe);
}
export declare namespace TestHelpers {
export import TestClockDeleteParams = TestHelpersNamespace3.TestClockDeleteParams;
export import TestClockRetrieveParams = TestHelpersNamespace3.TestClockRetrieveParams;
export import TestClockListParams = TestHelpersNamespace3.TestClockListParams;
export import TestClockCreateParams = TestHelpersNamespace3.TestClockCreateParams;
export import TestClockAdvanceParams = TestHelpersNamespace3.TestClockAdvanceParams;
export { DeletedTestClock };
export { TestClock, TestClockResource };
export { Issuing };
export { Terminal };
export { Treasury };
}
+21
View File
@@ -0,0 +1,21 @@
// File generated from our OpenAPI spec
import { ConfirmationTokenResource, } from './ConfirmationTokens.js';
import { CustomerResource, } from './Customers.js';
import { RefundResource, } from './Refunds.js';
import { TestClockResource, } from './TestClocks.js';
import { Issuing } from './Issuing/index.js';
import { Terminal } from './Terminal/index.js';
import { Treasury } from './Treasury/index.js';
export class TestHelpers {
constructor(stripe) {
this.stripe = stripe;
this.confirmationTokens = new ConfirmationTokenResource(stripe);
this.customers = new CustomerResource(stripe);
this.refunds = new RefundResource(stripe);
this.testClocks = new TestClockResource(stripe);
this.issuing = new Issuing(stripe);
this.terminal = new Terminal(stripe);
this.treasury = new Treasury(stripe);
}
}
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/TestHelpers/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAGvC,OAAO,EAEL,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAIL,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAI7C,MAAM,OAAO,WAAW;IAStB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,kBAAkB,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAChE,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;CACF"}