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,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,27 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReaderResource = void 0;
const StripeResource_js_1 = require("../../../StripeResource.js");
class ReaderResource extends StripeResource_js_1.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);
}
}
exports.ReaderResource = ReaderResource;
//# 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,kEAA0D;AAI1D,MAAa,cAAe,SAAQ,kCAAc;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;AApDD,wCAoDC"}

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,13 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.Terminal = void 0;
const Readers_js_1 = require("./Readers.js");
class Terminal {
constructor(stripe) {
this.stripe = stripe;
this.readers = new Readers_js_1.ReaderResource(stripe);
}
}
exports.Terminal = Terminal;
//# 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,6CAGsB;AAEtB,MAAa,QAAQ;IAGnB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,2BAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACF;AAND,4BAMC"}