Add subscription support + license extension on renewal

This commit is contained in:
Krystie
2026-08-19 12:45:06 -07:00
parent 14d0eaa2b3
commit ff722aa4d8
2075 changed files with 357707 additions and 63 deletions
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
+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"}
File diff suppressed because one or more lines are too long
+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
File diff suppressed because one or more lines are too long
+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"}