Initial project import

This commit is contained in:
drjones
2026-06-13 17:36:44 -07:00
commit ad2a18cc8d
18471 changed files with 4497570 additions and 0 deletions

View File

@@ -0,0 +1,669 @@
import { StripeResource } from '../../StripeResource.js';
import { ConfirmationToken } from './../ConfirmationTokens.js';
import { MetadataParam, 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';
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';
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';
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' | 'bsn' | 'cimb' | 'deutsche_bank' | 'hong_leong_bank' | 'hsbc' | 'kfh' | 'maybank2e' | 'maybank2u' | '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';
}
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';
}
namespace Sofort {
type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL';
}
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';
}
}
namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual';
type AccountType = 'checking' | 'savings';
}
}
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';
}
}
}
}
}
}

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

View File

@@ -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;AAKvD,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"}

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;
}
}

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

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"}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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>;
}
}
}

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

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"}

View File

@@ -0,0 +1,67 @@
import { StripeResource } from '../../../StripeResource.js';
import { PersonalizationDesign } from './../../Issuing/PersonalizationDesigns.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';
type CarrierText = 'geographic_location' | 'inappropriate' | 'network_name' | 'non_fiat_currency' | 'other' | 'other_entity' | 'promotional_material';
}
}
}
}

View File

@@ -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

View File

@@ -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;AAI1D,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"}

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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 { }

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

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"}

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>;
}
}

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

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"}

View File

@@ -0,0 +1,107 @@
import { StripeResource } from '../../../StripeResource.js';
import { Reader } from './../../Terminal/Readers.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';
}
}
}
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';
}
}
}
export declare namespace TestHelpers {
namespace Terminal {
interface ReaderTimeoutInputCollectionParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
}

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

View File

@@ -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;AAI1D,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"}

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 { }

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

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"}

View File

@@ -0,0 +1,146 @@
import { StripeResource } from '../../StripeResource.js';
import { PaginationParams } 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<TestHelpers.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: TestHelpers.TestClock.Status;
status_details: TestHelpers.TestClock.StatusDetails;
}
export declare namespace TestHelpers {
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;
}
namespace TestClock {
type Status = 'advancing' | 'internal_failure' | 'ready';
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>;
}
}

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

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"}

View File

@@ -0,0 +1,62 @@
import { StripeResource } from '../../../StripeResource.js';
import { InboundTransfer } from './../../Treasury/InboundTransfers.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';
}
}
}
}
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>;
}
}
}

View File

@@ -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

View File

@@ -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;AAI1D,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"}

View File

@@ -0,0 +1,119 @@
import { StripeResource } from '../../../StripeResource.js';
import { OutboundPayment } from './../../Treasury/OutboundPayments.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';
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';
}
}
}
}

View File

@@ -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

View File

@@ -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;AAI1D,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"}

View File

@@ -0,0 +1,119 @@
import { StripeResource } from '../../../StripeResource.js';
import { OutboundTransfer } from './../../Treasury/OutboundTransfers.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';
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';
}
}
}
}

View File

@@ -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

View File

@@ -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;AAI1D,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"}

View File

@@ -0,0 +1,72 @@
import { StripeResource } from '../../../StripeResource.js';
import { ReceivedCredit } from './../../Treasury/ReceivedCredits.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';
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;
}
}
}
}
}

View File

@@ -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

View File

@@ -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;AAI1D,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"}

View File

@@ -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;
}
}
}
}
}

View File

@@ -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

View File

@@ -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"}

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 { }

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

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"}

View File

@@ -0,0 +1,31 @@
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, 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 { TestClock };
export { Issuing };
export { Terminal };
export { Treasury };
}

21
node_modules/stripe/esm/resources/TestHelpers/index.js generated vendored Normal file
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

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,EAGL,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"}