From 568ec4378d010bb901a61bd9686be49077e54d5f Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Thu, 11 Aug 2016 13:13:12 +0200 Subject: [PATCH] Fixed references to Bluebird 2.0 --- acl/acl.d.ts | 2 +- .../anydb-sql-migrations.d.ts | 4 +- asana/asana.d.ts | 2 +- blue-tape/blue-tape-tests.ts | 2 +- bluebird-retry/bluebird-retry-tests.ts | 4 +- bluebird-retry/bluebird-retry.d.ts | 2 +- bookshelf/bookshelf.d.ts | 2 +- consolidate/consolidate.d.ts | 2 +- fs-extra-promise/fs-extra-promise.d.ts | 2 +- inline-css/inline-css.d.ts | 2 +- inversify/inversify.d.ts | 66 +- java/java-tests.ts | 2 +- karma/karma.d.ts | 2 +- knex/knex.d.ts | 2 +- libxmljs/libxmljs-tests.ts | 2 +- mz/mz.d.ts | 2 +- .../node-mysql-wrapper-tests.ts | 44 +- node-mysql-wrapper/node-mysql-wrapper.d.ts | 170 +- nodemailer/nodemailer.d.ts | 6 +- orientjs/orientjs.d.ts | 2 +- pify/pify-tests.ts | 4 +- project-oxford/project-oxford-tests.ts | 2 +- project-oxford/project-oxford.d.ts | 4 +- redlock/redlock.d.ts | 14 +- request-promise/request-promise.d.ts | 2 +- rethinkdb/rethinkdb.d.ts | 2 +- sequelize/sequelize.d.ts | 2 +- stamplay-js-sdk/stamplay-js-sdk.d.ts | 2 +- stripe-node/stripe-node.d.ts | 2788 ++++++++--------- umzug/umzug.d.ts | 2 +- 30 files changed, 1572 insertions(+), 1572 deletions(-) diff --git a/acl/acl.d.ts b/acl/acl.d.ts index 06defa2449e3e3..d222f9ebb6d3a9 100644 --- a/acl/acl.d.ts +++ b/acl/acl.d.ts @@ -3,7 +3,7 @@ // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// /// diff --git a/anydb-sql-migrations/anydb-sql-migrations.d.ts b/anydb-sql-migrations/anydb-sql-migrations.d.ts index 9ab421c3ac72da..98961266a9d403 100644 --- a/anydb-sql-migrations/anydb-sql-migrations.d.ts +++ b/anydb-sql-migrations/anydb-sql-migrations.d.ts @@ -3,7 +3,7 @@ // Definitions by: Gorgi Kosev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module "anydb-sql-migrations" { @@ -31,4 +31,4 @@ declare module "anydb-sql-migrations" { items: MigrationTask[]; }) => any) => Promise; }; -} \ No newline at end of file +} diff --git a/asana/asana.d.ts b/asana/asana.d.ts index 61cb54d26f6c23..8b618b81a36fd7 100644 --- a/asana/asana.d.ts +++ b/asana/asana.d.ts @@ -3,7 +3,7 @@ // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module "asana" { diff --git a/blue-tape/blue-tape-tests.ts b/blue-tape/blue-tape-tests.ts index a01675a1c54402..fc931aeed5b0e7 100644 --- a/blue-tape/blue-tape-tests.ts +++ b/blue-tape/blue-tape-tests.ts @@ -1,5 +1,5 @@ /// -/// +/// /// import tape = require('blue-tape'); diff --git a/bluebird-retry/bluebird-retry-tests.ts b/bluebird-retry/bluebird-retry-tests.ts index 5d8c32dfcb7d1c..e42b5457df219b 100644 --- a/bluebird-retry/bluebird-retry-tests.ts +++ b/bluebird-retry/bluebird-retry-tests.ts @@ -1,5 +1,5 @@ /// -/// +/// import Promise = require('bluebird'); import retry = require('bluebird-retry'); @@ -32,4 +32,4 @@ var options:retry.Options = { interval: 500 }; -retry(logFail, options); \ No newline at end of file +retry(logFail, options); diff --git a/bluebird-retry/bluebird-retry.d.ts b/bluebird-retry/bluebird-retry.d.ts index 1210bf3b53bb05..b63a3cf13119d0 100644 --- a/bluebird-retry/bluebird-retry.d.ts +++ b/bluebird-retry/bluebird-retry.d.ts @@ -3,7 +3,7 @@ // Definitions by: Pascal Vomhoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "bluebird-retry" { import Promise = require('bluebird'); diff --git a/bookshelf/bookshelf.d.ts b/bookshelf/bookshelf.d.ts index 0ca3a1ebcd4521..34f58d62ed2292 100644 --- a/bookshelf/bookshelf.d.ts +++ b/bookshelf/bookshelf.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andrew Schurman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// /// /// diff --git a/consolidate/consolidate.d.ts b/consolidate/consolidate.d.ts index ff54a83a8ebf9f..aa07150f20f899 100644 --- a/consolidate/consolidate.d.ts +++ b/consolidate/consolidate.d.ts @@ -6,7 +6,7 @@ // Imported from: https://github.com/soywiz/typescript-node-definitions/consolidate.d.ts /// -/// +/// declare module "consolidate" { var cons: Consolidate; diff --git a/fs-extra-promise/fs-extra-promise.d.ts b/fs-extra-promise/fs-extra-promise.d.ts index 2243a4d1c5b49c..bdf8360b77fca1 100644 --- a/fs-extra-promise/fs-extra-promise.d.ts +++ b/fs-extra-promise/fs-extra-promise.d.ts @@ -6,7 +6,7 @@ // Imported from: https://github.com/soywiz/typescript-node-definitions/fs-extra.d.ts via TSD fs-extra definition /// -/// +/// declare module "fs-extra-promise" { import stream = require("stream"); diff --git a/inline-css/inline-css.d.ts b/inline-css/inline-css.d.ts index 478f25226bbeef..41511097c77a8e 100644 --- a/inline-css/inline-css.d.ts +++ b/inline-css/inline-css.d.ts @@ -3,7 +3,7 @@ // Definitions by: Philip Spain // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'inline-css' { import Promise = require('bluebird'); diff --git a/inversify/inversify.d.ts b/inversify/inversify.d.ts index 41200ae470e43c..0c77d9d82f7c91 100644 --- a/inversify/inversify.d.ts +++ b/inversify/inversify.d.ts @@ -3,7 +3,7 @@ // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// interface Symbol { toString(): string; @@ -31,9 +31,9 @@ declare namespace inversify { export interface Newable { new(...args: any[]): T; } - + export type ServiceIdentifier = (string|Symbol|Newable); - + export interface Binding extends Clonable> { guid: string; moduleId: string; @@ -49,66 +49,66 @@ declare namespace inversify { scope: number; // BindingScope type: number; // BindingType } - + export interface Factory extends Function { (...args: any[]): (((...args: any[]) => T)|T); } - + export interface FactoryCreator extends Function { (context: Context): Factory; } - + export interface Provider extends Function { (): Promise; } - + export interface ProviderCreator extends Function { (context: Context): Provider; } - + export interface PlanAndResolve { (args: PlanAndResolveArgs): T[]; } - + export interface PlanAndResolveArgs { multiInject: boolean; serviceIdentifier: ServiceIdentifier; target: Target; contextInterceptor: (contexts: Context) => Context; } - + export interface Middleware extends Function { (next: PlanAndResolve): PlanAndResolve; } - + export interface Context { guid: string; kernel: Kernel; plan: Plan; addPlan(plan: Plan): void; } - + export interface ReflectResult { [key: string]: Metadata[]; } - + export interface Metadata { key: string; value: any; } - + export interface Plan { parentContext: Context; rootRequest: Request; } - + export interface Planner { createContext(kernel: Kernel): Context; createPlan(parentContext: Context, binding: Binding, target: Target): Plan; getBindings(kernel: Kernel, serviceIdentifier: ServiceIdentifier): Binding[]; getActiveBindings(parentRequest: Request, target: Target): Binding[]; } - + export interface QueryableString { startsWith(searchString: string): boolean; endsWith(searchString: string): boolean; @@ -116,7 +116,7 @@ declare namespace inversify { equals(compareString: string): boolean; value(): string; } - + export interface Request { guid: string; serviceIdentifier: ServiceIdentifier; @@ -131,7 +131,7 @@ declare namespace inversify { target: Target ): Request; } - + export interface Target { guid: string; serviceIdentifier: ServiceIdentifier; @@ -145,11 +145,11 @@ declare namespace inversify { matchesNamedTag(name: string): boolean; matchesTag(key: string): (value: any) => boolean; } - + export interface Resolver { resolve(context: Context): T; } - + export interface Kernel { guid: string; bind(serviceIdentifier: ServiceIdentifier): BindingToSyntax; @@ -167,25 +167,25 @@ declare namespace inversify { snapshot(): void; restore(): void; } - + export interface Bind extends Function { (serviceIdentifier: ServiceIdentifier): BindingToSyntax; } - + export interface KernelModule { guid: string; registry: (bind: Bind) => void; } - + export interface KernelSnapshot { bindings: Lookup>; middleware: PlanAndResolve; } - + export interface Clonable { clone(): T; } - + export interface Lookup extends Clonable> { add(serviceIdentifier: ServiceIdentifier, value: T): void; get(serviceIdentifier: ServiceIdentifier): Array; @@ -193,22 +193,22 @@ declare namespace inversify { removeByModuleId(moduleId: string): void; hasKey(serviceIdentifier: ServiceIdentifier): boolean; } - + export interface KeyValuePair { serviceIdentifier: ServiceIdentifier; value: Array; } - + export interface BindingInSyntax { inSingletonScope(): BindingWhenOnSyntax; } - + export interface BindingInWhenOnSyntax extends BindingInSyntax, BindingWhenOnSyntax {} - + export interface BindingOnSyntax { onActivation(fn: (context: Context, injectable: T) => T): BindingWhenSyntax; } - + export interface BindingToSyntax { to(constructor: { new(...args: any[]): T; }): BindingInWhenOnSyntax; toConstantValue(value: T): BindingWhenOnSyntax; @@ -219,9 +219,9 @@ declare namespace inversify { toAutoFactory(serviceIdentifier: ServiceIdentifier): BindingWhenOnSyntax; toProvider(provider: ProviderCreator): BindingWhenOnSyntax; } - + export interface BindingWhenOnSyntax extends BindingWhenSyntax, BindingOnSyntax {} - + export interface BindingWhenSyntax { when(constraint: (request: Request) => boolean): BindingOnSyntax; whenTargetNamed(name: string): BindingOnSyntax; @@ -238,7 +238,7 @@ declare namespace inversify { whenAnyAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax; whenNoAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax; } - + } export var Kernel: interfaces.KernelConstructor; diff --git a/java/java-tests.ts b/java/java-tests.ts index 568bd35a8c15eb..7f5ff7874a0f7d 100644 --- a/java/java-tests.ts +++ b/java/java-tests.ts @@ -1,5 +1,5 @@ /// -/// +/// import java = require('java'); import BluePromise = require('bluebird'); diff --git a/karma/karma.d.ts b/karma/karma.d.ts index 95c1baede41258..c6f9bc0043ebb6 100644 --- a/karma/karma.d.ts +++ b/karma/karma.d.ts @@ -3,7 +3,7 @@ // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// /// diff --git a/knex/knex.d.ts b/knex/knex.d.ts index a8501f2e519941..5d240d926dd9f9 100644 --- a/knex/knex.d.ts +++ b/knex/knex.d.ts @@ -3,7 +3,7 @@ // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module "knex" { diff --git a/libxmljs/libxmljs-tests.ts b/libxmljs/libxmljs-tests.ts index fbc86281851ad8..8a11481bee744d 100644 --- a/libxmljs/libxmljs-tests.ts +++ b/libxmljs/libxmljs-tests.ts @@ -1,4 +1,4 @@ -/// +/// /// var libxmljs = require("libxmljs"); diff --git a/mz/mz.d.ts b/mz/mz.d.ts index 8c3206c7142c5b..8bbf5b4a34752b 100644 --- a/mz/mz.d.ts +++ b/mz/mz.d.ts @@ -5,7 +5,7 @@ // Modified from the node.js definitions https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/node/node.d.ts -/// +/// /// diff --git a/node-mysql-wrapper/node-mysql-wrapper-tests.ts b/node-mysql-wrapper/node-mysql-wrapper-tests.ts index 3d26b6e8bcb879..9819484fb6da3f 100644 --- a/node-mysql-wrapper/node-mysql-wrapper-tests.ts +++ b/node-mysql-wrapper/node-mysql-wrapper-tests.ts @@ -1,6 +1,6 @@ /// /// -/// +/// var express = require('express'); var app = express(); @@ -40,7 +40,7 @@ db.ready(() => { var usersDb = db.table("users"); - + //or var usersDb = db.table("users"); if you don't want intel auto complete from your ide/editor usersDb.findById(16, (_user) => { @@ -65,7 +65,7 @@ db.ready(() => { orderByDesc: "commentId" //give me the first 50 comments ordered by -commentId (DESC) from table 'comments' and put them at 'myComments' property inside the result object. } } - }).then(_user=> { // to get this promise use : .promise() + }).then(_user=> { // to get this promise use : .promise() console.log("\n-------------TEST 2 ------------\n"); console.log(_user.username + " with "); console.log(_user.myComments.length + " comments "); @@ -103,7 +103,7 @@ db.ready(() => { } }, (_users) => { - + console.log("---------------TEST 6----------------------------------------"); _users.forEach(_user=> { console.log(_user.userId + " " + _user.username + " found with " + _user.comments.length + " comments"); @@ -112,55 +112,55 @@ db.ready(() => { }); //if no rules setted to find method it's uses the table's rules ( if exists) - - - + + + let _criteriaFromBuilder = usersDb.criteria .except("password") // or .exclude(...columns). the only column you cannot except/exclude is the primary key (because it is used at where clause), be careful. .where("userId", 24) - .joinAs("info", "userInfos", "userId") + .joinAs("info", "userInfos", "userId") .at("info") .limit(1) //because we make it limit 1 it will return this result as object not as array. .parent() - .joinAs("myComments", "comments", "userId") + .joinAs("myComments", "comments", "userId") .at("myComments").limit(2) .joinAs("likes", "commentLikes", "commentId") .original().orderBy("userId", true).build(); - + /* console.dir(_criteriaFromBuilder); prints this object: ( of course you can create your own in order to pass it on .find table methods ) { userId:23, - + myComments:{ userId: '=', - + tableRules:{ table: 'comments', limit:2 - + }, - + likes:{ commentId: '=', - + tableRules:{ table: 'commentLikes' } - + } }, - - tableRules:{ + + tableRules:{ orderByDesc: 'userId', except: ['password'] } - + } - - + + */ - + usersDb.find(_criteriaFromBuilder).then(_users=> { diff --git a/node-mysql-wrapper/node-mysql-wrapper.d.ts b/node-mysql-wrapper/node-mysql-wrapper.d.ts index 2eb489f0795c5e..791ab68adec408 100644 --- a/node-mysql-wrapper/node-mysql-wrapper.d.ts +++ b/node-mysql-wrapper/node-mysql-wrapper.d.ts @@ -3,8 +3,8 @@ // Definitions by: Makis Maropoulos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// /// @@ -53,26 +53,26 @@ declare module "node-mysql-wrapper" { class Helper { - /** + /** * Callback like forEach * @name valueCallback * @function - * @param {T} the value of the object's key + * @param {T} the value of the object's key * @returnTye {U} * @return {U} */ - + /** * Callback like forEach * @name keyCallback * @function - * @param {string} the name of the object's key + * @param {string} the name of the object's key * @returnTye {U} * @return {U} */ constructor(); - + /** * Create and return a copy of an object. * @param {T} object the object you want to copy. @@ -80,7 +80,7 @@ declare module "node-mysql-wrapper" { * @return {T} */ static copyObject(object: T): T; - + /** * Converts any_string to anyString and returns it. * @param {string} columnKey the string you want to convert. @@ -88,7 +88,7 @@ declare module "node-mysql-wrapper" { * @return {string} */ static toObjectProperty(columnKey: string): string; - + /** * Converts anyString to any_string and returns it. * @param {string} objectKey the string you want to convert. @@ -96,7 +96,7 @@ declare module "node-mysql-wrapper" { * @return {string} */ static toRowProperty(objectKey: string): string; - + /** * Iterate object's keys and return their values to the callback. * @param {} map the object. @@ -115,14 +115,14 @@ declare module "node-mysql-wrapper" { */ static forEachKey(map: Map, callback: (key: string) => U): U; - + /** * Checks if anything is a function. * @param {functionToCheck} the object or function to pass * @return boolean */ static isFunction(functionToCheck: any): boolean; - + /** * Checks if an object has 'tableRules' property. * @param {obj} the object to pass @@ -145,24 +145,24 @@ declare module "node-mysql-wrapper" { class CriteriaParts implements ICriteriaParts { - + /** * The raw format of the criteria eg: {yearsOld:22}. */ rawCriteriaObject: any; - + /** * Which tables to search after the find method of the proto table finish. */ tables: TableToSearchPart[]; - + /** * The properties of the criteria which don't belong to the database's table. */ noDatabaseProperties: string[]; - + /** - * The converted/exported where clause. + * The converted/exported where clause. */ whereClause: string; @@ -174,7 +174,7 @@ declare module "node-mysql-wrapper" { class CriteriaDivider { private _table; constructor(table: Table); - + /** * Builds the criteria raw object to Criteria object. * @param {any} rawCriteriaObject the criteria at raw format you pass eg: {yearsOld:18}. @@ -198,7 +198,7 @@ declare module "node-mysql-wrapper" { static build(): SelectQueryRules; private last(propertyClauseName); except(...columns: string[]): SelectQueryRules; - + /** * Same as .except(...columns) */ @@ -236,7 +236,7 @@ declare module "node-mysql-wrapper" { constructor(primaryTable: Table, tablePropertyName?: string, parentBuilder?: CriteriaBuilder); except(...columns: string[]): CriteriaBuilder; - + /** * Same as .except(...columns) */ @@ -259,7 +259,7 @@ declare module "node-mysql-wrapper" { parent(): CriteriaBuilder; original(): CriteriaBuilder; - + /** * Auto kanei kuklous mexri na paei sto primary table kai ekei na epistrepsei to sunoliko raw criteria gia execute i kati allo. */ @@ -270,7 +270,7 @@ declare module "node-mysql-wrapper" { } class SelectQuery implements IQuery { // T for Table's result type. - + _table: Table constructor(_table: Table); @@ -315,7 +315,7 @@ declare module "node-mysql-wrapper" { static RESERVED_PROPERTY_NAMES: string[]; private propertyChangedListeners: PropertyChangedCallback[]; - + /** Make the obj observable. Used in constructor or extend this class and use it. */ private makeObservable(obj: any): void; @@ -324,7 +324,7 @@ declare module "node-mysql-wrapper" { /**Add a listener/observer to watch for changes in this object's properties */ onPropertyChanged(listener: PropertyChangedCallback): void; - + /** If developer wants manualy notify for property changed */ notifyPropertyChanged(propertyName: string, oldValue: any): void; @@ -388,7 +388,7 @@ declare module "node-mysql-wrapper" { findById(id: number | string, callback?: (result: T) => any): Promise; findAll(tableRules?: RawRules, callback?: (_results: T[]) => any): Promise; - + /** * .insert() and .update() do the same thing: .save(); */ @@ -399,7 +399,7 @@ declare module "node-mysql-wrapper" { save(criteriaRawJsObject: any, callback?: (_result: any) => any): Promise; remove(criteriaOrID: any | number | string, callback?: (_result: DeleteAnswer) => any): Promise; - + /** * same thing as .remove(); */ @@ -423,7 +423,7 @@ declare module "node-mysql-wrapper" { fillAll(): void; fillOne(criteriaRawJsObject: any): void; - + //ONLY MONGO/METEOR COLLECTION METHODS START allow(options: { insert?: (userId: string, doc: T) => boolean; @@ -457,36 +457,36 @@ declare module "node-mysql-wrapper" { reactive?: boolean; transform?: Function; }): T; - + //ONLY MONGO/METEOR COLLECTION METHODS FINISH. } class Connection extends EventEmitter { - + /** * The real database connection socket. */ connection: Mysql.IConnection; - + /** * Collection of the supported event types for the tables. */ eventTypes: string[]; - + /** - * Force to fetch ONLY these Database table names {array of string}. + * Force to fetch ONLY these Database table names {array of string}. */ tableNamesToUseOnly: any[]; - + /** * All tables {MysqlTable} inside this connection's database. */ tables: Table[]; constructor(connection: string | Mysql.IConnection | Mysql.IConnectionConfig); - + /** * Creates the MysqlConnection from the connection url or the real connection object. * @param {string | Mysql.IConnection | Mysql.IConnectionConfig} connection the connection url or the real connection object. @@ -494,36 +494,36 @@ declare module "node-mysql-wrapper" { * @return {nothing} */ create(connection: string | Mysql.IConnection | Mysql.IConnectionConfig): void; - + /** * Attach a real connection. * @param {Mysql.IConnection} connection the real connection object. * @returnType {nothing} - * @return {nothing} + * @return {nothing} */ attach(connection: Mysql.IConnection): void; - + /** * Close the entire real connection and remove all event's listeners (if exist). * @param {function} callback If error occurs when closing the connection, this callback has the responsibility to catch it. * @returnType {nothing} - * @return {nothing} + * @return {nothing} */ end(callback?: (error: any) => void): void; - + /** * Close the entire real connection and remove all event's listeners (if exist). - * the difference from the 'end' is that this method doesn't care about errors so no callback passing here. + * the difference from the 'end' is that this method doesn't care about errors so no callback passing here. */ destroy(): void; - + /** * Clear all binary logs from the whole database. * When finish returns a promise, use it with .then(function(){}); * @return Promise */ clearBinaryLogs(): Promise; - + /** * Link the real connection with this MysqlConnection object. * @param {function} readyCallback when the link operation is done this callback is executed. @@ -531,7 +531,7 @@ declare module "node-mysql-wrapper" { * @return {Promise} */ link(readyCallback?: () => void): Promise; - + /** * Force to use/fetch information from only certain of database's tables, otherwise all database's tables information will be fetched. * @param {Array} tables the array of the tables {string} @@ -539,22 +539,22 @@ declare module "node-mysql-wrapper" { * @return {nothing} */ useOnly(...tables: any[]): void; - + /** * This method has the resposibility of fetching the correct tables from the database ( table = columns' names, primary key name). * @returnType {Promise} * @return {Promise} */ fetchDatabaseInformation(): Promise; - + /** * Escape the query column's value and return it. - * @param {string} val the value which will be escaped. + * @param {string} val the value which will be escaped. * @returnType {string} * @return {string} */ escape(val: string): string; - + /** * Call when must notify the Database events, SAVE(INSERT,UPDATE), REMOVE(DELETE). * @param {string} tableWhichCalled the table name which event is coming from. @@ -564,40 +564,40 @@ declare module "node-mysql-wrapper" { * @return {nothing} */ notice(tableWhichCalled: string, queryStr: string, rawRows: any[]): void; - + /** * Adds an event listener/watcher on a table for a 'database event'. * @param {string} tableName the table name which you want to add the event listener. * @param {string or string[]} evtType the event(s) type you want to watch, one of these(string) or an array of them(string[]): ["INSERT", "UPDATE", "REMOVE", "SAVE"]. - * @param {function} callback Callback which has one parameter(typeof any[]) which filled by the rawRows (results after query executed and before parsed to object(s)). + * @param {function} callback Callback which has one parameter(typeof any[]) which filled by the rawRows (results after query executed and before parsed to object(s)). * @returnType {nothing} * @return {nothing} */ watch(tableName: string, evtType: any, callback: (rawRows: any[]) => void): void; - + /** * Removes an event listener/watcher from a table for a specific event type. - * @param {string} tableName the table name which you want to remove the event listener. + * @param {string} tableName the table name which you want to remove the event listener. * @param {string} evtType the Event type you want to remove, one of these: "INSERT", "UPDATE", "REMOVE", "SAVE". * @param {function} callbackToRemove the callback that you were used for watch this event type. * @returnType {nothing} * @return {nothing} */ unwatch(tableName: string, evtType: string, callbackToRemove: (rawResults: any[]) => void): void; - + /** * Executes a database query. * @param {string} queryStr the query text/string to be executed. * @param {function} callback the function will be called and fill the one and only parameter when an errors occurs. * @param {any[]} queryArguments (optional) the query arguments you want to pass into query. ['arg1','arg2']... * @returnType {nothing} - * @return {nothing} + * @return {nothing} */ query(queryStr: string, callback: (err: Mysql.IError, results: any) => any, queryArguments?: any[]): void; - + /** * Returns a MysqlTable object from the database factory. (Note: this method doesn't create anything, just finds and returns the correct table, you don't have to create anything at all. Tables are fetched by the library itself.) - * If you are using typescript you can pass a class (generic) in order to use the auto completion assistance on table's results methods(find,findById,findAll,save,remove,safeRemove). + * If you are using typescript you can pass a class (generic) in order to use the auto completion assistance on table's results methods(find,findById,findAll,save,remove,safeRemove). * @param {string} tableName the table name which you want to get, on the form of: 'anyDatabaseTable' OR 'any_database_table' (possible your real table name into your database). * @returnType {MysqlTable} * @return {MysqlTable} @@ -606,7 +606,7 @@ declare module "node-mysql-wrapper" { } class Table { - /** Private keywords here are useless but I put them. + /** Private keywords here are useless but I put them. * If the developer wants to see the properties of the Table class, he/she just comes here. */ @@ -622,55 +622,55 @@ declare module "node-mysql-wrapper" { constructor(tableName: string, connection: Connection); - + /** * An array of all columns' names inside this table. */ columns: string[]; - + /** * The name of the primary key column which this table is using. */ primaryKey: string; - + /** - * The MysqlConnection object which this MysqlTable belongs. + * The MysqlConnection object which this MysqlTable belongs. */ connection: Connection; - + /** - * The real database name of the table. Autofilled by library. + * The real database name of the table. Autofilled by library. */ name: string; - + /** - * Set of the query rules that will be applied after the 'where clause' on each select query executed by this table. + * Set of the query rules that will be applied after the 'where clause' on each select query executed by this table. * @return {SelectQueryRules} */ rules: SelectQueryRules; - + /** * Returns this table's criteria divider class. * @return {CriteriaDivider} */ criteriaDivider: CriteriaDivider; - + /** * Returns new Criteria Builder each time. * Helps you to make criteria raw js objects ready to use in find,remove and save methods. * @return {CriteriaBuilder} */ criteria: CriteriaBuilder; - + /** * Adds or turn on an event listener/watcher on a table for a 'database event'. * @param {string} evtType the event type you want to watch, one of these: ["INSERT", "UPDATE", "REMOVE", "SAVE"]. - * @param {function} callback Callback which has one parameter(typeof any[]) which filled by the rawResults (results after query executed and before exports to object(s)). + * @param {function} callback Callback which has one parameter(typeof any[]) which filled by the rawResults (results after query executed and before exports to object(s)). * @returnType {nothing} * @return {nothing} */ on(evtType: string, callback: (rawResults: any[]) => void): void; - + /** * Removes or turn off an event listener/watcher from a table for a specific event type. * @param {string} evtType the Event type you want to remove, one of these: "INSERT", "UPDATE", "REMOVE", "SAVE". @@ -679,7 +679,7 @@ declare module "node-mysql-wrapper" { * @return {nothing} */ off(evtType: string, callbackToRemove: (rawResults: any[]) => void): void; - + /** * Use it when you want to check if extended function is exists here. * @param {string} extendedFunctionName the name of the function you want to check. @@ -687,16 +687,16 @@ declare module "node-mysql-wrapper" { * @return {boolean} */ has(extendedFunctionName: string): boolean; - + /** * Extends this table's capabilities with a function. * @param {string} functionName the function name you want to use, this is used when you want to call this function later. * @param {function} theFunction the function with any optional parameters you want to pass along. * @returnType {nothing} - * @return {nothing} + * @return {nothing} */ extend(functionName: string, theFunction: (...args: any[]) => any): void; - + /** * Converts and returns an object from this form: { a_property:'dsda', other_property:something, any_property_name:true } to { aProperty:..., otherProperty...,anyPropertyName...} * @param {any} row the raw row object. @@ -704,7 +704,7 @@ declare module "node-mysql-wrapper" { * @return {any} */ objectFromRow(row: any): any; - + /** * Converts and returns an object from this form: { aProperty:'dsda', otherProperty:something, anyPropertyName:true } to { a_property:..., other_property...,any_property_name...} * @param {any} row the raw row object. @@ -712,7 +712,7 @@ declare module "node-mysql-wrapper" { * @return {any} */ rowFromObject(obj: any): any; - + /** * Returns and array of [columns[],values[]] * @param {any} jsObject the raw row object. @@ -720,7 +720,7 @@ declare module "node-mysql-wrapper" { * @return {array} */ getRowAsArray(jsObject: any): Array; - + /** * Returns the primary key's value from an object. * @param {any} jsObject the object which you want to find and return the value of the primary key. @@ -728,11 +728,11 @@ declare module "node-mysql-wrapper" { * @return {number | string} */ getPrimaryKeyValue(jsObject: any): number | string; - + /** - * + * */ - find(criteriaRawJsObject: any): Promise; // only criteria + find(criteriaRawJsObject: any): Promise; // only criteria find(criteriaRawJsObject: any, callback: ((_results: T[]) => any)): Promise; // criteria and callback find(criteriaRawJsObject: any, callback?: (_results: T[]) => any): Promise; @@ -778,7 +778,7 @@ declare module "node-mysql-wrapper" { constructor(connection?: Connection); static when(..._promises: Promise[]): Promise; setConnection(connection: Connection): void; - + /** * Force to use/fetch information from only certain of database's tables, otherwise all database's tables information will be fetched. * @param {Array} tables the array of the tables {string} @@ -793,18 +793,18 @@ declare module "node-mysql-wrapper" { noticeReady(): void; removeReadyListener(callback: () => void): void; query(queryStr: string, callback: (err: Mysql.IError, results: any) => any, queryArguments?: any[]): void; - + /** * Close the entire real connection and remove all event's listeners (if exist). - * the difference from the 'end' is that this method doesn't care about errors so no callback passing here. + * the difference from the 'end' is that this method doesn't care about errors so no callback passing here. */ destroy(): void; - + /** * Close the entire real connection and remove all event's listeners (if exist). * @param {function} maybeAcallbackError If error occurs when closing the connection, this callback has the responsibility to catch it. * @returnType {nothing} - * @return {nothing} + * @return {nothing} */ end(maybeAcallbackError: (err: any) => void): void; @@ -820,7 +820,7 @@ declare module "node-mysql-wrapper" { } function wrap(mysqlUrlOrObjectOrMysqlAlreadyConnection: Mysql.IConnection | string, ...useTables: any[]): Database; - + /** For meteor js only * Same as wrap but it's sync mode - autoconnect to the database without need to use database.ready(callback). */ diff --git a/nodemailer/nodemailer.d.ts b/nodemailer/nodemailer.d.ts index cd30f2acdc417b..a0d20a92f031c8 100644 --- a/nodemailer/nodemailer.d.ts +++ b/nodemailer/nodemailer.d.ts @@ -3,7 +3,7 @@ // Definitions by: Rogier Schouten // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// /// /// @@ -45,7 +45,7 @@ declare module "nodemailer" { * Send mail using a template. */ templateSender(template?: any, defaults?: any): (mailData: any, context: any) => Promise; - + /** * Send mail using a template with a callback. */ @@ -59,7 +59,7 @@ declare module "nodemailer" { * @param pluginFunc is a function that takes two arguments: the mail object and a callback function */ use(step: string, plugin: Plugin): void; - + /** * Verifies connection with server */ diff --git a/orientjs/orientjs.d.ts b/orientjs/orientjs.d.ts index 3edca67ba7925f..c528990a67fe91 100644 --- a/orientjs/orientjs.d.ts +++ b/orientjs/orientjs.d.ts @@ -5,7 +5,7 @@ // Developed with love in www.nowcando.com /// -/// +/// /* =================== USAGE =================== diff --git a/pify/pify-tests.ts b/pify/pify-tests.ts index b80657df76ac20..f166901d3eacac 100644 --- a/pify/pify-tests.ts +++ b/pify/pify-tests.ts @@ -1,5 +1,5 @@ /// -/// +/// import * as pify from 'pify'; import * as Bluebird from 'bluebird'; @@ -28,4 +28,4 @@ const fsP = pify(fs); fsP.readFile('foo.txt').then((result: string) => assert(result, 'foo')); pify(fs.readFile)('foo.txt').then((result: string) => assert(result, 'foo')); -pify(fs.readFile, Bluebird)('bar.txt').then((result: string) => assert(result, 'bar')); \ No newline at end of file +pify(fs.readFile, Bluebird)('bar.txt').then((result: string) => assert(result, 'bar')); diff --git a/project-oxford/project-oxford-tests.ts b/project-oxford/project-oxford-tests.ts index 896d407b8de8b2..9d25a8a233a7e5 100644 --- a/project-oxford/project-oxford-tests.ts +++ b/project-oxford/project-oxford-tests.ts @@ -1,5 +1,5 @@ /// -/// +/// /// /// diff --git a/project-oxford/project-oxford.d.ts b/project-oxford/project-oxford.d.ts index 012ec821139ba8..18ccdee1d38837 100644 --- a/project-oxford/project-oxford.d.ts +++ b/project-oxford/project-oxford.d.ts @@ -3,8 +3,8 @@ // Definitions by: Scott Southwood // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "project-oxford" { import Promise = require("bluebird"); diff --git a/redlock/redlock.d.ts b/redlock/redlock.d.ts index 94ee8f3c7aa0ff..f0225d6c71beab 100644 --- a/redlock/redlock.d.ts +++ b/redlock/redlock.d.ts @@ -3,23 +3,23 @@ // Definitions by: Ilya Mochalov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module "redlock" { import * as redis from 'redis'; - import * as Promise from 'bluebird'; - + import * as Promise from 'bluebird'; + namespace Redlock { - + interface Callback { (err: any, value?: T): void; } interface Lock { - + redlock: Redlock; resource: string; value: any; @@ -38,7 +38,7 @@ declare module "redlock" { interface LockError extends Error {} } - + class Redlock { driftFactor: number; @@ -59,6 +59,6 @@ declare module "redlock" { extend(lock: Redlock.Lock, ttl: number, callback?: Redlock.Callback): Promise; } - + export = Redlock; } diff --git a/request-promise/request-promise.d.ts b/request-promise/request-promise.d.ts index a9d6cae8552ff9..5a5927284f9ad1 100644 --- a/request-promise/request-promise.d.ts +++ b/request-promise/request-promise.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// +/// declare module 'request-promise' { import request = require('request'); diff --git a/rethinkdb/rethinkdb.d.ts b/rethinkdb/rethinkdb.d.ts index 7161e42060f6cc..0ac674977a5b11 100644 --- a/rethinkdb/rethinkdb.d.ts +++ b/rethinkdb/rethinkdb.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Reference: http://www.rethinkdb.com/api/#js // TODO: Document manipulation and below -/// +/// declare module "rethinkdb" { diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index 4cf94ce77da25d..00351328f09ec1 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -6,7 +6,7 @@ // Based on original work by: samuelneff /// -/// +/// /// declare module "sequelize" { diff --git a/stamplay-js-sdk/stamplay-js-sdk.d.ts b/stamplay-js-sdk/stamplay-js-sdk.d.ts index 952ed78ea0ab48..1f2ec68500bfb4 100644 --- a/stamplay-js-sdk/stamplay-js-sdk.d.ts +++ b/stamplay-js-sdk/stamplay-js-sdk.d.ts @@ -3,7 +3,7 @@ // Definitions by: Riderman de Sousa Barbosa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Stamplay { diff --git a/stripe-node/stripe-node.d.ts b/stripe-node/stripe-node.d.ts index 1e3d2caca7adf0..cd2d41bf51ce58 100644 --- a/stripe-node/stripe-node.d.ts +++ b/stripe-node/stripe-node.d.ts @@ -3,7 +3,7 @@ // Definitions by: William Johnston , Peter Harris // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module 'stripe' { @@ -16,7 +16,7 @@ declare namespace StripeNode { new (apiKey: string, version?: string): Stripe; (apiKey: string, version?: string): Stripe; } - + interface StripeStatic { DEFAULT_HOST: string; DEFAULT_PORT: string; @@ -37,11 +37,11 @@ declare namespace StripeNode { resources: typeof resources; StripeResource: typeof StripeResource; } - - // Helper + + // Helper type IBankAccount = bankAccounts.IBankAccount; type ICard = cards.ICard; - + interface Stripe extends StripeStatic { accounts: resources.Accounts; balance: resources.Balance; @@ -72,11 +72,11 @@ declare namespace StripeNode { orders: resources.Orders; products: resources.Products; skus: resources.SKUs; - + setHost(host: string): void; setHost(host: string, port: string|number): void; setHost(host: string, port: string|number, protocol: string): void; - + setProtocol(protocol: string): void; setPort(port: string|number): void; setApiVersion(version?: string): void; @@ -86,274 +86,274 @@ declare namespace StripeNode { getConstant(c: string): any; getClientUserAgent(response: (userAgent: string) => void): void; } - - namespace accounts { + + namespace accounts { interface IAccount extends IResourceObject, IAccountShared { /** * Value is "account" */ object: string; - + /** * Whether or not the account can create live charges */ charges_enabled: boolean; - + /** * The country of the account */ country: string; - + /** - * Whether or not account details have been submitted yet. Standalone + * Whether or not account details have been submitted yet. Standalone * accounts cannot receive transfers before this is true. */ details_submitted: boolean; - + /** - * The display name for this account. This is used on the Stripe dashboard to + * The display name for this account. This is used on the Stripe dashboard to * help you differentiate between accounts. */ display_name: string; - + /** - * Whether or not Stripe will send automatic transfers for this account. This - * is only false when Stripe is waiting for additional information from the + * Whether or not Stripe will send automatic transfers for this account. This + * is only false when Stripe is waiting for additional information from the * account holder. */ transfers_enabled: boolean; - + /** - * The state of the account’s information requests, including what + * The state of the account’s information requests, including what * information is needed and by when it must be provided. */ verification: { /** - * A string describing the reason for this account being unable to charge - * and/or transfer, if that is the case. Possible values are "rejected.fraud", - * "rejected.terms_of_service", "rejected.listed", "rejected.other", + * A string describing the reason for this account being unable to charge + * and/or transfer, if that is the case. Possible values are "rejected.fraud", + * "rejected.terms_of_service", "rejected.listed", "rejected.other", * "fields_needed", "listed", or "other". */ disabled_reason: string; - + /** - * At what time the fields_needed must be provided. If this date is in - * the past, the account is already in bad standing, and providing - * fields_needed is necessary to re-enable transfers and prevent other - * consequences. If this date is in the future, fields_needed must be + * At what time the fields_needed must be provided. If this date is in + * the past, the account is already in bad standing, and providing + * fields_needed is necessary to re-enable transfers and prevent other + * consequences. If this date is in the future, fields_needed must be * provided to ensure the account remains in good standing. */ due_by: number; - + /** - * Field names that need to be provided for the account to remain in good - * standing. Nested fields are separated by "." (for example, + * Field names that need to be provided for the account to remain in good + * standing. Nested fields are separated by "." (for example, * "legal_entity.first_name"). */ fields_needed: Array; } } - + interface IAccountCreationOptions extends IAccountUpdateOptions { /** - * The country the account holder resides in or that the business is legally - * established in. For example, if you are in the United States and the - * business you’re creating an account for is legally represented in Canada, + * The country the account holder resides in or that the business is legally + * established in. For example, if you are in the United States and the + * business you’re creating an account for is legally represented in Canada, * you would use “CA” as the country for the account being created. */ country?: string; - + /** - * The email address of the account holder. For standalone accounts, Stripe - * will email your user with instructions for how to set up their account. For - * managed accounts, this is only to make the account easier to identify to + * The email address of the account holder. For standalone accounts, Stripe + * will email your user with instructions for how to set up their account. For + * managed accounts, this is only to make the account easier to identify to * you: Stripe will never directly reach out to your users. */ email: string; - + /** - * Whether you'd like to create a managed or standalone account. Managed - * accounts have extra parameters available to them, and require that you, - * the platform, handle all communication with the account holder. - * Standalone accounts are normal Stripe accounts: Stripe will email the - * account holder to setup a username and password, and handle all account + * Whether you'd like to create a managed or standalone account. Managed + * accounts have extra parameters available to them, and require that you, + * the platform, handle all communication with the account holder. + * Standalone accounts are normal Stripe accounts: Stripe will email the + * account holder to setup a username and password, and handle all account * management directly with them. */ managed?: boolean; } - + interface IAccountShared { business_logo?: string; - + /** * The publicly sharable name for this account */ business_name?: string; - + /** - * A CSS hex color value representing the primary branding color for this + * A CSS hex color value representing the primary branding color for this * account */ business_primary_color?: string; - + /** * The URL that best shows the service or product provided for this account */ business_url?: string; - + /** - * A boolean for whether or not Stripe should try to reclaim negative - * balances from the account holder’s bank account. See our managed + * A boolean for whether or not Stripe should try to reclaim negative + * balances from the account holder’s bank account. See our managed * account bank transfer guide for more information */ debit_negative_balances?: boolean; - + /** - * Account-level settings to automatically decline certain types of charges + * Account-level settings to automatically decline certain types of charges * regardless of the bank’s decision. */ decline_charge_on?: { /** - * Whether or not Stripe should automatically decline charges with an - * incorrect zip/postal code. This setting only applies if a card includes a + * Whether or not Stripe should automatically decline charges with an + * incorrect zip/postal code. This setting only applies if a card includes a * zip code and the bank specifically marks it as failed. */ avs_failure?: boolean; - + /** - * Whether or not Stripe should automatically decline charges with an - * incorrect CVC. This setting only applies if a card includes a CVC and the + * Whether or not Stripe should automatically decline charges with an + * incorrect CVC. This setting only applies if a card includes a CVC and the * bank specifically marks it as failed. */ cvc_failure?: boolean; }; - + /** - * Three-letter ISO currency code representing the default currency for the - * account. This must be a currency that Stripe supports in the account’s + * Three-letter ISO currency code representing the default currency for the + * account. This must be a currency that Stripe supports in the account’s * country. */ default_currency?: string; - + /** - * Email address of the account holder. For standalone accounts, this is used - * to email them asking them to claim their Stripe account. For managed - * accounts, this is only to make the account easier to identify to you: Stripe + * Email address of the account holder. For standalone accounts, this is used + * to email them asking them to claim their Stripe account. For managed + * accounts, this is only to make the account easier to identify to you: Stripe * will not email the account holder. */ email?: string; - + /** - * Information about the holder of this account, i.e. the user receiving funds + * Information about the holder of this account, i.e. the user receiving funds * from this account */ legal_entity?: {}; //TODO: Implement this type definition. - + /** - * A set of key/value pairs that you can attach to an account object. It can be - * useful for storing additional information about the account in a structured + * A set of key/value pairs that you can attach to an account object. It can be + * useful for storing additional information about the account in a structured * format. This can be unset by updating the value to null and then saving. */ metadata?: IMetadata; - + /** - * Internal-only description of the product being sold or service being - * provided by this account. It’s used by Stripe for risk and underwriting + * Internal-only description of the product being sold or service being + * provided by this account. It’s used by Stripe for risk and underwriting * purposes. */ product_description?: string; - + /** - * The text that will appear on credit card statements by default if a charge is + * The text that will appear on credit card statements by default if a charge is * being made directly on the account. */ statement_descriptor?: string; - + /** - * A publicly shareable email address that can be reached for support for this + * A publicly shareable email address that can be reached for support for this * account */ support_email?: string; - + /** - * A publicly shareable phone number that can be reached for support for + * A publicly shareable phone number that can be reached for support for * this account */ support_phone?: string; - + /** * A publicly shareable URL that can be reached for support for this account */ support_url?: string; - + /** - * Details on who accepted the Stripe terms of service, and when they - * accepted it. See our updating managed accounts guide for more + * Details on who accepted the Stripe terms of service, and when they + * accepted it. See our updating managed accounts guide for more * information */ tos_acceptance?: { /** - * The unix timestamp that Stripe’s terms of service were agreed to by the + * The unix timestamp that Stripe’s terms of service were agreed to by the * account holder */ date: number; - + /** * The IP address from which Stripe’s terms of service were agreed to by the account holder */ ip?: string; - + /** - * The user agent of the browser from which Stripe’s terms of service + * The user agent of the browser from which Stripe’s terms of service * were agreed to by the account holder */ user_agent?: string; }; - + /** - * Details on when this account will make funds from charges available, and - * when they will be paid out to the account holder’s bank account. See our + * Details on when this account will make funds from charges available, and + * when they will be paid out to the account holder’s bank account. See our * managed account bank transfer guide for more information */ transfer_schedule?: { /** - * The number of days charges for the account will be held before being - * paid out. May also be the string “minimum” for the lowest available - * value (based on country). Default is “minimum”. Does not apply when + * The number of days charges for the account will be held before being + * paid out. May also be the string “minimum” for the lowest available + * value (based on country). Default is “minimum”. Does not apply when * interval is “manual”. */ delay_days?: number | string; - + /** - * How frequently funds will be paid out. One of "manual" (for only + * How frequently funds will be paid out. One of "manual" (for only * triggered via API call), "daily", "weekly", or "monthly". Default is "daily". */ interval?: string; - + /** - * The day of the month funds will be paid out. Required and available + * The day of the month funds will be paid out. Required and available * only if interval is "monthly". */ monthly_anchor?: number; - + /** - * The day of the week funds will be paid out, of the style ‘monday’, + * The day of the week funds will be paid out, of the style ‘monday’, * ‘tuesday’, etc. Required and available only if interval is weekly. */ weekly_anchor?: string; } } - + interface IAccountUpdateOptions extends IDataOptions, IAccountShared { /** - * A card or bank account to attach to the account. You can provide either a - * token, like the ones returned by Stripe.js, or a dictionary as documented in - * the external_account parameter for either card or bank account creation. - * - * This will create a new external account object, make it the new default - * external account for its currency, and delete the old default if one exists. If - * you want to add additional external accounts instead of replacing the - * existing default for this currency, use the bank account or card creation + * A card or bank account to attach to the account. You can provide either a + * token, like the ones returned by Stripe.js, or a dictionary as documented in + * the external_account parameter for either card or bank account creation. + * + * This will create a new external account object, make it the new default + * external account for its currency, and delete the old default if one exists. If + * you want to add additional external accounts instead of replacing the + * existing default for this currency, use the bank account or card creation * API. */ external_account?: { @@ -361,241 +361,241 @@ declare namespace StripeNode { * The type of external account. Should be "bank_account". */ object: string; - + /** - * The account number for the bank account in string form. Must be a + * The account number for the bank account in string form. Must be a * checking account. */ account_number: string; - + /** * The country the bank account is in. */ country: string; - + /** - * The currency the bank account is in. This must be a country/currency + * The currency the bank account is in. This must be a country/currency * pairing that Stripe supports. */ currency: string; - + /** - * The name of the person or business that owns the bank account. This + * The name of the person or business that owns the bank account. This * field is required when attaching the bank account to a customer object. */ account_holder_name?: string; - + /** - * The type of entity that holds the account. This can be either - * "individual" or "company". This field is required when attaching the + * The type of entity that holds the account. This can be either + * "individual" or "company". This field is required when attaching the * bank account to a customer object. */ account_holder_type?: string; - + /** - * The routing number, sort code, or other country-appropriate institution - * number for the bank account. For US bank accounts, this is required - * and should be the ACH routing number, not the wire routing number. If - * you are providing an IBAN for account_number, this field is not + * The routing number, sort code, or other country-appropriate institution + * number for the bank account. For US bank accounts, this is required + * and should be the ACH routing number, not the wire routing number. If + * you are providing an IBAN for account_number, this field is not * required. */ routing_number?: string; } } - + interface IExternalAccountCreationOptions extends IDataOptionsWithMetadata { /** - * When adding a card to a customer, the parameter name is source. When - * adding to an account, the parameter name is external_account. The - * value can either be a token, like the ones returned by our Stripe.js, or a - * dictionary containing a user’s credit card details (with the options shown + * When adding a card to a customer, the parameter name is source. When + * adding to an account, the parameter name is external_account. The + * value can either be a token, like the ones returned by our Stripe.js, or a + * dictionary containing a user’s credit card details (with the options shown * below). Stripe will automatically validate the card. */ external_account: string ; - + /** - * Only applicable on accounts (not customers or recipients). If you set this to true (or if this is the first external account being added + * Only applicable on accounts (not customers or recipients). If you set this to true (or if this is the first external account being added * in this currency) this card will become the default external account for its currency. */ default_for_currency?: boolean; } - + interface IExternalAccountUpdateOptions extends IDataOptionsWithMetadata { /** * If set to true, this bank account will become the default external account for its currency. */ default_for_currency?: boolean; } - + interface IBankAccountListOptions extends IListOptions { object: "bank_account" } - + interface ICardListOptions extends IListOptions { object: "card" } - + interface IRejectReason { /** - * The reason for rejecting the account. May be one of "fraud", + * The reason for rejecting the account. May be one of "fraud", * "terms_of_service", or "other". */ reason: "fraud" | "terms_of_service" | "other" ; } } - - namespace applicationFees { + + namespace applicationFees { interface IApplicationFee extends IResourceObject { /** * Value is "application_fee" */ object: string; - + /** * ID of the Stripe account this fee was taken from. [Expandable] */ account: string | accounts.IAccount; - + /** * Amount earned, in cents/pence. */ amount: number; - + /** * Positive integer or zero */ amount_refunded: number; - + /** * ID of the Connect Application that earned the fee. [Expandable] */ application: string; //TODO: Implement IApplication interface and reference type here for expansion:- "string | IApplication" - + /** - * Balance transaction that describes the impact of this collected application + * Balance transaction that describes the impact of this collected application * fee on your account balance (not including refunds). [Expandable] */ balance_transaction: string | balance.IBalanceTransaction; - + /** * ID of the charge that the application fee was taken from. [Expandable] */ charge: string | charges.ICharge; - + created: number; - + /** * Three-letter ISO code representing the currency of the charge. */ currency: string; - + livemode: boolean; - + /** - * ID of the corresponding charge on the platform account, if this fee was the + * ID of the corresponding charge on the platform account, if this fee was the * result of a charge using the destination parameter. [Expandable] */ originating_transaction: string; - + /** - * Whether or not the fee has been fully refunded. If the fee is only partially + * Whether or not the fee has been fully refunded. If the fee is only partially * refunded, this attribute will still be false. */ refunded: boolean; - + /** * A list of refunds that have been applied to the fee. */ refunds: IApplicationFeeRefunds; } - + interface IApplicationFeeListOptions extends IListOptionsCreated { /** * Only return application fees for the charge specified by this charge ID. */ charge: string; } - + interface IApplicationFeeRefund extends IResourceObject { /** * Value is "fee_refund" */ object:string; - + /** * Amount, in cents/pence. */ amount: number; - + /** * Balance transaction that describes the impact on your account balance. */ balance_transaction: string | balance.IBalanceTransaction; - + created: number; - + /** * Three-letter ISO code representing the currency. */ currency: string; - + /** * ID of the application fee that was refunded. */ fee: string | IApplicationFee; - + /** - * A set of key/value pairs that you can attach to the object. It can be useful + * A set of key/value pairs that you can attach to the object. It can be useful * for storing additional information in a structured format. */ metadata: IMetadata; } - + interface IApplicationFeeRefunds extends IList, resources.ApplicationFeeRefunds { } - + interface IApplicationFeeRefundCreationOptions extends IDataOptions { /** - * A positive integer in pence representing how much of this fee to refund. + * A positive integer in pence representing how much of this fee to refund. * Can only refund up to the unrefunded amount remaining of the fee. - * + * * default is entire application fee */ amount?: number; - + /** - * A set of key/value pairs that you can attach to a refund object. It can be - * useful for storing additional information about the refund in a structured - * format. You can unset an individual key by setting its value to null and + * A set of key/value pairs that you can attach to a refund object. It can be + * useful for storing additional information about the refund in a structured + * format. You can unset an individual key by setting its value to null and * then saving. To clear all keys, set metadata to null, then save. */ metadata?: IMetadata; } } - + namespace balance { interface IBalance extends IObject { /** * Value is 'balance' */ object: string; - + /** - * Funds that are available to be paid out automatically by Stripe or explicitly - * via the transfers API. The available balance for each currency and payment + * Funds that are available to be paid out automatically by Stripe or explicitly + * via the transfers API. The available balance for each currency and payment * type can be found in the source_types property. */ available: Array; - + livemode: boolean; - + /** - * Funds that are not available in the balance yet, due to the 7-day rolling pay - * cycle. The pending balance for each currency and payment type can be + * Funds that are not available in the balance yet, due to the 7-day rolling pay + * cycle. The pending balance for each currency and payment type can be * found in the source_types property */ pending: Array; } - + interface ISourceType { currency: string; amount: number; @@ -606,7 +606,7 @@ declare namespace StripeNode { alipay_account?: number; } } - + interface IBalanceTransaction extends IResourceObject { /** * Value is 'balance_transaction' @@ -622,16 +622,16 @@ declare namespace StripeNode { * The date the transaction's net funds will become available in the Stripe balance. */ available_on: number; - + created: number; /** * Three-letter ISO currency code representing the currency. */ currency: string; - + description?: string; - + /** * Fee (in cents/pence) paid for this transaction */ @@ -643,14 +643,14 @@ declare namespace StripeNode { fee_details: Array<{ amount: number; application: string; - + /** * Three-letter ISO currency code representing the currency of the amount that was disputed. */ currency: string; - + description: string; - + /** * Type of the fee, one of: "application_fee", "stripe_fee"" or "tax". */ @@ -661,50 +661,50 @@ declare namespace StripeNode { * Net amount of the transaction, in cents. */ net: number; - + /** * The Stripe object this transaction is related to. [Expandable] */ source: string | IResourceObject; - + /** * The transfers (if any) for which source is a source_transaction. */ source_transfers: IList; - + /** * If the transaction's net funds are available in the Stripe balance yet. Either "available" or "pending". */ status: string; /** - * Transaction type: "adjustment", "application_fee", - * "application_fee_refund", "charge", "payment", "payment_refund", - * "refund", "transfer", "transfer_cancel", "transfer_failure", or + * Transaction type: "adjustment", "application_fee", + * "application_fee_refund", "charge", "payment", "payment_refund", + * "refund", "transfer", "transfer_cancel", "transfer_failure", or * "transfer_refund". */ type: string; } - + interface IBalanceListOptions extends IListOptions { available_on?: string | IDateFilter; currency?: string; - + /** - * Only returns transactions that are related to the specified Stripe object ID + * Only returns transactions that are related to the specified Stripe object ID * (e.g. filtering by a charge ID will return all related charge transactions). */ source?: string; - + /** - * For automatic Stripe transfers only, only returns transactions that were + * For automatic Stripe transfers only, only returns transactions that were * transferred out on the specified transfer ID. */ transfer?: string; - + /** - * Only returns transactions of the given type. One of: "charge", "refund", - * "adjustment", "application_fee", "application_fee_refund", "transfer", + * Only returns transactions of the given type. One of: "charge", "refund", + * "adjustment", "application_fee", "application_fee_refund", "transfer", * or "transfer_failure" */ type?: string; @@ -727,25 +727,25 @@ declare namespace StripeNode { * Amount charged in cents/pence, positive integer or zero. */ amount: number; - + /** - * Amount in cents/pence refunded (can be less than the amount attribute on the + * Amount in cents/pence refunded (can be less than the amount attribute on the * charge if a partial refund was issued), positive integer or zero. */ amount_refunded: number; - + /** - * The application fee (if any) for the charge. See the Connect documentation + * The application fee (if any) for the charge. See the Connect documentation * for details. [Expandable] */ application_fee?: string; - + /** - * ID of the balance transaction that describes the impact of this charge on + * ID of the balance transaction that describes the impact of this charge on * your account balance (not including refunds or disputes). [Expandable] */ balance_transaction: string | balance.IBalanceTransaction; - + /** * If the charge was created without capturing, this boolean represents whether or not it is * still uncaptured or has since been captured. @@ -755,34 +755,34 @@ declare namespace StripeNode { created: number; /** - * Three-letter ISO currency code representing the currency in which the + * Three-letter ISO currency code representing the currency in which the * charge was made. */ currency: string; - + /** * ID of the customer this charge is for if one exists. [Expandable] */ customer: string | customers.ICustomer; - + description?: string; - + /** * Details about the dispute if the charge has been disputed. */ dispute?: disputes.IDispute; - + /** * Error code explaining reason for charge failure if available (see the errors section for a list of * codes: https://stripe.com/docs/api#errors). */ failure_code: string; - + /** * Message to user further explaining reason for charge failure if available. */ failure_message: string; - + /** * Hash with information on fraud assessments for the charge. */ @@ -797,36 +797,36 @@ declare namespace StripeNode { */ stripe_report?: "fraudulent"; }; - + /** * ID of the invoice this charge is for if one exists. [Expandable] */ invoice: string | invoices.IInvoice; - + livemode: boolean; - + metadata: IMetadata; - + /** * ID of the order this charge is for if one exists. [Expandable] */ order: string | orders.IOrder; - + /** * true if the charge succeeded, or was successfully authorized for later capture. */ paid: boolean; - + /** * This is the email address that the receipt for this charge was sent to. */ receipt_email: string; - + /** * This is the transaction number that appears on email receipts sent for this charge. */ receipt_number: string; - + /** * Whether or not the charge has been fully refunded. If the charge is only partially refunded, * this attribute will still be false. @@ -837,150 +837,150 @@ declare namespace StripeNode { * A list of refunds that have been applied to the charge. */ refunds: IChargeRefunds; - + /** * Shipping information for the charge. */ shipping?: IShippingInformation; - + /** * For most Stripe users, the source of every charge is a credit or debit card. * This hash is then the card object describing that card. */ source: cards.ICard | bitcoinReceivers.IBitcoinReceiver; - + /** - * The transfer ID which created this charge. Only present if the charge came + * The transfer ID which created this charge. Only present if the charge came * from another Stripe account. See the Connect documentation for details. * [Expandable] */ source_transfer: string | transfers.ITransfer; - + /** - * Extra information about a charge. This will appear on your customer’s + * Extra information about a charge. This will appear on your customer’s * credit card statement. */ statement_descriptor: string; - + /** * The status of the payment is either "succeeded", "pending", or "failed". */ status: "succeeded" | "pending" | "failed"; - + /** - * ID of the transfer to the destination account (only applicable if the + * ID of the transfer to the destination account (only applicable if the * charge was created using the destination parameter). [Expandable] */ transfer: string | transfers.ITransfer; } - + interface IChargeCreationOptions extends IDataOptions { /** - * A positive integer in the smallest currency unit (e.g 100 cents to charge - * $1.00, or 1 to charge ¥1, a 0-decimal currency) representing how much to - * charge the card. The minimum amount is £0.50 (or equivalent in charge + * A positive integer in the smallest currency unit (e.g 100 cents to charge + * $1.00, or 1 to charge ¥1, a 0-decimal currency) representing how much to + * charge the card. The minimum amount is £0.50 (or equivalent in charge * currency). */ amount: number; - + /** * 3-letter ISO code for currency. */ currency: string; - + /** - * A fee in pence that will be applied to the charge and transferred to the - * application owner's Stripe account. To use an application fee, the request - * must be made on behalf of another account, using the Stripe-Account - * header, an OAuth key, or the destination parameter. For more + * A fee in pence that will be applied to the charge and transferred to the + * application owner's Stripe account. To use an application fee, the request + * must be made on behalf of another account, using the Stripe-Account + * header, an OAuth key, or the destination parameter. For more * information, see the application fees documentation. - * + * * Connect only. */ application_fee?: number; - + /** - * Whether or not to immediately capture the charge. When false, the charge - * issues an authorization (or pre-authorization), and will need to be - * captured later. Uncaptured charges expire in 7 days. For more information, + * Whether or not to immediately capture the charge. When false, the charge + * issues an authorization (or pre-authorization), and will need to be + * captured later. Uncaptured charges expire in 7 days. For more information, * see authorizing charges and settling later. */ capture?: boolean; - + /** - * An arbitrary string which you can attach to a charge object. It is displayed - * when in the web interface alongside the charge. Note that if you use Stripe - * to send automatic email receipts to your customers, your receipt emails + * An arbitrary string which you can attach to a charge object. It is displayed + * when in the web interface alongside the charge. Note that if you use Stripe + * to send automatic email receipts to your customers, your receipt emails * will include the description of the charge(s) that they are describing. */ description?: string; - + /** - * An account to make the charge on behalf of. If specified, the charge will be - * attributed to the destination account for tax reporting, and the funds from - * the charge will be transferred to the destination account. The ID of the - * resulting transfer will be returned in the transfer field of the response. See + * An account to make the charge on behalf of. If specified, the charge will be + * attributed to the destination account for tax reporting, and the funds from + * the charge will be transferred to the destination account. The ID of the + * resulting transfer will be returned in the transfer field of the response. See * the documentation for details. - * + * * Connect only. */ destination?: string; - + /** - * A set of key/value pairs that you can attach to a charge object. It can be - * useful for storing additional information about the customer in a - * structured format. It's often a good idea to store an email address in + * A set of key/value pairs that you can attach to a charge object. It can be + * useful for storing additional information about the customer in a + * structured format. It's often a good idea to store an email address in * metadata for tracking later. */ metadata?: IMetadata; - + /** - * The email address to send this charge's receipt to. The receipt will not be - * sent until the charge is paid. If this charge is for a customer, the email - * address specified here will override the customer's email address. - * Receipts will not be sent for test mode charges. If receipt_email is - * specified for a charge in live mode, a receipt will be sent regardless of your + * The email address to send this charge's receipt to. The receipt will not be + * sent until the charge is paid. If this charge is for a customer, the email + * address specified here will override the customer's email address. + * Receipts will not be sent for test mode charges. If receipt_email is + * specified for a charge in live mode, a receipt will be sent regardless of your * email settings. */ receipt_email?: string; - + /** - * Shipping information for the charge. Helps prevent fraud on charges for - * physical goods. For more information, see the Charge object + * Shipping information for the charge. Helps prevent fraud on charges for + * physical goods. For more information, see the Charge object * documentation. */ shipping?: IShippingInformation; - + /** * The ID of an existing customer that will be charged in this request. */ customer?: string; - - /** - * A payment source to be charged, such as a credit card. If you also pass a - * customer ID, the source must be the ID of a source belonging to the - * customer. Otherwise, if you do not pass a customer ID, the source you - * provide must either be a token, like the ones returned by Stripe.js, or a - * object containing a user's credit card details, with the options described - * below. Although not all information is required, the extra info helps + + /** + * A payment source to be charged, such as a credit card. If you also pass a + * customer ID, the source must be the ID of a source belonging to the + * customer. Otherwise, if you do not pass a customer ID, the source you + * provide must either be a token, like the ones returned by Stripe.js, or a + * object containing a user's credit card details, with the options described + * below. Although not all information is required, the extra info helps * prevent fraud. */ source?: sources.ISourceCreationOptions; - - /** - * An arbitrary string to be displayed on your customer's credit card - * statement. This may be up to 22 characters. As an example, if your - * website is RunClub and the item you're charging for is a race ticket, you - * may want to specify a statement_descriptor of - * RunClub 5K race ticket. The statement description may not include - * <>"' characters, and will appear on your customer's statement in capital - * letters. Non-ASCII characters are automatically stripped. While most - * banks display this information consistently, some may display it + + /** + * An arbitrary string to be displayed on your customer's credit card + * statement. This may be up to 22 characters. As an example, if your + * website is RunClub and the item you're charging for is a race ticket, you + * may want to specify a statement_descriptor of + * RunClub 5K race ticket. The statement description may not include + * <>"' characters, and will appear on your customer's statement in capital + * letters. Non-ASCII characters are automatically stripped. While most + * banks display this information consistently, some may display it * incorrectly or not at all. */ statement_descriptor?: string; } - + interface IChargeUpdateOptions extends IDataOptionsWithMetadata { /** * An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. @@ -988,7 +988,7 @@ declare namespace StripeNode { * of the charge(s) that they are describing. This can be unset by updating the value to null and then saving. */ description?: string; - + /** * A set of key/value pairs you can attach to a charge giving information about its riskiness. */ @@ -1006,27 +1006,27 @@ declare namespace StripeNode { * If this field is updated, then a new email receipt will be sent to the updated address. */ receipt_email?: string; - + /** - * Shipping information for the charge. Helps prevent fraud on charges for + * Shipping information for the charge. Helps prevent fraud on charges for * physical goods. */ shipping?: IShippingInformation; } - + interface IChargeListOptions extends IListOptionsCreated { /** * Only return charges for the customer specified by this customer ID. */ customer?: string; - + /** - * A filter on the list based on the source of the charge. The value can be a + * A filter on the list based on the source of the charge. The value can be a * dictionary with the following options: */ source?: { /** - * Return charges that match this source type string. Available options are + * Return charges that match this source type string. Available options are * "all", "alipay_account", "bitcoin_receiver", or "card". */ object: "all" | "alipay_account" | "bitcoin_receiver" | "card"; @@ -1035,7 +1035,7 @@ declare namespace StripeNode { interface IChargeRefunds extends IList, resources.ChargeRefunds { } } - + namespace coupons { /** * A discount represents the actual application of a coupon to a particular customer. It contains information @@ -1046,20 +1046,20 @@ declare namespace StripeNode { * Value is 'discount' */ object: "discount"; - + /** * Hash describing the coupon applied to create this discount */ coupon: ICoupon; - + customer: string; - + /** * If the coupon has a duration of once or repeating, the date that this discount will end. If the coupon * used has a forever duration, this attribute will be null. */ end: number; - + /** * Date that the coupon was applied */ @@ -1080,36 +1080,36 @@ declare namespace StripeNode { * Value is 'coupon' */ object: "coupon"; - + /** * Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer. */ amount_off: number; - + created: number; - + /** * If amount_off has been set, the currency of the amount to take off. */ currency: string; - + /** * One of "forever", "once", and "repeating". Describes how long a customer who applies this coupon will get the discount. */ duration: "forever" | "once" | "repeating" ; - + /** * If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once. */ duration_in_months: number; - + livemode: boolean; - + /** * Maximum number of times this coupon can be redeemed, in total, before it is no longer valid. */ max_redemptions: number; - + metadata: IMetadata; /** @@ -1133,39 +1133,39 @@ declare namespace StripeNode { */ valid: boolean; } - + interface ICouponCreationOptions extends IDataOptionsWithMetadata { /** - * Unique string of your choice that will be used to identify this coupon when applying it to a customer. This is often a specific - * code you’ll give to your customer to use when signing up (e.g. FALL25OFF). If you don’t want to specify a particular code, you + * Unique string of your choice that will be used to identify this coupon when applying it to a customer. This is often a specific + * code you’ll give to your customer to use when signing up (e.g. FALL25OFF). If you don’t want to specify a particular code, you * can leave the ID blank and we’ll generate a random code for you. */ id?: string; - + /** * Specifies how long the discount will be in effect. Can be forever, once, or repeating. */ duration: "forever" | "once" | "repeating" ; - + /** * A positive integer representing the amount to subtract from an invoice total (required if percent_off is not passed) */ amount_off?: number; - + /** * Currency of the amount_off parameter (required if amount_off is passed) */ currency?: string; - + /** - * Required only if duration is repeating, in which case it must be a positive integer that specifies the number of months + * Required only if duration is repeating, in which case it must be a positive integer that specifies the number of months * the discount will be in effect. */ duration_in_months?: number; - + /** - * A positive integer specifying the number of times the coupon can be redeemed before it’s no longer valid. - * + * A positive integer specifying the number of times the coupon can be redeemed before it’s no longer valid. + * * For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ max_redemptions?: number; @@ -1176,13 +1176,13 @@ declare namespace StripeNode { percent_off?: number; /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. + * Unix timestamp specifying the last time at which the coupon can be redeemed. * After the redeem_by date, the coupon can no longer be applied to new customers. */ redeem_by?: number; } } - + namespace customers { /** * Customer objects allow you to perform recurring charges and track multiple charges that are associated @@ -1194,7 +1194,7 @@ declare namespace StripeNode { * Value is 'customer' */ object: "customer"; - + /** * Current balance, if any, being stored on the customer's account. If negative, the customer has credit to apply to * the next invoice. If positive, the customer has an amount owed that will be added to the next invoice. The balance @@ -1202,9 +1202,9 @@ declare namespace StripeNode { * to any invoice. This balance is only taken into account for recurring charges. */ account_balance?: number; - + created: number; - + /** * The currency the customer can be charged in for recurring billing purposes (subscriptions, invoices, invoice items). */ @@ -1219,40 +1219,40 @@ declare namespace StripeNode { * Whether or not the latest charge for the customer's latest invoice has failed */ delinquent: boolean; - + description?: string; - + /** * Describes the current discount active on the customer, if there is one. */ discount?: coupons.IDiscount; - + email?: string; - + livemode: boolean; - + metadata?: IMetadata; - + /** * Shipping information associated with the customer. */ shipping: IShippingInformation; - + /** * The customer’s payment sources, if any */ sources?: IList; - + cards?: resources.CustomerCards; - + /** * The customer's current subscriptions, if any */ subscriptions: ICustomerSubscriptions; } - + interface ICustomerSubscriptions extends IList, resources.CustomerSubscriptions {} - + interface ICustomerCreationOptions extends IDataOptionsWithMetadata { /** * An integer amount in cents that is the starting account balance for your customer. A negative amount represents a credit that @@ -1277,7 +1277,7 @@ declare namespace StripeNode { * This can be unset by updating the value to null and then saving. */ email?: string; - + /** * The identifier of the plan to subscribe the customer to. If provided, the returned customer object will have a list of subscriptions * that the customer is currently subscribed to. If you subscribe a customer to a plan without a free trial, the customer must have a @@ -1291,24 +1291,24 @@ declare namespace StripeNode { * (5 x 10 cents) monthly. Defaults to 1 if not set. Only applies when the plan parameter is also provided. */ quantity?: number; - + shipping?: IShippingInformation; - + /** - * The source can either be a token, like the ones returned by our Stripe.js, or + * The source can either be a token, like the ones returned by our Stripe.js, or * a dictionary containing a user’s credit card details. */ source?: sources.ISourceCreationOptionsExtended; - + /** - * A positive decimal (with at most two decimal places) between 1 and 100. - * This represents the percentage of the subscription invoice subtotal that - * will be calculated and added as tax to the final amount each billing period. - * For example, a plan which charges $10/month with a tax_percent of 20.0 + * A positive decimal (with at most two decimal places) between 1 and 100. + * This represents the percentage of the subscription invoice subtotal that + * will be calculated and added as tax to the final amount each billing period. + * For example, a plan which charges $10/month with a tax_percent of 20.0 * will charge $12 per invoice. Can only be used if a plan is provided. */ tax_percent?: number; - + /** * Unix timestamp representing the end of the trial period the customer will get before being charged. If set, trial_end will * override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to @@ -1316,7 +1316,7 @@ declare namespace StripeNode { */ trial_end?: number; } - + interface ICustomerUpdateOptions extends IDataOptionsWithMetadata { /** * An integer amount in cents that is the starting account balance for your customer. A negative amount represents a credit that @@ -1329,12 +1329,12 @@ declare namespace StripeNode { * API will not have the discount. */ coupon?: string; - + /** * ID of source to make the customer’s new default for invoice payments */ default_source?: string; - + /** * An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. This can * be unset by updating the value to null and then saving. @@ -1346,45 +1346,45 @@ declare namespace StripeNode { * This can be unset by updating the value to null and then saving. */ email?: string; - + shipping?: IShippingInformation; - - /** - * The source can either be a token, like the ones returned by our Stripe.js, or - * a dictionary containing a user’s credit card details (with the options shown - * below). Passing source will create a new source object, make it the new - * customer default source, and delete the old customer default if one exists. - * If you want to add additional sources instead of replacing the existing - * default, use the card creation API. Whenever you attach a card to a + + /** + * The source can either be a token, like the ones returned by our Stripe.js, or + * a dictionary containing a user’s credit card details (with the options shown + * below). Passing source will create a new source object, make it the new + * customer default source, and delete the old customer default if one exists. + * If you want to add additional sources instead of replacing the existing + * default, use the card creation API. Whenever you attach a card to a * customer, Stripe will automatically validate the card. */ source?: sources.ISourceCreationOptionsExtended; } - + interface ICustomerSourceCreationOptions extends IDataOptionsWithMetadata { /** - * When adding a card to a customer, the parameter name is source. When - * adding to an account, the parameter name is external_account. The - * value can either be a token, like the ones returned by our Stripe.js, or a - * dictionary containing a user’s credit card details (with the options shown + * When adding a card to a customer, the parameter name is source. When + * adding to an account, the parameter name is external_account. The + * value can either be a token, like the ones returned by our Stripe.js, or a + * dictionary containing a user’s credit card details (with the options shown * below). Stripe will automatically validate the card. */ source: sources.ISourceCreationOptions; } - + interface ICustomerCardSourceCreationOptions extends ICustomerSourceCreationOptions { source: cards.ISourceCreationOptions; } - + interface IBankAccountSourceListOptions extends IListOptions { object: "bank_account" } - + interface ICardSourceListOptions extends IListOptions { object: "card" } } - + namespace disputes { /** * A dispute occurs when a customer questions your charge with their bank or credit card company. @@ -1397,24 +1397,24 @@ declare namespace StripeNode { * Value is 'dispute' */ object: "dispute"; - + /** * Disputed amount. Usually the amount of the charge, but can differ (usually because of currency * fluctuation or because only part of the order is disputed). */ amount: number; - + /** * List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your * Stripe account as a result of this dispute. */ balance_transactions: Array; - + /** * ID of the charge that was disputed. [Expandable] */ charge: string | charges.ICharge; - + /** * Date dispute was opened */ @@ -1424,12 +1424,12 @@ declare namespace StripeNode { * Three-letter ISO currency code representing the currency of the amount that was disputed. */ currency: string; - + /** * Evidence provided to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. */ evidence: IDisputeEvidence; - + /** * Information about the evidence submission. */ @@ -1439,7 +1439,7 @@ declare namespace StripeNode { * if the customer's bank or credit card company doesn't allow a response for this particular dispute. */ due_by: number; - + /** * Whether or not evidence has been saved for this dispute. */ @@ -1450,26 +1450,26 @@ declare namespace StripeNode { * if no evidence submissions have occurred. If true, then delivery of the latest evidence is not guaranteed. */ past_due: boolean; - + /** * The number of times the evidence has been submitted. You may submit evidence a maximum of 5 times */ submission_count: number; }; - + /** * If true, it is still possible to refund the disputed payment. Once the payment has been fully * refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. */ is_charge_refundable: boolean; - + livemode: boolean; metadata: IMetadata; - + /** - * Reason given by cardholder for dispute. - * Possible values are duplicate, fraudulent, subscription_canceled, product_unacceptable, - * product_not_received, unrecognized, credit_not_processed, incorrect_account_details, + * Reason given by cardholder for dispute. + * Possible values are duplicate, fraudulent, subscription_canceled, product_unacceptable, + * product_not_received, unrecognized, credit_not_processed, incorrect_account_details, * insufficient_funds, bank_cannot_process, debit_not_authorized, general. * Read more about dispute reasons: https://stripe.com/help/disputes#reasons */ @@ -1481,7 +1481,7 @@ declare namespace StripeNode { */ status: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "response_disabled" | "under_review" | "charge_refunded" | "won" | "lost"; } - + interface IDisputeEvidence { /** * Any server or activity logs showing proof that the customer accessed or downloaded the purchased @@ -1629,7 +1629,7 @@ declare namespace StripeNode { */ uncategorized_text?: string; } - + interface IDisputeUpdateOptions extends IDataOptionsWithMetadata { /** * Evidence to upload to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. @@ -1637,108 +1637,108 @@ declare namespace StripeNode { evidence?: disputes.IDisputeEvidence; } } - + namespace events { interface IEvent extends IResourceObject { /** * Value is "event" */ object: "event"; - + /** - * The Stripe API version used to render data. + * The Stripe API version used to render data. * Note: this property is populated for events on or after October 31, 2014. */ api_version: string; - + created: number; - + /** * Hash containing data associated with the event. */ data: { /** - * describes the object the event is about. For example, an - * invoice.created event will have a full invoice object as the value of + * describes the object the event is about. For example, an + * invoice.created event will have a full invoice object as the value of * the object key. */ object: IObject; - + /** - * + * */ previous_attributes?: {}; }; - + livemode: boolean; - + /** * Number of webhooks yet to be delivered successfully (return a 20x response) to the URLs you’ve specified. - * + * * positive integer or zero */ pending_webhooks: number; - + /** - * ID of the API request that caused the event. If null, the event was - * automatic (e.g. Stripe’s automatic subscription handling). Request logs are - * available in the dashboard but currently not in the API. Note: this property + * ID of the API request that caused the event. If null, the event was + * automatic (e.g. Stripe’s automatic subscription handling). Request logs are + * available in the dashboard but currently not in the API. Note: this property * is populated for events on or after April 23, 2013. */ request?: string; - + /** * Description of the event: e.g. invoice.created, charge.refunded, etc. */ type: string; } - + interface IEventListOptions extends IListOptionsCreated { /** - * A string containing a specific event name, or group of events using * as a - * wildcard. The list will be filtered to include only events with a matching + * A string containing a specific event name, or group of events using * as a + * wildcard. The list will be filtered to include only events with a matching * event property */ type: string; } } - + namespace fileUploads { interface IFileUpdate extends IResourceObject { /** * Value is "file_upload" */ object: "file_upload"; - + created: number; - + /** - * The purpose of the uploaded file. Possible values are "business_logo", - * "dispute_evidence", "identity_document", "incorporation_article", + * The purpose of the uploaded file. Possible values are "business_logo", + * "dispute_evidence", "identity_document", "incorporation_article", * "incorporation_document". */ purpose: IPurpose; - + /** * The size in bytes of the file upload object. */ size: number; - + /** - * The type of the file returned. Returns one of the following: + * The type of the file returned. Returns one of the following: * pdf, jpg, png. */ type: "pdf" | "jpg" | "png"; - + /** - * A read-only URL where the uploaded file can be accessed. Will be nil + * A read-only URL where the uploaded file can be accessed. Will be nil * unless the uploaded file has one of the following purposes: - * business_logo, dispute_evidence, incorporation_document. + * business_logo, dispute_evidence, incorporation_document. * Also nil if retrieved with the publishable API key. */ url: string; } - + interface IFileUploadCreationOptions extends IDataOptions { purpose: IPurpose; file: { @@ -1747,18 +1747,18 @@ declare namespace StripeNode { type: string | "application/octet-stream"; } } - + interface IFileUploadListOptions extends IListOptionsCreated { /** - * The file purpose to filter queries by. If none is provided, files will not be + * The file purpose to filter queries by. If none is provided, files will not be * filtered by purpose. */ purpose: IPurpose; } - + type IPurpose = "business_logo" | "dispute_evidence" | "identity_document" | "incorporation_article" | "incorporation_document"; } - + namespace invoices { /** * Invoices are statements of what a customer owes for a particular billing period, including subscriptions, @@ -1778,7 +1778,7 @@ declare namespace StripeNode { * Value is 'invoice' */ object: "invoice"; - + /** * Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge * amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may @@ -1787,13 +1787,13 @@ declare namespace StripeNode { * specified in amount_due. */ amount_due: number; - + /** * The fee in cents that will be applied to the invoice and transferred to the application owner's * Stripe account when the invoice is paid. */ application_fee: number; - + /** * Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any * payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt @@ -1807,30 +1807,30 @@ declare namespace StripeNode { * users. */ attempted: boolean; - + /** * ID of the latest charge generated for this invoice, if any. [Expandable] */ charge: string | charges.ICharge; - + /** * Whether or not the invoice is still trying to collect payment. An invoice is closed if it's either paid or * it has been marked closed. A closed invoice will no longer attempt to collect payment. */ closed: boolean; - + currency: string; customer: string; date: number; description: string; discount: coupons.IDiscount; - + /** * Ending customer balance after attempting to pay invoice. If the invoice has not been attempted yet, * this will be null. */ ending_balance: number; - + /** * Whether or not the invoice has been forgiven. Forgiving an invoice instructs us to update the subscription * status as if the invoice were succcessfully paid. Once an invoice has been forgiven, it cannot be unforgiven @@ -1839,20 +1839,20 @@ declare namespace StripeNode { forgiven: boolean; /** - * The individual line items that make up the invoice. - * + * The individual line items that make up the invoice. + * * lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. */ lines: IList; - + livemode: boolean; metadata: IMetadata; - + /** * The time at which payment will next be attempted. */ next_payment_attempt: number; - + /** * Whether or not payment was successfully collected for this invoice. An invoice can be paid (most commonly) * with a charge or with credit from the customer's account balance. @@ -1868,56 +1868,56 @@ declare namespace StripeNode { * Start of the usage period during which invoice items were added to this invoice */ period_start: number; - + /** * This is the transaction number that appears on email receipts sent for this invoice. */ receipt_number: string; - + /** * Starting customer balance before attempting to pay invoice. If the invoice has not been attempted yet, * this will be the current customer balance. */ starting_balance: number; - + /** * Extra information about an invoice for the customer�s credit card statement. */ statement_descriptor: string; - + /** * The subscription that this invoice was prepared for, if any. */ subscription: string; - + /** * Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date: number; - + /** * Total of all subscriptions, invoice items, and prorations on the invoice before any discount is applied */ subtotal: number; - + /** * The amount of tax included in the total, calculated from tax_percent and the subtotal. If no tax_percent * is defined, this value will be null. */ tax: number; - + /** * This percentage of the subtotal has been added to the total amount of the invoice, including invoice line * items and discounts. This field is inherited from the subscription's tax_percent field, but can be changed * before the invoice is paid. This field defaults to null. */ tax_percent: number; - + /** * Total after discount */ total: number; - + /** * The time at which webhooks for this invoice were successfully delivered (if the invoice had no webhooks to * deliver, this will match date). Invoice payment is delayed until webhooks are delivered, or until all webhook @@ -1925,160 +1925,160 @@ declare namespace StripeNode { */ webhooks_delivered_at: number; } - + interface IInvoiceLineItem extends IResourceObject { /** * The ID of the source of this line item, either an invoice item or a subscription */ id: string; - + /** * Value is "line_item" */ object: "line_item"; - + /** * The amount, in cents/pence */ amount: number; - + currency: string; - + /** * A text description of the line item, if the line item is an invoice item */ description: string; - + /** * If true, discounts will apply to this line item. Always false for prorations. */ discountable: boolean; - + /** * Whether or not this is a test line item */ livemode: boolean; - + metadata: IMetadata; - + /** - * The period this line_item covers. For subscription line items, this is the subscription period. For prorations, this starts when - * the proration was calculated, and ends at the period end of the subscription. For invoice items, this is the time at which the + * The period this line_item covers. For subscription line items, this is the subscription period. For prorations, this starts when + * the proration was calculated, and ends at the period end of the subscription. For invoice items, this is the time at which the * invoice item was created, so the period start and end are the same time. */ period: IPeriod; - + /** * The plan of the subscription, if the line item is a subscription or a proration */ plan: plans.IPlan; - + /** * Whether or not this is a proration */ proration: boolean; - + /** * The quantity of the subscription, if the line item is a subscription or a proration */ quantity: number; - + /** * When type is invoiceitem, the subscription that the invoice item pertains to, if any. Left blank when * type is already subscription, as it'd be redundant with id. */ subscription: string; - + /** * A string identifying the type of the source of this line item, either an invoiceitem or a subscription */ type: "invoiceitem" | "subscription"; } - + interface IInvoiceCreationOptions extends IDataOptionsWithMetadata { customer: string; - + /** - * A fee in pence that will be applied to the invoice and transferred to the application owner’s Stripe account. - * The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. + * A fee in pence that will be applied to the invoice and transferred to the application owner’s Stripe account. + * The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. * For more information, see the application fees documentation. */ application_fee?: number; - + description?: string; - + /** * Extra information about a charge for the customer’s credit card statement. */ statement_descriptor?: string - + /** - * The ID of the subscription to invoice. If not set, the created invoice will include all pending invoice items for + * The ID of the subscription to invoice. If not set, the created invoice will include all pending invoice items for * the customer. If set, the created invoice will exclude pending invoice items that pertain to other subscriptions. */ subscription?: string; - + /** * The percent tax rate applied to the invoice, represented as a decimal number. */ tax_percent?: number; } - + interface IInvoiceUpdateOptions extends IDataOptionsWithMetadata { /** - * A fee in pence that will be applied to the invoice and transferred to the application owner’s Stripe account. - * The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. + * A fee in pence that will be applied to the invoice and transferred to the application owner’s Stripe account. + * The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. * For more information, see the application fees documentation. */ application_fee?: number; - + /** * Boolean representing whether an invoice is closed or not. To close an invoice, pass true. */ closed?: boolean; - + description?: string; - + /** - * Boolean representing whether an invoice is forgiven or not. To forgive an invoice, pass true. Forgiving an invoice - * instructs us to update the subscription status as if the invoice were successfully paid. Once an invoice has been + * Boolean representing whether an invoice is forgiven or not. To forgive an invoice, pass true. Forgiving an invoice + * instructs us to update the subscription status as if the invoice were successfully paid. Once an invoice has been * forgiven, it cannot be unforgiven or reopened. */ forgiven?: boolean; - + /** * Extra information about a charge for the customer’s credit card statement. */ statement_descriptor?: string - + /** * The percent tax rate applied to the invoice, represented as a decimal number. */ tax_percent?: number; } - + interface IInvoiceListOptions extends IListOptions { /** * The identifier of the customer whose invoices to return. If none is provided, all invoices will be returned. */ customer?: string; - + date?: IDateFilter; } - + interface IInvoiceLineItemRetrievalOptions extends IListOptions { coupon?: string; - + /** * In the case of upcoming invoices, the customer of the upcoming invoice is required. In other cases it is ignored. */ customer?: string; - + /** * In the case of upcoming invoices, the subscription of the upcoming invoice is optional. In other cases it is ignored. */ subscription?: string; - + subscription_plan?: string; subscription_prorate?: boolean; subscription_proration_date?: number; @@ -2088,53 +2088,53 @@ declare namespace StripeNode { interface IInvoiceUpcomingOptions extends IDataOptions { /** - * The code of the coupon to apply. If a subscription or subscription_plan is provided, the invoice returned will preview updating - * or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming + * The code of the coupon to apply. If a subscription or subscription_plan is provided, the invoice returned will preview updating + * or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming * invoice from among the customer’s subscriptions. */ coupon?: string; - + /** - * The identifier of the subscription for which you’d like to retrieve the upcoming invoice. If not provided, but a subscription_plan - * is provided, you will preview creating a subscription to that plan. If neither subscription nor subscription_plan is provided, you + * The identifier of the subscription for which you’d like to retrieve the upcoming invoice. If not provided, but a subscription_plan + * is provided, you will preview creating a subscription to that plan. If neither subscription nor subscription_plan is provided, you * will retrieve the next upcoming invoice from among the customer’s subscriptions. */ subscription?: string; - + /** - * If set, the invoice returned will preview updating the subscription given to this plan, or creating a new subscription to this plan + * If set, the invoice returned will preview updating the subscription given to this plan, or creating a new subscription to this plan * if no subscription is given. */ subscription_plan?: string; - + /** - * If previewing an update to a subscription, this decides whether the preview will show the result of applying prorations or not. If - * set, one of subscription_plan or subscription, and one of subscription_plan, subscription_quantity or subscription_trial_end are + * If previewing an update to a subscription, this decides whether the preview will show the result of applying prorations or not. If + * set, one of subscription_plan or subscription, and one of subscription_plan, subscription_quantity or subscription_trial_end are * required. */ subscription_prorate?: boolean; - + /** - * If previewing an update to a subscription, and doing proration, subscription_proration_date forces the proration to be calculated as - * though the update was done at the specified time. The time given must be within the current subscription period, and cannot be - * before the subscription was on its current plan.If set, subscription, and one of subscription_plan, subscription_quantity or + * If previewing an update to a subscription, and doing proration, subscription_proration_date forces the proration to be calculated as + * though the update was done at the specified time. The time given must be within the current subscription period, and cannot be + * before the subscription was on its current plan.If set, subscription, and one of subscription_plan, subscription_quantity or * subscription_trial_end are required. Also, subscription_proration cannot be set to false. */ subscription_proration_date?: number; - + /** - * If provided, the invoice returned will preview updating or creating a subscription with that quantity. If set, one of subscription_plan + * If provided, the invoice returned will preview updating or creating a subscription with that quantity. If set, one of subscription_plan * or subscription is required. */ subscription_quantity?: number; - + /** - * If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of subscription_plan + * If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of subscription_plan * or subscription is required. */ subscription_trial_end?: number; } - + interface IPeriod { /** * The period start date @@ -2152,109 +2152,109 @@ declare namespace StripeNode { * Value is "invoiceitem" */ object: "invoiceitem"; - + amount: number; currency: string; customer: string; date: number; description: string; - + /** * If true, discounts will apply to this invoice item. Always false for prorations. */ discountable: boolean; - + invoice: string; livemode: boolean; metadata: IMetadata; - + period: invoices.IPeriod; - + /** * If the invoice item is a proration, the plan of the subscription that the proration was computed for. */ plan: plans.IPlan; - + /** * Whether or not the invoice item was created automatically as a proration adjustment when the customer switched plans */ proration: boolean; - + /** * If the invoice item is a proration, the quantity of the subscription that the proration was computed for. */ quantity: number; - + /** * The subscription that this invoice item has been created for, if any. */ subscription: string; } - + interface InvoiceItemCreationOptions extends IDataOptionsWithMetadata { /** - * The integer amount in cents of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer’s + * The integer amount in cents of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer’s * account, pass a negative amount. */ amount: number; - + /** * 3-letter ISO code for currency. */ currency: string; - + /** * The ID of the customer who will be billed when this invoice item is billed. */ customer: string; - + /** - * An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + * An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. * This can be unset by updating the value to null and then saving. */ description?: string; - + /** - * Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for + * Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for * all other invoice items. */ discountable?: boolean; - + /** - * The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming - * scheduled invoice. Use this when adding invoice items in response to an invoice.created webhook. You cannot add an invoice item + * The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming + * scheduled invoice. Use this when adding invoice items in response to an invoice.created webhook. You cannot add an invoice item * to an invoice that has already been paid, attempted or closed. */ invoice?: string; - + /** - * The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming - * scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice + * The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming + * scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice * item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ subscription?: string; } - + interface InvoiceItemUpdateOptions extends IDataOptionsWithMetadata { /** - * The integer amount in cents/pence of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's + * The integer amount in cents/pence of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's * account, pass a negative amount. */ amount?: number; - + /** - * An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. This can be + * An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. This can be * unset by updating the value to null and then saving. */ description?: string; - + /** - * Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other + * Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other * invoice items. Cannot be set to true for prorations. */ discountable?: boolean; } - + interface InvoiceItemListOptions extends IListOptionsCreated { /** * The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. @@ -2262,79 +2262,79 @@ declare namespace StripeNode { customer?: string; } } - + namespace orders { interface IOrder extends IResourceObject { /** * Value is "order" */ object: "order"; - + /** - * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal * currency) representing the total amount for the order. */ amount: number; - + /** * ID of the Connect Application that created the order. */ application: string; - + application_fee: number; - + /** * The ID of the payment used to pay for the order. Present if the order status is paid, fulfilled, or refunded. [Expandable] */ charge: string | charges.ICharge; - + created: number; - + /** * 3-letter ISO code representing the currency in which the order was made. */ currency: string; - + /** * The customer used for the order. [Expandable] */ customer: string | customers.ICustomer; - + /** * The email address of the customer placing the order. */ email: string; - + external_coupon_code: string; - + /** * List of items constituting the order. */ items: Array; - + livemode: boolean; metadata: IMetadata; - + /** - * The shipping method that is currently selected for this order, if any. If present, it is equal to one of the ids of shipping methods - * in the shipping_methods array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected + * The shipping method that is currently selected for this order, if any. If present, it is equal to one of the ids of shipping methods + * in the shipping_methods array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected * the first method. */ selected_shipping_method: string; - + /** * The shipping address for the order. Present if the order is for goods to be shipped. */ shipping: IShippingInformation; - + /** - * A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or + * A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or * when paying it. */ shipping_methods: Array; - + status: OrderStatus; - + /** * The timestamps at which the order status was updated */ @@ -2344,225 +2344,225 @@ declare namespace StripeNode { paid: number; returned: number; }; - + updated: number; } - + interface IOrderItem extends IObject { /** * value is "order_item" */ object: "order_item"; - + /** - * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) * representing the total amount for the line item. */ amount: number; - + /** * 3-letter ISO code representing the currency of the line item. */ currency: string; - + /** * Description of the line item, meant to be displayable to the user (e.g., "Express shipping"). */ description: string; - + /** * The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). [Expandable] */ parent: string | skus.ISku; - + /** - * A positive integer representing the number of instances of parent that are included in this order item. + * A positive integer representing the number of instances of parent that are included in this order item. * Applicable/present only if type is sku. */ quantity: number; - + /** * The type of line item. One of "sku", "tax", "shipping", or "discount". */ type: "sku" | "tax" | "shipping" | "discount" ; } - + interface IOrderCreationOptions extends IDataOptionsWithMetadata { /** - * 3-letter ISO code representing the currency in which the order should be made. Stripe will validate that all entries in items match + * 3-letter ISO code representing the currency in which the order should be made. Stripe will validate that all entries in items match * the currency specified here. */ currency: string; - + /** * A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. */ coupon?: string; - + /** - * The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create - * the order. Subsequently, the customer will also be charged to pay the order. If email or shipping are also provided, they will + * The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create + * the order. Subsequently, the customer will also be charged to pay the order. If email or shipping are also provided, they will * override the values retrieved from the customer object. */ customer?: string; - + /** * The email address of the customer placing the order. */ email?: string; - + /** * List of items constituting the order. */ items?: Array; - + /** * Shipping address for the order. Required if any of the SKUs are for products that have shippable set to true. */ shipping?: IShippingInformation; } - + interface IOrderUpdateOptions extends IDataOptionsWithMetadata { /** * A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. */ coupon?: string; - + /** - * The shipping method to select for fulfilling this order. If specified, must be one of the ids of a shipping method in the + * The shipping method to select for fulfilling this order. If specified, must be one of the ids of a shipping method in the * shipping_methods array. If specified, will overwrite the existing selected shipping method, updating items as necessary. */ selected_shipping_method?: string; - + status: OrderStatus; } - + interface IOrderPayOptions extends IDataOptionsWithMetadata { /** * The ID of an existing customer that will be charged in this request. - * + * * Either customer or source is required */ customer?: string; - + /** - * A payment source to be charged, such as a credit card. If you also pass a customer ID, the source must be the ID of a source belonging - * to the customer. Otherwise, if you do not pass a customer ID, the source you provide must either be a token, like the ones returned - * by Stripe.js, or a object containing a user's credit card details, with the options described below. Although not all information is + * A payment source to be charged, such as a credit card. If you also pass a customer ID, the source must be the ID of a source belonging + * to the customer. Otherwise, if you do not pass a customer ID, the source you provide must either be a token, like the ones returned + * by Stripe.js, or a object containing a user's credit card details, with the options described below. Although not all information is * required, the extra info helps prevent fraud. - * + * * Either source or customer is required */ source?: sources.ISourceCreationOptions; - + /** - * A fee in cents/pence that will be applied to the order and transferred to the application owner's Stripe account. To use an application - * fee, the request must be made on behalf of another account, using the Stripe-Account header or OAuth key. For more information, see + * A fee in cents/pence that will be applied to the order and transferred to the application owner's Stripe account. To use an application + * fee, the request must be made on behalf of another account, using the Stripe-Account header or OAuth key. For more information, see * the application fees documentation. */ application_fee?: number; - + /** * The email address of the customer placing the order. If a customer is specified, that customer's email address will be used. - * + * * Optional, but required if not previously specified. */ email?: string; } - + interface IOrderListOptions extends IListOptionsCreated { /** * Only return orders for the given customer */ customer?: string; - + /** * Only return orders with the given IDs */ ids?: Array; - + /** * Only return orders that have the given status. One of "created", "paid", "fulfilled", or "refunded". */ status: OrderStatus; - + /** * Filter orders based on when they were "paid", "fulfilled", "canceled", or "returned" */ status_transitions?: { /** - * A filter on the list based on the object canceled field. The value can be a string with an integer Unix timestamp, + * A filter on the list based on the object canceled field. The value can be a string with an integer Unix timestamp, * or it can be a dictionary with the following options: */ canceled?: IDateFilter; - + /** - * A filter on the list based on the object fulfilled field. The value can be a string with an integer Unix timestamp, + * A filter on the list based on the object fulfilled field. The value can be a string with an integer Unix timestamp, * or it can be a dictionary with the following options: */ fulfilled?: IDateFilter; - + /** - * A filter on the list based on the object paid field. The value can be a string with an integer Unix timestamp, + * A filter on the list based on the object paid field. The value can be a string with an integer Unix timestamp, * or it can be a dictionary with the following options: */ paid?: IDateFilter; - + /** - * A filter on the list based on the object returned field. The value can be a string with an integer Unix timestamp, + * A filter on the list based on the object returned field. The value can be a string with an integer Unix timestamp, * or it can be a dictionary with the following options: */ returned?: IDateFilter; } } - + interface IOrderItemCreationHash { /** - * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) * representing the total amount for the line item. */ amount?: number; - + /** * 3-letter ISO code representing the currency of the line item. */ currency?: string; - + /** * Description of the line item, meant to be displayable to the user (e.g., "Express shipping"). */ description?: string; - + /** * The ID of the SKU being ordered. */ parent: string; - + /** * The quantity of this order item. When type is sku, this is the number of instances of the SKU to be ordered. */ quantity?: number; - + /** * The type of line item. One of "sku", "tax", "shipping", or "discount". */ type?: "sku" | "tax" | "shipping" | "discount" ; } - + interface IShippingMethod { id: string; - + /** - * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) * representing the total amount for the line item. */ amount: number; - + /** * 3-letter ISO code representing the currency of the line item. */ currency: string; - + /** * The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ @@ -2571,35 +2571,35 @@ declare namespace StripeNode { * If type is "exact", date will be the expected delivery date in the format YYYY-MM-DD */ date: string; - + /** * If type is "range", earliest will be be the earliest delivery date in the format YYYY-MM-DD */ earliest: string; - + /** * If type is "range", latest will be the latest delivery date in the format YYYY-MM-DD */ latest: string; - + /** * The type of estimate. Must be either "range" or "exact" */ type: "range" | "exact"; }; - + /** * Description of the line item, meant to be displayable to the user (e.g., "Express shipping"). */ description: string; } - + /** * Current order status. One of created, paid, canceled, fulfilled, or returned. More detail in the Relay API Overview. */ type OrderStatus = "created" | "paid" | "canceled" | "fulfilled" | "returned"; } - + namespace plans { /** * A subscription plan contains the pricing information for different products and feature levels on your site. @@ -2610,12 +2610,12 @@ declare namespace StripeNode { * Value is "plan" */ object: "plan"; - + /** * The amount in cents to be charged on the interval specified */ amount: number; - + created: number; /** @@ -2627,290 +2627,290 @@ declare namespace StripeNode { * One of "day", "week", "month" or "year". The frequency with which a subscription should be billed. */ interval: IntervalUnit; - + /** * The number of intervals (specified in the interval property) between each subscription billing. For example, * interval=month and interval_count=3 bills every 3 months. */ interval_count: number; - + livemode: boolean; metadata: IMetadata; - + /** * Display name of the plan */ name: string; - + /** * Extra information about a charge for the customer's credit card statement. */ statement_descriptor: string; - + /** * Number of trial period days granted when subscribing a customer to this plan. Null if the plan has no trial period. */ trial_period_days: number; } - + interface IPlanCreationOptions extends IDataOptionsWithMetadata { /** - * Unique string of your choice that will be used to identify this plan when subscribing a customer. This could be an identifier + * Unique string of your choice that will be used to identify this plan when subscribing a customer. This could be an identifier * like "gold" or a primary key from your own database. */ id: string; - + /** * A positive integer in cents/pence (or 0 for a free plan) representing how much to charge (on a recurring basis). */ amount: number; - + /** * 3-letter ISO code for currency. */ currency: string; - + /** * Specifies billing frequency. Either "day", "week", "month" or "year". */ interval: IntervalUnit; - + /** * Name of the plan, to be displayed on invoices and in the web interface. */ name: string; - + /** - * The number of intervals between each subscription billing. For example, interval=month and interval_count=3 bills every 3 months. + * The number of intervals between each subscription billing. For example, interval=month and interval_count=3 bills every 3 months. * Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ interval_count?: number; - + /** - * An arbitrary string to be displayed on your customer’s credit card statement. This may be up to 22 characters. As an example, if your website - * is RunClub and the item you’re charging for is your Silver Plan, you may want to specify a statement_descriptor of RunClub Silver Plan. - * The statement description may not include <>"' characters, and will appear on your customer’s statement in capital letters. Non-ASCII + * An arbitrary string to be displayed on your customer’s credit card statement. This may be up to 22 characters. As an example, if your website + * is RunClub and the item you’re charging for is your Silver Plan, you may want to specify a statement_descriptor of RunClub Silver Plan. + * The statement description may not include <>"' characters, and will appear on your customer’s statement in capital letters. Non-ASCII * characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all. */ statement_descriptor?: string; - + /** - * Specifies a trial period in (an integer number of) days. If you include a trial period, the customer won't be billed for the first time + * Specifies a trial period in (an integer number of) days. If you include a trial period, the customer won't be billed for the first time * until the trial period ends. If the customer cancels before the trial period is over, she'll never be billed at all. */ trial_period_days?: number; } - + interface IPlanUpdateOptions extends IDataOptionsWithMetadata { /** * Name of the plan, to be displayed on invoices and in the web interface. */ name?: string; - + /** - * An arbitrary string to be displayed on your customer’s credit card statement. This may be up to 22 characters. As an example, if your website - * is RunClub and the item you’re charging for is your Silver Plan, you may want to specify a statement_descriptor of RunClub Silver Plan. - * The statement description may not include <>"' characters, and will appear on your customer’s statement in capital letters. Non-ASCII + * An arbitrary string to be displayed on your customer’s credit card statement. This may be up to 22 characters. As an example, if your website + * is RunClub and the item you’re charging for is your Silver Plan, you may want to specify a statement_descriptor of RunClub Silver Plan. + * The statement description may not include <>"' characters, and will appear on your customer’s statement in capital letters. Non-ASCII * characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all. */ statement_descriptor?: string; } - + type IntervalUnit = "day" | "week" | "month" | "year"; } - + namespace products { interface IProduct extends IResourceObject { /** * Value is "product" */ object: "product"; - + /** * Whether or not the product is currently available for purchase. */ active: boolean; - + /** * A list of up to 5 attributes that each SKU can provide values for (e.g. ["color", "size"]). */ attributes: Array; - + /** * A short one-line description of the product, meant to be displayable to the customer. */ caption: string; - + created: number; - + /** * An array of connect application identifiers that cannot purchase this product. */ deactivated_on: Array; - + /** * The product’s description, meant to be displayable to the customer. */ description: string; - + /** * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ images: Array; - + livemode: boolean; metadata: IMetadata; - + /** * The product’s name, meant to be displayable to the customer. */ name: string; - + package_dimensions: IPackageDimensions; - + /** * Whether this product is a shipped good. */ shippable: boolean; - + /** * A sublist of active SKUs associated with this product. */ skus: IList; - + updated: number; - + /** * A URL of a publicly-accessible webpage for this product. */ url: string; } - + interface IProductCreationOptions extends IDataOptionsWithMetadata { /** * The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. */ id?: string; - + /** * The product’s name, meant to be displayable to the customer. */ name: string; - + /** * Whether or not the product is currently available for purchase. Defaults to true. */ active?: boolean; - + /** * A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g. ["color", "size"]). */ attribute?: Array; - + /** * A short one-line description of the product, meant to be displayable to the customer. */ caption?: string; - + /** * An array of Connect application names or identifiers that should not be able to order the SKUs for this product. */ deactivate_on?: Array; - + /** * The product’s description, meant to be displayable to the customer. */ description?: string; - + /** * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ images?: Array; - + package_dimensions?: IPackageDimensions; - + /** * Whether this product is shipped (i.e. physical goods). Defaults to true. */ shippable?: boolean; - + /** * A URL of a publicly-accessible webpage for this product. */ url?: string; } - + interface IProductUpdateOptions extends IDataOptionsWithMetadata { /** - * Whether or not the product is available for purchase. Setting this to false also deactivates any active, related SKUs. Setting this to + * Whether or not the product is available for purchase. Setting this to false also deactivates any active, related SKUs. Setting this to * true does not automatically activate any deactivated, related SKUs. */ active?: boolean; - + /** * A short one-line description of the product, meant to be displayable to the customer. */ caption?: string; - + /** - * An array of Connect application names or identifiers that should not be able to order the SKUs for this product. This can be unset + * An array of Connect application names or identifiers that should not be able to order the SKUs for this product. This can be unset * by updating the value to null and then saving. */ deactivate_on?: Array; - + /** * The product’s description, meant to be displayable to the customer. */ description?: string; - + /** - * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. This can be unset by updating the value to + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. This can be unset by updating the value to * null and then saving. */ images?: Array; - + /** * The product’s name, meant to be displayable to the customer. */ name?: string; - + package_dimensions?: IPackageDimensions; - + /** * Whether this product is shipped (i.e. physical goods). Defaults to true. */ shippable?: boolean; - + /** * A URL of a publicly-accessible webpage for this product. */ url?: string; } - + interface IProductListOptions extends IListOptions { /** * Only return products that are active or inactive (e.g. pass false to list all inactive products). */ active?: boolean; - + /** * Only return products with the given IDs. */ ids?: Array; - + /** * Only return products that can be shipped (i.e., physical, not digital products). */ shippable?: boolean; - + /** * Only return products with the given url */ url?: string; } - + /** - * The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its + * The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its * own package_dimensions */ interface IPackageDimensions { @@ -2932,277 +2932,277 @@ declare namespace StripeNode { width: number; } } - + namespace recipientCards { } - + namespace recipients { - interface IRecipient extends IResourceObject { - + interface IRecipient extends IResourceObject { + } } - + namespace skus { interface ISku extends IResourceObject { /** * Value is "sku" */ object: "sku"; - + /** * Whether or not the SKU is available for purchase. */ active: boolean; - + attributes: ISkuAttributes; created: number; - + /** * 3-letter ISO code for currency. */ currency: string; - + /** * The URL of an image for this SKU, meant to be displayable to the customer. */ image: string; - + inventory: IInventory; livemode: boolean; metadata: IMetadata; - + /** * The dimensions of this SKU for shipping purposes. */ package_dimensions: products.IPackageDimensions; - + /** - * The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 1 to charge ¥1, + * The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 1 to charge ¥1, * Japanese Yen being a 0-decimal currency). */ price: number; - + /** * The ID of the product this SKU is associated with. The product must be currently active. [Expandable] */ product: string | products.IProduct; - + updated: number; } - + interface ISkuCreationOptions extends IDataOptionsWithMetadata { /** * The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ id?: string; - + /** * 3-letter ISO code for currency. */ currency: string; - + inventory: IInventory; - + /** - * The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 1 to charge ¥1, + * The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 1 to charge ¥1, * Japanese Yen being a 0-decimal currency). */ price: number; - + /** * The ID of the product this SKU is associated with. */ product: string; - + /** * Whether or not the SKU is available for purchase. Default to true. */ active?: boolean; - + attributes?: ISkuAttributes; - + /** * The URL of an image for this SKU, meant to be displayable to the customer. */ image?: string; - + /** * The dimensions of this SKU for shipping purposes. */ package_dimensions?: products.IPackageDimensions; } - + interface ISkuUpdateOptions extends IDataOptionsWithMetadata { /** * Whether or not the SKU is available for purchase. */ active?: boolean; - + /** * 3-letter ISO code for currency. */ currency?: string; - + /** - * The URL of an image for this SKU, meant to be displayable to the customer. + * The URL of an image for this SKU, meant to be displayable to the customer. * This can be unset by updating the value to null and then saving. */ image?: string; - + inventory?: IInventory; - + /** * The dimensions of this SKU for shipping purposes. */ package_dimensions?: products.IPackageDimensions; - + /** - * The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 1 to charge ¥1, + * The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 1 to charge ¥1, * Japanese Yen being a 0-decimal currency). */ price?: number; - + /** * The ID of the product this SKU is associated with. */ product?: string; } - + interface ISkuListOptions extends IListOptions { /** * Only return SKUs that are active or inactive (e.g. pass false to list all inactive products). */ active?: boolean; - + /** - * Only return SKUs that have the specified key/value pairs in this partially constructed dictionary. - * Can be specified only if product is also supplied. For instance, if the associated product has - * attributes ["color", "size"], passing in attributes[color]=red returns all the SKUs for this product + * Only return SKUs that have the specified key/value pairs in this partially constructed dictionary. + * Can be specified only if product is also supplied. For instance, if the associated product has + * attributes ["color", "size"], passing in attributes[color]=red returns all the SKUs for this product * that have color set to red. */ attributes?: ISkuAttributes; - + /** * Only return SKUs with the given IDs. */ ids?: Array; - + /** - * Only return SKUs that are either in stock or out of stock (e.g. pass false to list all SKUs that are out of stock). + * Only return SKUs that are either in stock or out of stock (e.g. pass false to list all SKUs that are out of stock). * If no value is provided, all SKUs are returned. */ in_stock?: boolean; - + /** * The ID of the product whose SKUs will be retrieved. */ product?: string; } - + /** * Description of the SKU’s inventory. */ interface IInventory { /** * The count of inventory available. Will be present if and only if type is "finite". - * + * * Positive integer or zero */ quantity?: number; - + /** * Inventory type. Possible values are "finite", "bucket"" (not quantified), and "infinite". */ type: "finite" | "bucket" | "infinite" ; - + /** - * An indicator of the inventory available. Possible values are "in_stock", "limited", and "out_of_stock". + * An indicator of the inventory available. Possible values are "in_stock", "limited", and "out_of_stock". * Will be present if and only if type is "bucket". */ value?: "in_stock" | "limited" | "out_of_stock"; } - + /** - * A dictionary of attributes and values for the attributes defined by the product. - * If, for example, a product’s attributes are ["size", "gender"], + * A dictionary of attributes and values for the attributes defined by the product. + * If, for example, a product’s attributes are ["size", "gender"], * a valid SKU has the following dictionary of attributes: {"size": "Medium", "gender": "Unisex"}. */ interface ISkuAttributes {} } - - namespace tokens { + + namespace tokens { interface IToken extends ICardToken, IBankAccountToken { } - + interface ICardToken extends ITokenBase { /** * Hash describing the card used to make the charge */ card?: cards.ICardHash; } - + interface IBankAccountToken extends ITokenBase { /** * Hash describing the bank account */ bank_account?: bankAccounts.IBankAccountHash; } - + interface ITokenBase extends IResourceObject { /** * Value is "token"" */ object: "token" ; - + /** * IP address of the client that generated the token */ client_ip: string; - + created: number; livemode: boolean; - + /** * Type of the token: card or bank_account */ type: "card" | "bank_account" ; - + /** * Whether or not this token has already been used (tokens can be used only once) */ used: boolean; } - + interface ITokenCreationOptionsBase extends IDataOptions { /** - * The customer (owned by the application's account) to create a - * token for. For use with Stripe Connect only; this can only be used - * with an OAuth access token or Stripe-Account header. For more + * The customer (owned by the application's account) to create a + * token for. For use with Stripe Connect only; this can only be used + * with an OAuth access token or Stripe-Account header. For more * details, see the shared customers documentation. - * + * * Stripe connect only */ customer?: string; } - + interface ICardTokenCreationOptions extends ITokenCreationOptionsBase { /** - * The card this token will represent. If you also pass in a customer, - * the card must be the ID of a card belonging to the customer. - * Otherwise, if you do not pass a customer, a object containing a + * The card this token will represent. If you also pass in a customer, + * the card must be the ID of a card belonging to the customer. + * Otherwise, if you do not pass a customer, a object containing a * user's credit card details, with the options described below. */ card: sources.ISourceCreationOptions; } - + interface IBankAccountTokenCreationOptions extends ITokenCreationOptionsBase { /** - * The card this token will represent. If you also pass in a customer, - * the card must be the ID of a card belonging to the customer. - * Otherwise, if you do not pass a customer, a object containing a + * The card this token will represent. If you also pass in a customer, + * the card must be the ID of a card belonging to the customer. + * Otherwise, if you do not pass a customer, a object containing a * user's credit card details, with the options described below. */ bank_account: bankAccounts.ISourceCreationOptions; } - + interface IPiiTokenCreationOptions extends IDataOptions { pii: { /** @@ -3212,31 +3212,31 @@ declare namespace StripeNode { } } } - + namespace transfers { interface ITransfer extends IResourceObject { /** * Value is "transfer" */ object: "transfer"; - + /** * Amount (in cents) to be transferred to your bank account */ amount: number; - + /** * Amount in cents reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ amount_reversed: number; - + application_fee: string; - + /** * Balance transaction that describes the impact of this transfer on your account balance. [Expandable] */ balance_transaction: string | balance.IBalanceTransaction; - + /** * Time that this record of the transfer was first created. */ @@ -3256,193 +3256,193 @@ declare namespace StripeNode { * Internal-only description of the transfer */ description: string; - + /** * ID of the bank account, card, or Stripe account the transfer was sent to. [Expandable] */ destination: string | bankAccounts.IBankAccount | cards.ICardHash | accounts.IAccount; - + /** - * If the destination is a Stripe account, this will be the ID of the + * If the destination is a Stripe account, this will be the ID of the * payment that the destination account received for the transfer. [Expandable] */ destination_payment: string; - + /** * Error code explaining reason for transfer failure if available. See Types of transfer failures for a * list of failure codes: https://stripe.com/docs/api#transfer_failures */ failure_code: string; - + /** * Message to user further explaining reason for transfer failure if available. */ failure_message: string; - + livemode: boolean; metadata: IMetadata; - + /** * A list of reversals that have been applied to the transfer. */ reversals: ITransferReversals; - + /** * Whether or not the transfer has been fully reversed. If the transfer is only partially reversed, this attribute * will still be false. */ reversed: boolean; - + /** - * ID of the charge (or other transaction) that was used to fund the - * transfer. If null, the transfer was funded from the available + * ID of the charge (or other transaction) that was used to fund the + * transfer. If null, the transfer was funded from the available * balance. [Expandable] */ source_transaction: string | charges.ICharge; - + /** - * The source balance this transfer came from. + * The source balance this transfer came from. * One of card, bank_account, bitcoin_receiver, or alipay_account */ source_type: SourceTypes; - + /** * Extra information about a transfer to be displayed on the user's bank statement. */ statement_descriptor: string; - + /** - * Current status of the transfer (paid, pending, in_transit, canceled or failed). - * A transfer will be pending until it is submitted to the bank, at which point - * it becomes in_transit. It will then change to paid if the transaction goes - * through. If it does not go through successfully, its status will change to + * Current status of the transfer (paid, pending, in_transit, canceled or failed). + * A transfer will be pending until it is submitted to the bank, at which point + * it becomes in_transit. It will then change to paid if the transaction goes + * through. If it does not go through successfully, its status will change to * failed or canceled. */ status: Statuses; - + /** * Can be card, bank_account, or stripe_account. */ type: "card" | "bank_account" | "stripe_account" ; } - + interface ITransferReversals extends IList, resources.TransferReversals {} - + interface ITransferCreationOptions extends IDataOptionsWithMetadata { /** * A positive integer in cents/pence representing how much to transfer. */ amount: number; - + /** * 3-letter ISO code for currency. */ currency: string; - - /** - * The id of a bank account or a card to send the transfer to, or the - * string "default_for_currency" to use the default external - * account for the specified currency. - * - * If you use Stripe Connect, this can be the the id of a connected - * Stripe account; see the details about when such transfers are + + /** + * The id of a bank account or a card to send the transfer to, or the + * string "default_for_currency" to use the default external + * account for the specified currency. + * + * If you use Stripe Connect, this can be the the id of a connected + * Stripe account; see the details about when such transfers are * permitted. */ destination: string; - + /** - * An arbitrary string which you can attach to a transfer object. It is + * An arbitrary string which you can attach to a transfer object. It is * displayed when in the web interface alongside the transfer. */ description?: string - + /** - * You can use this parameter to transfer funds from a charge (or - * other transaction) before they are added to your available - * balance. A pending balance will transfer immediately but the - * funds will not become available until the original charge + * You can use this parameter to transfer funds from a charge (or + * other transaction) before they are added to your available + * balance. A pending balance will transfer immediately but the + * funds will not become available until the original charge * becomes available. See the Connect documentation for details. */ source_transaction?: string; - + /** - * A string to be displayed on the recipient's bank or card - * statement. This may be at most 22 characters. Attempting to use - * a statement_descriptor longer than 22 characters will return - * an error. Note: Most banks will truncate this information and/or + * A string to be displayed on the recipient's bank or card + * statement. This may be at most 22 characters. Attempting to use + * a statement_descriptor longer than 22 characters will return + * an error. Note: Most banks will truncate this information and/or * display it inconsistently. Some may not display it at all. */ statement_descriptor?: string; - + /** - * The source balance to draw this transfer from. Balances for - * different payment sources are kept separately. You can find the - * amounts with the balances API. Valid options are: + * The source balance to draw this transfer from. Balances for + * different payment sources are kept separately. You can find the + * amounts with the balances API. Valid options are: * "alipay_account", "bank_account", "bitcoin_receiver", and "card". */ source_type?: SourceTypes; } - + interface ITransferUpdateOptions extends IDataOptionsWithMetadata { /** - * An arbitrary string which you can attach to a transfer object. It is - * displayed when in the web interface alongside the transfer. This + * An arbitrary string which you can attach to a transfer object. It is + * displayed when in the web interface alongside the transfer. This * can be unset by updating the value to null and then saving. */ description?: string; } - + interface ITransferListOptions extends IListOptionsCreated { date?: IDateFilter; - + /** - * Only return transfers for the destination specified by this + * Only return transfers for the destination specified by this * account ID. */ destination?: string; - + /** - * Only return transfers for the recipient specified by this + * Only return transfers for the recipient specified by this * recipient ID. */ recipient?: string; - + /** - * Only return transfers that have the given status: + * Only return transfers that have the given status: * pending, paid, failed, in_transit, or canceled. */ status: Statuses; } - + type SourceTypes = "alipay_account" | "bank_account" | "bitcoin_receiver" | "card"; - + type Statuses = "pending" | "paid" | "failed" | "in_transit" | "canceled"; } - + namespace transferReversals { interface IReversal extends IResourceObject { /** * Value is 'transfer_reversal' */ object: "transfer_reversal"; - + /** * Amount reversed, in cents/pence. */ amount: number; - + /** * Balance transaction that describes the impact of this reversal on your account balance. [Expandable] */ balance_transaction: string | balance.IBalanceTransaction; - + created: number; /** * Three-letter ISO currency code representing the currency. */ currency: string; - + metadata: IMetadata; /** @@ -3450,76 +3450,76 @@ declare namespace StripeNode { */ transfer: string | transfers.ITransfer; } - + interface IReversalCreationOptions extends IDataOptionsWithMetadata { /** - * A positive integer in cents/pence representing how much of this transfer to reverse. Can only reverse up to the unreversed amount + * A positive integer in cents/pence representing how much of this transfer to reverse. Can only reverse up to the unreversed amount * remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. */ amount?: number; - + /** - * An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the dashboard. This will + * An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the dashboard. This will * be unset if you POST an empty value. */ description?: string; - + /** - * Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is - * given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to + * Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is + * given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to * the amount of the transfer reversed. */ refund_application_fee?: boolean; } - + interface IReversalUpdateOptions extends IDataOptionsWithMetadata { /** - * An arbitrary string which you can attach to a reversal object. It is displayed when in the web interface alongside the + * An arbitrary string which you can attach to a reversal object. It is displayed when in the web interface alongside the * reversal. This can be unset by updating the value to null and then saving. */ description?: string; } } - + namespace bankAccounts { interface IBankAccount extends IBankAccountHash { account: string; - + /** * This indicates whether or not this bank account is the default external account for its currency. */ default_for_currency: boolean; - + /** - * A set of key/value pairs that you can attach to a bank account object. It - * can be useful for storing additional information about the bank account in + * A set of key/value pairs that you can attach to a bank account object. It + * can be useful for storing additional information about the bank account in * a structured format. */ metadata: IMetadata; } - + interface IBankAccountHash extends IResourceObject { /** * value is "customer_bank_account" */ object: "customer_bank_account"; - + /** * The name of the person or business that owns the bank account. */ account_holder_name: string; - + /** - * The type of entity that holds the account. This can be either + * The type of entity that holds the account. This can be either * "individual"" or "company". */ account_holder_type: string; - + /** * Name of the bank associated with the routing number, e.g. WELLS FARGO. */ bank_name: string; - + /** * Two-letter ISO code representing the country the bank account is located in. */ @@ -3529,90 +3529,90 @@ declare namespace StripeNode { * Three-letter ISO currency code representing the currency paid out to the bank account. */ currency: string; - + /** - * Uniquely identifies this particular bank account. You can use this attribute + * Uniquely identifies this particular bank account. You can use this attribute * to check whether two bank accounts are the same. */ fingerprint: string; - + last4: string; - + /** * The routing transit number for the bank account. */ routing_number: string; - - /** - * Possible values are "new", "validated", "verified", "verification_failed", - * or "errored". A bank account that hasn’t had any activity or validation - * performed is "new". If Stripe can determine that the bank account exists, its - * status will be "validated". Note that there often isn’t enough information - * to know (e.g. for smaller credit unions), and the validation is not always - * run. If customer bank account verification has succeeded, the bank - * account status will be "verified". If the verification failed for any reason, - * such as microdeposit failure, the status will be "verification_failed". If a - * transfer sent to this bank account fails, we’ll set the status to "errored"" + + /** + * Possible values are "new", "validated", "verified", "verification_failed", + * or "errored". A bank account that hasn’t had any activity or validation + * performed is "new". If Stripe can determine that the bank account exists, its + * status will be "validated". Note that there often isn’t enough information + * to know (e.g. for smaller credit unions), and the validation is not always + * run. If customer bank account verification has succeeded, the bank + * account status will be "verified". If the verification failed for any reason, + * such as microdeposit failure, the status will be "verification_failed". If a + * transfer sent to this bank account fails, we’ll set the status to "errored"" * and will not continue to send transfers until the bank details are updated. */ status: "new" | "validated" | "verified" | "verification_failed" | "error" ; } - + interface ISourceCreationOptions { /** - * The account number for the bank account in string form. + * The account number for the bank account in string form. * Must be a checking account. */ account_number: string; - + /** * The country the bank account is in. */ country: string; - + /** - * The currency the bank account is in. This must be a + * The currency the bank account is in. This must be a * country/currency pairing that Stripe supports. */ currency: string; - + /** - * The routing number, sort code, or other country-appropriate - * institution number for the bank account. For US bank - * accounts, this is required and should be the ACH routing - * number, not the wire routing number. If you are providing an + * The routing number, sort code, or other country-appropriate + * institution number for the bank account. For US bank + * accounts, this is required and should be the ACH routing + * number, not the wire routing number. If you are providing an * IBAN for account_number, this field is not required. */ routing_number?: string; - + /** - * The name of the person or business that owns the bank - * account. This field is required when attaching the bank + * The name of the person or business that owns the bank + * account. This field is required when attaching the bank * account to a customer object. */ account_holder_name?: string; - + /** - * The type of entity that holds the account. This can be either - * "individual" or "company". This field is required when + * The type of entity that holds the account. This can be either + * "individual" or "company". This field is required when * attaching the bank account to a customer object. */ account_holder_type?: "individual" | "company" ; } - + interface IBankAccountUpdateOptions extends IDataOptionsWithMetadata { /** * The name of the person or business that owns the bank account. */ account_holder_name?: string; - + /** * The type of entity that holds the account. This can be either "individual" or "company". */ account_holder_type?: "individual" | "company"; } } - + namespace bitcoinReceivers { /** * A Bitcoin receiver wraps a Bitcoin address so that a customer can push a payment to you. This guide describes how to use @@ -3654,22 +3654,22 @@ declare namespace StripeNode { * This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ bitcoin_uri: number; - + created: number; /** * Three-letter ISO currency code representing the currency to which the bitcoin will be converted. */ currency: string; - + customer: string; description: string; - + /** * The customer's email address, set by the API call that creates the receiver. */ email: string; - + /** * This flag is initially false and updates to true when the customer sends the bitcoin_amount to this receiver. */ @@ -3679,20 +3679,20 @@ declare namespace StripeNode { * A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ inbound_address: string; - + livemode: boolean; metadata: IMetadata; - + /** * The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ payment: string; - + /** * The refund address for these bitcoin, if communicated by the customer. */ refund_address: string; - + /** * A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the * receiver with a publishable key. @@ -3703,7 +3703,7 @@ declare namespace StripeNode { * This receiver contains uncaptured funds that can be used for a payment or refunded. */ uncaptured_funds: boolean; - + used_for_payment: boolean; } @@ -3722,7 +3722,7 @@ declare namespace StripeNode { * The amount of bitcoin contained in the transaction. */ bitcoin_amount: number; - + created: number; /** @@ -3735,91 +3735,91 @@ declare namespace StripeNode { */ receiver: string; } - + interface IBitcoinReceiverCreationOptions extends IDataOptionsWithMetadata { /** * The amount of currency that you will be paid. */ amount: number; - + /** * The currency to which the bitcoin will be converted. You will be paid out in this currency. Only USD is currently supported. */ currency: string; - + /** * The email address of the customer. */ email: string; - + description?: string; - + /** * A flag that indicates whether you would like Stripe to automatically handle refunds for any mispayments to the receiver. */ refund_mispayments?: boolean; } - + interface IBitcoinReceiverListOptions extends IListOptions { /** * Filter for active receivers. */ active?: boolean; - + /** * Filter for filled receivers. */ filled?: boolean; - + /** * Filter for receivers with uncaptured funds. */ uncaptured_funds?: boolean; } } - - namespace cards { + + namespace cards { /** * You can store multiple cards on a customer in order to charge the customer later. You * can also store multiple debit cards on a recipient in order to transfer to those cards later. */ interface ICard extends ICardHash { /** - * The account this card belongs to. This attribute will not be in the + * The account this card belongs to. This attribute will not be in the * card object if the card belongs to a customer or recipient instead. * [Expandable] */ account?: string | accounts.IAccount; - + /** - * Only applicable on accounts (not customers or recipients). The - * card can be used as a transfer destination for funds in this + * Only applicable on accounts (not customers or recipients). The + * card can be used as a transfer destination for funds in this * currency. */ currency?: string; - + /** - * The customer that this card belongs to. This attribute will not be - * in the card object if the card belongs to an account or recipient + * The customer that this card belongs to. This attribute will not be + * in the card object if the card belongs to an account or recipient * instead. */ customer?: customers.ICustomer; - + /** - * Only applicable on accounts (not customers or recipients). This - * indicates whether or not this card is the default external account + * Only applicable on accounts (not customers or recipients). This + * indicates whether or not this card is the default external account * for its currency. */ default_for_currency?: boolean; - + /** - * The recipient that this card belongs to. This attribute will not be - * in the card object if the card belongs to a customer or account + * The recipient that this card belongs to. This attribute will not be + * in the card object if the card belongs to a customer or account * instead. [Expandable] */ recipient?: string | recipients.IRecipient; } - + /** * Hash describing the card used to make the charge */ @@ -3838,7 +3838,7 @@ declare namespace StripeNode { * The card number */ number: number; - + /** * Card brand. Can be Visa, American Express, MasterCard, Discover, JCB, Diners Club, or Unknown. */ @@ -3866,18 +3866,18 @@ declare namespace StripeNode { address_line2: string; address_state: string; address_zip: string; - + /** * If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked. */ address_zip_check: "pass" | "fail" | "unavailable" | "unchecked" ; - + /** * Two-letter ISO code representing the country of the card. You could use this * attribute to get a sense of the international breakdown of cards you've collected. */ country: string; - + /** * If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked */ @@ -3892,22 +3892,22 @@ declare namespace StripeNode { * Cardholder name */ name: string; - + /** * Uniquely identifies this particular card number. You can use this attribute to check * whether two customers who've signed up with you are using the same card number, for example. */ fingerprint: string; - + metadata?: IMetadata; - + /** - * If the card number is tokenized, this is the method that was + * If the card number is tokenized, this is the method that was * used. Can be "apple_pay" or "android_pay". */ tokenization_method: "apple_pay" | "android_pay"; } - + interface ICardUpdateOptions extends IDataOptionsWithMetadata { address_city?: string; address_country?: string; @@ -3915,85 +3915,85 @@ declare namespace StripeNode { address_line2?: string; address_state?: string; address_zip?: string; - + /** - * Only applicable on accounts (not customers or recipients). - * If set to true, this card will become the default external + * Only applicable on accounts (not customers or recipients). + * If set to true, this card will become the default external * account for its currency. - * + * * Managed accounts only */ default_for_currency?: boolean; - + exp_month?: number; exp_year?: number; - + /** * Cardholder name */ name?: string; } - + interface ISourceCreationOptions { /** * he type of payment source. Should be "card". */ object: "card"; - + /** * 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: number; - + /** - * Card security code. Required unless your account is registered in - * Australia, Canada, or the United States. Highly recommended to always + * Card security code. Required unless your account is registered in + * Australia, Canada, or the United States. Highly recommended to always * include this value. */ cvc?: number; - + /** * Cardholder's full name. */ name?: string; - + address_city?: string; address_country?: string; address_line1?: string; address_line2?: string; address_state?: string; address_zip?: string; - + metadata?: IMetadata; } - + interface ISourceCreationOptionsExtended extends ISourceCreationOptions { /** - * Required when adding a card to an account (not applicable to a - * customers or recipients). The card (which must be a debit card) can be - * used as a transfer destination for funds in this currency. Currently, the + * Required when adding a card to an account (not applicable to a + * customers or recipients). The card (which must be a debit card) can be + * used as a transfer destination for funds in this currency. Currently, the * only supported currency for debit card transfers is usd. - * + * * Managed accounts only. */ currency?: string; - + /** - * Only applicable on accounts (not customers or recipients). If you set - * this to true (or if this is the first external account being added in this - * currency) this card will become the default external account for its + * Only applicable on accounts (not customers or recipients). If you set + * this to true (or if this is the first external account being added in this + * currency) this card will become the default external account for its * currency. - * + * * Managed accounts only. */ default_for_currency?: boolean; @@ -4010,70 +4010,70 @@ declare namespace StripeNode { * Value is "subscription" */ object: "subscription"; - + /** * A positive decimal that represents the fee percentage of the subscription invoice amount that will be transferred to * the application owner's Stripe account each billing period. */ application_fee_percent: number; - + /** * If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the * subscription will be true. You can use this attribute to determine whether a subscription that has a status * of active is scheduled to be canceled at the end of the current period. */ cancel_at_period_end: boolean; - + /** * If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with * cancel_at_period_end, canceled_at will still reflect the date of the initial cancellation request, not the end of the * subscription period when the subscription is automatically moved to a canceled state. */ canceled_at: number; - + created: number; - + /** * End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. */ current_period_end: number; - + /** * Start of the current period that the subscription has been invoiced for */ current_period_start: number; - + customer: string; - + /** * Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a * subscription overrides a discount applied on a customer-wide basis. */ discount: coupons.IDiscount; - + /** * If the subscription has ended (either because it was canceled or because the customer was switched to a subscription * to a new plan), the date the subscription ended */ ended_at: number; - + metadata: IMetadata; - + /** * Hash describing the plan the customer is subscribed to */ plan: plans.IPlan; - + /** * The number of subscriptions for the associated plan */ quantity: number; - + /** * Date the subscription started */ start: number; - + /** * Possible values are "trialing", "active", "past_due", "canceled", or "unpaid". A subscription still in its trial period is trialing * and moves to active when the trial period is over. When payment to renew the subscription fails, the subscription becomes @@ -4084,145 +4084,145 @@ declare namespace StripeNode { * you may choose to reopen and pay their closed invoices. */ status: "trialing" | "active" | "past_due" | "canceled" | "unpaid"; - + /** * If provided, each invoice created by this subscription will apply the tax rate, increasing the amount billed to the customer. */ tax_percent: number; - + /** * If the subscription has a trial, the end of that trial. */ trial_end: number; - + /** * If the subscription has a trial, the beginning of that trial. */ trial_start: number; } - + interface ISubscriptionCustCreationOptions extends IDataOptionsWithMetadata { /** * The identifier of the plan to subscribe the customer to. */ plan: string; - + /** - * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice - * subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order + * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice + * subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order * to set an application fee percentage. For more information, see the application fees documentation. */ application_fee_percent?: number; - + /** - * The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that + * The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that * particular subscription. */ coupon?: string; - + source?: sources.ISourceCreationOptions; - + /** - * The quantity you'd like to apply to the subscription you're creating. For example, if your plan is £10/user/month, and your customer - * has 5 users, you could pass 5 as the quantity to have the customer charged £50 (5 x £10) monthly. If you update a subscription but - * don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute - * unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit + * The quantity you'd like to apply to the subscription you're creating. For example, if your plan is £10/user/month, and your customer + * has 5 users, you could pass 5 as the quantity to have the customer charged £50 (5 x £10) monthly. If you update a subscription but + * don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute + * unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit * the quantity attribute and will default to 1 unless you pass a quantity parameter. */ quantity?: number; - + /** - * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice - * subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month + * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice + * subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month * with a tax_percent of 20.0 will charge $12 per invoice. */ tax_percent?: number; - + /** - * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end - * will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the + * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end + * will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the * customer's trial immediately. */ trial_end?: number; } - + interface ISubscriptionCreationOptions extends ISubscriptionCustCreationOptions { /*** * The identifier of the customer to subscribe. */ customer: string; - } - + } + interface ISubscriptionUpdateOptions extends IDataOptionsWithMetadata { /** - * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice - * subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order + * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice + * subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order * to set an application fee percentage. For more information, see the application fees documentation. */ application_fee_percent?: number; - + /** - * The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that + * The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that * particular subscription. */ coupon?: string; - + /** * The identifier of the plan to update the subscription to. If omitted, the subscription will not change plans. */ plan?: string; - + /** * Flag telling us whether to prorate switching plans during a billing cycle. */ prorate?: boolean; - + /** - * If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the - * same proration that was previewed with upcoming invoice endpoint. It can also be used to implement custom proration logic, such as + * If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the + * same proration that was previewed with upcoming invoice endpoint. It can also be used to implement custom proration logic, such as * prorating by day instead of by second, by providing the time that you wish to use for proration calculations. */ proration_date?: number; - + /** - * The quantity you'd like to apply to the subscription you're creating. For example, if your plan is £10/user/month, and your customer - * has 5 users, you could pass 5 as the quantity to have the customer charged £50 (5 x £10) monthly. If you update a subscription but - * don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute - * unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit + * The quantity you'd like to apply to the subscription you're creating. For example, if your plan is £10/user/month, and your customer + * has 5 users, you could pass 5 as the quantity to have the customer charged £50 (5 x £10) monthly. If you update a subscription but + * don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute + * unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit * the quantity attribute and will default to 1 unless you pass a quantity parameter. */ quantity?: number; - + source?: sources.ISourceCreationOptions; - + /** - * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice - * subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month + * A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice + * subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month * with a tax_percent of 20.0 will charge $12 per invoice. */ tax_percent?: number; - + /** - * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end - * will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the + * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end + * will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the * customer's trial immediately. */ trial_end?: number; } - + interface ISubscriptionCancellationOptions extends IDataOptions { /** * A flag that if set to true will delay the cancellation of the subscription until the end of the current period. */ at_period_end?: boolean; } - + interface ISubscriptionListOptions extends IListOptionsCreated { /** * The ID of the customer whose subscriptions will be retrieved */ customer?: string; - + /** * The ID of the plan whose subscriptions will be retrieved */ @@ -4243,28 +4243,28 @@ declare namespace StripeNode { * Amount in cents/pence. */ amount: number; - + /** * Balance transaction that describes the impact of this reversal on your account balance. */ balance_transaction: string; - + /** * ID of the charge that was refunded. [Expandable] */ charge: string | charges.ICharge; - + created: number; /** * Three-letter ISO currency code representing the currency in which the charge was made. */ currency: string; - + description: string; - + /** - * A set of key/value pairs that you can attach to the object. It can be useful + * A set of key/value pairs that you can attach to the object. It can be useful * for storing additional information in a structured format. */ metadata: IMetadata; @@ -4279,63 +4279,63 @@ declare namespace StripeNode { */ receipt_number: string; } - + interface IRefundCreationOptions extends IDataOptions { /** - * A positive integer in cents/pence representing how much of this charge to - * refund. Can only refund up to the unrefunded amount remaining of the + * A positive integer in cents/pence representing how much of this charge to + * refund. Can only refund up to the unrefunded amount remaining of the * charge. - * + * * default is entire charge */ amount?: number; - + /** - * A set of key/value pairs that you can attach to a refund object. It can be - * useful for storing additional information about the refund in a structured - * format. You can unset an individual key by setting its value to null and + * A set of key/value pairs that you can attach to a refund object. It can be + * useful for storing additional information about the refund in a structured + * format. You can unset an individual key by setting its value to null and * then saving. To clear all keys, set metadata to null, then save. */ metadata?: IMetadata; - + /** - * String indicating the reason for the refund. If set, possible values are - * "duplicate", "fraudulent", and "requested_by_customer". Specifying - * "fraudulent" as the reason when you believe the charge to be fraudulent + * String indicating the reason for the refund. If set, possible values are + * "duplicate", "fraudulent", and "requested_by_customer". Specifying + * "fraudulent" as the reason when you believe the charge to be fraudulent * will help us improve our fraud detection algorithms. */ reason?: string; - + /** - * Boolean indicating whether the application fee should be refunded when - * refunding this charge. If a full charge refund is given, the full application - * fee will be refunded. Else, the application fee will be refunded with an + * Boolean indicating whether the application fee should be refunded when + * refunding this charge. If a full charge refund is given, the full application + * fee will be refunded. Else, the application fee will be refunded with an * amount proportional to the amount of the charge refunded. - * An application fee can only be refunded by the application that created the + * An application fee can only be refunded by the application that created the * charge. - * + * * Connect only, default is false. */ refund_application_fee?: boolean; - + /** - * Boolean indicating whether the transfer should be reversed when - * refunding this charge. The transfer will be reversed for the same amount + * Boolean indicating whether the transfer should be reversed when + * refunding this charge. The transfer will be reversed for the same amount * being refunded (either the entire or partial amount). * A transfer can only be reversed by the application that created the charge. - * + * * Connect only, default is false. */ reverse_transfer?: boolean; } - + interface IRefundCreationOptionsWithCharge extends IRefundCreationOptions { /** * The identifier of the charge to refund. */ charge: string; } - + interface IRefundListOptions extends IListOptions { /** * Only return refunds for the charge specified by this charge ID. @@ -4343,71 +4343,71 @@ declare namespace StripeNode { charge?: string; } } - + namespace sources { /** - * The source can either be a token, like the ones returned by our - * Stripe.js, or a object containing a user's credit card details (with - * the options shown below). You must provide a source if the - * customer does not already have a valid source attached, and you - * are subscribing the customer for a plan that is not free. Passing - * source will create a new source object, make it the customer - * default source, and delete the old customer default if one exists. - * If you want to add an additional source to use with subscriptions, - * instead use the card creation API to add the card and then the - * customer update API to set it as the default. Whenever you - * attach a card to a customer, Stripe will automatically validate the + * The source can either be a token, like the ones returned by our + * Stripe.js, or a object containing a user's credit card details (with + * the options shown below). You must provide a source if the + * customer does not already have a valid source attached, and you + * are subscribing the customer for a plan that is not free. Passing + * source will create a new source object, make it the customer + * default source, and delete the old customer default if one exists. + * If you want to add an additional source to use with subscriptions, + * instead use the card creation API to add the card and then the + * customer update API to set it as the default. Whenever you + * attach a card to a customer, Stripe will automatically validate the * card. */ type ISourceCreationOptions = string | cards.ISourceCreationOptions; - + /** - * The source can either be a token, like the ones returned by our - * Stripe.js, or a object containing a user's credit card details (with - * the options shown below). You must provide a source if the - * customer does not already have a valid source attached, and you - * are subscribing the customer for a plan that is not free. Passing - * source will create a new source object, make it the customer - * default source, and delete the old customer default if one exists. - * If you want to add an additional source to use with subscriptions, - * instead use the card creation API to add the card and then the - * customer update API to set it as the default. Whenever you - * attach a card to a customer, Stripe will automatically validate the + * The source can either be a token, like the ones returned by our + * Stripe.js, or a object containing a user's credit card details (with + * the options shown below). You must provide a source if the + * customer does not already have a valid source attached, and you + * are subscribing the customer for a plan that is not free. Passing + * source will create a new source object, make it the customer + * default source, and delete the old customer default if one exists. + * If you want to add an additional source to use with subscriptions, + * instead use the card creation API to add the card and then the + * customer update API to set it as the default. Whenever you + * attach a card to a customer, Stripe will automatically validate the * card. */ type ISourceCreationOptionsExtended = string | cards.ISourceCreationOptionsExtended; } - + namespace countrySpecs { interface ICountrySpec extends IResourceObject { /** * Value is "country_spec" */ object: "country_spec"; - + /** * The default currency for this country. This applies to both payment methods and bank accounts. */ default_currency: string; - + /** * Currencies that can be accepted in the specific country (for transfers). */ supported_bank_account_currencies: {}; - + /** * Currencies that can be accepted in the specified country (for payments). */ supported_payment_currencies: Array; - + /** - * Payment methods available in the specified country. You will need to enable bitcoin and ACH payments on your account for those methods to + * Payment methods available in the specified country. You will need to enable bitcoin and ACH payments on your account for those methods to * appear in this list. The stripe payment method refers to charging through your platform. */ supported_payment_methods: Array; - + /** - * Lists the types of verification data needed to keep an account open. Includes 'minimum' fields, which every account must eventually + * Lists the types of verification data needed to keep an account open. Includes 'minimum' fields, which every account must eventually * provide, as well as a 'additional' fields, which are only required for some merchants. */ verification_fields: { @@ -4422,11 +4422,11 @@ declare namespace StripeNode { } } } - + class StripeResource { constructor(stripe: Stripe, urlData: any); } - + namespace resources { class Accounts extends StripeResource { /** @@ -4434,7 +4434,7 @@ declare namespace StripeNode { */ create(data: accounts.IAccountCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: accounts.IAccountCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the details of the account. */ @@ -4444,38 +4444,38 @@ declare namespace StripeNode { retrieve(id: string, response?: IResponseFn): Promise; retrieve(options: HeaderOptions, response?: IResponseFn): Promise; retrieve(response?: IResponseFn): Promise; - + /** * Updates an account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. - * - * You may only update accounts that you manage. To update your own account, you can currently only do so via the dashboard. + * + * You may only update accounts that you manage. To update your own account, you can currently only do so via the dashboard. * For more information on updating managed accounts, see our guide. */ update(id: string, data: accounts.IAccountUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(id: string, data: accounts.IAccountUpdateOptions, response?: IResponseFn): Promise; - + /** * With Connect, you may delete Stripe accounts you manage. - * - * Managed accounts created using test-mode keys can be deleted at any time. Managed accounts created using live-mode keys may only be + * + * Managed accounts created using test-mode keys can be deleted at any time. Managed accounts created using live-mode keys may only be * deleted once all balances are zero. - * + * * If you are looking to close your own account, use the data tab in your account settings instead. */ del(id: string, options: HeaderOptions, response?: IResponseFn): Promise; del(id: string, response?: IResponseFn): Promise; del(options: HeaderOptions, response?: IResponseFn): Promise; del(response?: IResponseFn): Promise; - + /** * With Connect, you may flag managed accounts as suspicious. - * - * Managed accounts created using test-mode keys can be rejected at any time. Managed accounts created using live-mode keys may only be + * + * Managed accounts created using test-mode keys can be rejected at any time. Managed accounts created using live-mode keys may only be * rejected once all balances are zero. */ reject(id: string, data: accounts.IRejectReason, options: HeaderOptions, response?: IResponseFn): Promise; reject(id: string, data: accounts.IRejectReason, response?: IResponseFn): Promise; - + /** * Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list will be empty. */ @@ -4483,103 +4483,103 @@ declare namespace StripeNode { list(data: IListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * When you create a new bank account or credit card, you must specify a managed account to create it on. - * - * If the bank account's owner has no other external account in the bank account's currency, the new bank account will become the - * default for that currency. However, if the owner already has a bank account for that currency, the new account will only become + * + * If the bank account's owner has no other external account in the bank account's currency, the new bank account will become the + * default for that currency. However, if the owner already has a bank account for that currency, the new account will only become * the default if the default_for_currency parameter is set to true. - * - * If the account has no default destination card, then the new card will become the default. However, if the owner already has a - * default then it will not change. To change the default, you should set default_for_currency to true when creating a card for a + * + * If the account has no default destination card, then the new card will become the default. However, if the owner already has a + * default then it will not change. To change the default, you should set default_for_currency to true when creating a card for a * managed account. */ createExternalAccount(accId: string, data: accounts.IExternalAccountCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; createExternalAccount(accId: string, data: accounts.IExternalAccountCreationOptions, response?: IResponseFn): Promise; - + /** - * By default, you can see the 10 most recent bank accounts stored on a managed account directly on the object, but you can also + * By default, you can see the 10 most recent bank accounts stored on a managed account directly on the object, but you can also * retrieve details about a specific bank account stored on the Stripe account. */ retrieveExternalAccount(accId: string, bankAccId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveExternalAccount(accId: string, bankAccId: string, response?: IResponseFn): Promise; /** - * You can always see the 10 most recent cards directly on a managed account; this method lets you retrieve details about a specific + * You can always see the 10 most recent cards directly on a managed account; this method lets you retrieve details about a specific * card stored on the account. */ retrieveCard(accId: string, cardId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveCard(accId: string, cardId: string, response?: IResponseFn): Promise; - + /** - * Updates the metadata of a bank account belonging to a managed account, and optionally sets it as the default for its currency. + * Updates the metadata of a bank account belonging to a managed account, and optionally sets it as the default for its currency. * Other bank account details are not editable by design. */ updateExternalAccount(accId: string, bankAccId: string, data: accounts.IExternalAccountUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateExternalAccount(accId: string, bankAccId: string, data: accounts.IExternalAccountUpdateOptions, response?: IResponseFn): Promise; /** - * If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the - * full card details. Stripe also works directly with card networks so that your customers can continue using your service without + * If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the + * full card details. Stripe also works directly with card networks so that your customers can continue using your service without * interruption. - * + * * When you update a card, Stripe will automatically validate the card. */ updateExternalAccount(accId: string, cardId: string, data: cards.ICardUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateExternalAccount(accId: string, cardId: string, data: cards.ICardUpdateOptions, response?: IResponseFn): Promise; - + /** - * You can delete destination bank accounts and cards from a managed account. If a bank account is the default external account for its currency - * or card's default_for_currency property is true, it can only be deleted if it is the only external account for that currency, and the - * currency is not the Stripe account's default currency. Otherwise, you must set another external account to be the default for the currency + * You can delete destination bank accounts and cards from a managed account. If a bank account is the default external account for its currency + * or card's default_for_currency property is true, it can only be deleted if it is the only external account for that currency, and the + * currency is not the Stripe account's default currency. Otherwise, you must set another external account to be the default for the currency * before deleting it. */ deleteExternalAccount(accId: string, id: string, options: HeaderOptions, response?: IResponseFn): Promise; deleteExternalAccount(accId: string, id: string, response?: IResponseFn): Promise; - + /** - * You can see a list of the bank accounts belonging to a managed account. Note that the 10 most recent external accounts are always - * available by default on the corresponding Stripe object. If you need more than those 10, you can use this API method and the limit + * You can see a list of the bank accounts belonging to a managed account. Note that the 10 most recent external accounts are always + * available by default on the corresponding Stripe object. If you need more than those 10, you can use this API method and the limit * and starting_after parameters to page through additional bank accounts. */ listExternalAccounts(accId: string, data: accounts.IBankAccountListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; listExternalAccounts(accId: string, data: accounts.IBankAccountListOptions, response?: IResponseFn>): Promise>; - + /** - * You can see a list of the cards belonging to a managed account. Note that the 10 most recent external accounts are available on the - * account object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page + * You can see a list of the cards belonging to a managed account. Note that the 10 most recent external accounts are available on the + * account object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page * through additional cards. */ listExternalAccounts(accId: string, data: accounts.ICardListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; listExternalAccounts(accId: string, data: accounts.ICardListOptions, response?: IResponseFn>): Promise>; } - + class ApplicationFees extends StripeResource { /** - * Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the + * Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the * application fee. */ retrieve(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - + /** - * Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most + * Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most * recent fees appearing first. */ list(data: applicationFees.IApplicationFeeListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; list(data: applicationFees.IApplicationFeeListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** - * Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that + * Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that * the fee was originally collected from. - * + * * You can optionally refund only part of an application fee. You can do so as many times as you wish until the entire fee has been refunded. - * - * Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded + * + * Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded * application fee, or when trying to refund more money than is left on an application fee. */ refund(feeId: string, data: applicationFees.IApplicationFeeRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; @@ -4588,38 +4588,38 @@ declare namespace StripeNode { refund(feeId: string, response?: IResponseFn): Promise; /** - * Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that + * Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that * the fee was originally collected from. - * + * * You can optionally refund only part of an application fee. You can do so as many times as you wish until the entire fee has been refunded. - * - * Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded + * + * Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded * application fee, or when trying to refund more money than is left on an application fee. */ createRefund(feeId: string, data: applicationFees.IApplicationFeeRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; createRefund(feeId: string, data: applicationFees.IApplicationFeeRefundCreationOptions, response?: IResponseFn): Promise; createRefund(feeId: string, response?: IResponseFn): Promise; createRefund(feeId: string, options: HeaderOptions, response?: IResponseFn): Promise; - + /** - * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details + * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details * about a specific refund stored on the application fee. */ retreiveRefund(feeId: string, refundId: string, options: HeaderOptions, response?: IResponseFn): Promise; retreiveRefund(feeId: string, refundId: string, response?: IResponseFn): Promise; - + /** - * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left + * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left * unchanged. - * + * * This request only accepts metadata as an argument. */ updateRefund(feeId: string, refundId: string, data: { metadata?: IMetadata }, options: HeaderOptions, response?: IResponseFn): Promise; updateRefund(feeId: string, refundId: string, data: { metadata?: IMetadata }, response?: IResponseFn): Promise; - + /** - * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available - * by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after + * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available + * by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after * parameters to page through additional refunds. */ listRefunds(feeId: string, data: IListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; @@ -4627,44 +4627,44 @@ declare namespace StripeNode { listRefunds(feeId: string, options: HeaderOptions, response?: IResponseFn>): Promise>; listRefunds(feeId: string, response?: IResponseFn>): Promise>; } - + class ApplicationFeeRefunds extends StripeResource { /** - * Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that + * Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that * the fee was originally collected from. - * + * * You can optionally refund only part of an application fee. You can do so as many times as you wish until the entire fee has been refunded. - * - * Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded + * + * Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded * application fee, or when trying to refund more money than is left on an application fee. */ create(data: applicationFees.IApplicationFeeRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: applicationFees.IApplicationFeeRefundCreationOptions, response?: IResponseFn): Promise; create(options: HeaderOptions, response?: IResponseFn): Promise; create(response?: IResponseFn): Promise; - + /** - * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details + * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details * about a specific refund stored on the application fee. */ retrieve(refundId: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(refundId: string, options: IDataOptions, response?: IResponseFn): Promise; retrieve(refundId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(refundId: string, response?: IResponseFn): Promise; - - + + /** - * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left + * Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left * unchanged. - * + * * This request only accepts metadata as an argument. */ update(refundId: string, data: { metadata?: IMetadata }, options: HeaderOptions, response?: IResponseFn): Promise; update(refundId: string, data: { metadata?: IMetadata }, response?: IResponseFn): Promise; - + /** - * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available - * by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after + * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available + * by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after * parameters to page through additional refunds. */ list(data: IListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; @@ -4672,28 +4672,28 @@ declare namespace StripeNode { list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; } - + class Balance extends StripeResource { retrieve(options: HeaderOptions, response?: IResponseFn): Promise; retrieve(response?: IResponseFn): Promise; - + retrieveTransaction(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveTransaction(id: string, response?: IResponseFn): Promise; - + listTransactions(data: balance.IBalanceListOptions, options: HeaderOptions, response?: IResponseFn): Promise>; listTransactions(data: balance.IBalanceListOptions, response?: IResponseFn): Promise>; listTransactions(options: HeaderOptions, response?: IResponseFn): Promise>; listTransactions(response?: IResponseFn): Promise>; } - + class BitcoinReceivers extends StripeResource { /** - * Creates a Bitcoin receiver object that can be used to accept bitcoin payments from your customer. The receiver exposes a Bitcoin address + * Creates a Bitcoin receiver object that can be used to accept bitcoin payments from your customer. The receiver exposes a Bitcoin address * and is created with a bitcoin to USD exchange rate that is valid for 10 minutes. */ create(data: bitcoinReceivers.IBitcoinReceiverCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: bitcoinReceivers.IBitcoinReceiverCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the Bitcoin receiver with the given ID. */ @@ -4701,16 +4701,16 @@ declare namespace StripeNode { retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - - + + /** * Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first. */ list(data: bitcoinReceivers.IBitcoinReceiverListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; list(data: bitcoinReceivers.IBitcoinReceiverListOptions, response?: IResponseFn>): Promise>; - + //update(id: string): void; // This does seem to be a method in the library (https://github.com/stripe/stripe-node/blob/master/lib/resources/BitcoinReceivers.js#L12), but isn't in the API documentation. - + setMetadata(): void; //TODO: Implement placeholder method getMetadata(): void; //TODO: Implement placeholder method } @@ -4744,8 +4744,8 @@ declare namespace StripeNode { retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - - + + /** * Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. * This request accepts only the description, metadata, receipt_emailand fraud_details as arguments. @@ -4779,7 +4779,7 @@ declare namespace StripeNode { list(data: charges.IChargeListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * When you create a new refund, you must specify a charge to create it on. * Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. The fees you were originally charged are also refunded. @@ -4790,7 +4790,7 @@ declare namespace StripeNode { refund(chargeId: string, data: refunds.IRefundCreationOptions, response?: IResponseFn): Promise; refund(chargeId: string, options: HeaderOptions, response?: IResponseFn): Promise; refund(chargeId: string, response?: IResponseFn): Promise; - + /** * When you create a new refund, you must specify a charge to create it on. Creating a new refund will refund a charge that has previously * been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. The fees you were @@ -4804,7 +4804,7 @@ declare namespace StripeNode { * @param id The identifier of the charge to be refunded. * @param data Options for specifying reasons and refund amount * @param response The refund. - * + * * @deprecated According to source code (https://github.com/stripe/stripe-node/blob/master/lib/resources/Charges.js#L43) */ createRefund(id: string, data: refunds.IRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; @@ -4849,7 +4849,7 @@ declare namespace StripeNode { listRefunds(chargeId: string, data: IListOptions, response?: IResponseFn>): Promise>; listRefunds(chargeId: string, options: HeaderOptions, response?: IResponseFn>): Promise>; listRefunds(chargeId: string, response?: IResponseFn>): Promise>; - + markAsSafe(chargeId: string, response?: IResponseFn): Promise; markAsFraudulent(chargeId: string, response?: IResponseFn): Promise; } @@ -4857,15 +4857,15 @@ declare namespace StripeNode { class ChargeRefunds extends StripeResource { /** * When you create a new refund, you must specify a charge to create it on. - * - * Creating a new refund will refund a charge that has previously been created but not yet refunded. - * Funds will be refunded to the credit or debit card that was originally charged. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. * The fees you were originally charged are also refunded. - * - * You can optionally refund only part of a charge. + * + * You can optionally refund only part of a charge. * You can do so as many times as you wish until the entire charge has been refunded. - * - * Once entirely refunded, a charge can't be refunded again. + * + * Once entirely refunded, a charge can't be refunded again. * This method will throw an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge. */ create(data: refunds.IRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; @@ -4885,15 +4885,15 @@ declare namespace StripeNode { /** * Updates the specified refund by setting the values of the parameters passed. * Any parameters not provided will be left unchanged. - * + * * This request only accepts metadata as an argument. */ update(id: string, data: IDataOptionsWithMetadata, options: HeaderOptions, response?: IResponseFn): Promise; update(id: string, data: IDataOptionsWithMetadata, response?: IResponseFn): Promise; /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, - * with the most recent refunds appearing first. + * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, + * with the most recent refunds appearing first. * For convenience, the 10 most recent refunds are always available by default on the charge object. */ list(data: refunds.IRefundListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; @@ -4916,7 +4916,7 @@ declare namespace StripeNode { */ create(data: coupons.ICouponCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: coupons.ICouponCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the coupon with the given ID. * @@ -4928,8 +4928,8 @@ declare namespace StripeNode { retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - - + + /** * Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. * @@ -4941,7 +4941,7 @@ declare namespace StripeNode { */ update(id: string, data: IDataOptionsWithMetadata, options: HeaderOptions, response?: IResponseFn): Promise; update(id: string, data: IDataOptionsWithMetadata, response?: IResponseFn): Promise; - + /** * You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any * customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons @@ -4954,7 +4954,7 @@ declare namespace StripeNode { */ del(id: string, options: HeaderOptions, response?: IResponseFn): Promise; del(id: string, response?: IResponseFn): Promise; - + /** * Returns a list of your coupons. * @@ -4985,7 +4985,7 @@ declare namespace StripeNode { create(data: { card?: sources.ISourceCreationOptionsExtended; }, response?: IResponseFn): Promise; - + /** * You can see a list of the cards belonging to a customer or recipient. Note that the 10 most recent * cards are always available by default on the customer or recipient object. If you need more than @@ -5001,7 +5001,7 @@ declare namespace StripeNode { list(data: IListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the * full card details. Stripe also works directly with card networks so that your customers can continue using your service without @@ -5013,7 +5013,7 @@ declare namespace StripeNode { */ update(cardId: string, data: cards.ICardUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(cardId: string, data: cards.ICardUpdateOptions, response?: IResponseFn): Promise; - + /** * By default, you can see the 10 most recent cards stored on a customer or recipient directly on the customer or recipient object, but * you can also retrieve details about a specific card stored on the customer or recipient. @@ -5024,7 +5024,7 @@ declare namespace StripeNode { */ retrieve(cardId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(cardId: string, response?: IResponseFn): Promise; - + /** * You can delete cards from a customer or recipient. If you delete a card that is currently the * default source on a customer, then the most recently added source will become the new default. @@ -5042,7 +5042,7 @@ declare namespace StripeNode { del(cardId: string, options: HeaderOptions, response?: IResponseFn): Promise; del(cardId: string, response?: IResponseFn): Promise; } - + class Customers extends StripeResource { /** * Creates a new customer object. @@ -5057,7 +5057,7 @@ declare namespace StripeNode { */ create(data: customers.ICustomerCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: customers.ICustomerCreationOptions, response?: IResponseFn): Promise; - + /** * Returns a list of your customers. The customers are returned sorted by creation date, with the most recently created customers * appearing first. @@ -5073,7 +5073,7 @@ declare namespace StripeNode { list(data: IListOptionsCreated, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. * For example, if you pass the card parameter, that becomes the customer's active card to be used for all charges in the future. @@ -5085,7 +5085,7 @@ declare namespace StripeNode { * * @returns Returns the customer object if the update succeeded. Throws an error if update parameters are invalid (e.g. specifying * an invalid coupon or an invalid card). - * + * * @param id The identifier of the customer to be retrieved. */ update(id: string, data: customers.ICustomerUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; @@ -5104,7 +5104,7 @@ declare namespace StripeNode { retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - + /** * Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. * @@ -5116,9 +5116,9 @@ declare namespace StripeNode { */ del(id: string, options: HeaderOptions, response?: IResponseFn): Promise; del(id: string, response?: IResponseFn): Promise; - - - + + + /** * When you create a new credit card, you must specify a customer or recipient to create it on. If the card's owner has no default card, * then the new card will become the default. However, if the owner already has a default then it will not change. To change the default, @@ -5127,7 +5127,7 @@ declare namespace StripeNode { * @returns Returns the card object. * * @param customerId The customer ID to which to add the card. - * + * * @deprecated */ createCard(customerId: string, data: { @@ -5136,7 +5136,7 @@ declare namespace StripeNode { createCard(customerId: string, data: { card?: sources.ISourceCreationOptionsExtended; }, response?: IResponseFn): Promise; - + /** * By default, you can see the 10 most recent cards stored on a customer or recipient directly on the customer or recipient object, but * you can also retrieve details about a specific card stored on the customer or recipient. @@ -5148,7 +5148,7 @@ declare namespace StripeNode { */ retrieveCard(customerId: string, cardId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveCard(customerId: string, cardId: string, response?: IResponseFn): Promise; - + /** * If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the * full card details. Stripe also works directly with card networks so that your customers can continue using your service without @@ -5161,7 +5161,7 @@ declare namespace StripeNode { */ updateCard(customerId: string, cardId: string, data: cards.ICardUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateCard(customerId: string, cardId: string, data: cards.ICardUpdateOptions, response?: IResponseFn): Promise; - + /** * You can delete cards from a customer or recipient. If you delete a card that is currently the * default source on a customer, then the most recently added source will become the new default. @@ -5179,7 +5179,7 @@ declare namespace StripeNode { */ deleteCard(customerId: string, cardId: string, options: HeaderOptions, response?: IResponseFn): Promise; deleteCard(customerId: string, cardId: string, response?: IResponseFn): Promise; - + /** * You can see a list of the cards belonging to a customer or recipient. Note that the 10 most recent * cards are always available by default on the customer or recipient object. If you need more than @@ -5197,13 +5197,13 @@ declare namespace StripeNode { listCards(customerId: string, data: IListOptions, response?: IResponseFn>): Promise>; listCards(customerId: string, options: HeaderOptions, response?: IResponseFn>): Promise>; listCards(customerId: string, response?: IResponseFn>): Promise>; - - + + /** - * When adding a card to a customer, the parameter name is source. When - * adding to an account, the parameter name is external_account. The - * value can either be a token, like the ones returned by our Stripe.js, or a - * dictionary containing a user's credit card details. + * When adding a card to a customer, the parameter name is source. When + * adding to an account, the parameter name is external_account. The + * value can either be a token, like the ones returned by our Stripe.js, or a + * dictionary containing a user's credit card details. * Stripe will automatically validate the card. * * @returns Returns the card object. @@ -5213,10 +5213,10 @@ declare namespace StripeNode { createSource(customerId: string, data: customers.ICustomerCardSourceCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; createSource(customerId: string, data: customers.ICustomerCardSourceCreationOptions, response?: IResponseFn): Promise; /** - * When adding a card to a customer, the parameter name is source. When - * adding to an account, the parameter name is external_account. The - * value can either be a token, like the ones returned by our Stripe.js, or a - * dictionary containing a user’s credit card details. + * When adding a card to a customer, the parameter name is source. When + * adding to an account, the parameter name is external_account. The + * value can either be a token, like the ones returned by our Stripe.js, or a + * dictionary containing a user’s credit card details. * Stripe will automatically validate the card. * * @returns Returns the card or bank account object. @@ -5225,7 +5225,7 @@ declare namespace StripeNode { */ createSource(customerId: string, data: customers.ICustomerSourceCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; createSource(customerId: string, data: customers.ICustomerSourceCreationOptions, response?: IResponseFn): Promise; - + /** * You can see a list of the cards belonging to a customer or recipient. Note that the 10 most recent * cards are always available by default on the customer or recipient object. If you need more than @@ -5256,7 +5256,7 @@ declare namespace StripeNode { */ listSource(customerId: string, data: customers.IBankAccountSourceListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; listSource(customerId: string, data: customers.IBankAccountSourceListOptions, response?: IResponseFn>): Promise>; - + /** * By default, you can see the 10 most recent cards/bank accounts stored on a customer or recipient directly on the customer or recipient object, but * you can also retrieve details about a specific card/bank account stored on the customer or recipient. @@ -5268,7 +5268,7 @@ declare namespace StripeNode { */ retrieveSource(customerId: string, sourceId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveSource(customerId: string, sourceId: string, response?: IResponseFn): Promise; - + /** * If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the * full card details. Stripe also works directly with card networks so that your customers can continue using your service without @@ -5281,9 +5281,9 @@ declare namespace StripeNode { */ updateSource(customerId: string, sourceId: string, data: cards.ICardUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateSource(customerId: string, sourceId: string, data: cards.ICardUpdateOptions, response?: IResponseFn): Promise; - + /** - * Updates the metadata, account_holder_name, and account_holder_type of a bank account belonging to a Customer. Other bank account details + * Updates the metadata, account_holder_name, and account_holder_type of a bank account belonging to a Customer. Other bank account details * are not editable by design. * * @returns Returns the bank account object. @@ -5293,7 +5293,7 @@ declare namespace StripeNode { */ updateSource(customerId: string, sourceId: string, data: bankAccounts.IBankAccountUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateSource(customerId: string, sourceId: string, data: bankAccounts.IBankAccountUpdateOptions, response?: IResponseFn): Promise; - + /** * You can delete cards or bank accounts from a customer or recipient. If you delete a card or bank account that is currently the * default source on a customer, then the most recently added source will become the new default. @@ -5315,8 +5315,8 @@ declare namespace StripeNode { verifySource(customerId: string, sourceId: string, options: HeaderOptions): Promise<{}>; //TODO: This still needs properly implementing. verifySource(customerId: string, sourceId: string): Promise<{}>; //TODO: This still needs properly implementing. - - + + /** * Creates a new subscription on an existing customer. * @@ -5329,7 +5329,7 @@ declare namespace StripeNode { */ createSubscription(customerId: string, data: subscriptions.ISubscriptionCustCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; createSubscription(customerId: string, data: subscriptions.ISubscriptionCustCreationOptions, response?: IResponseFn): Promise; - + /** * By default, you can see the 10 most recent active subscriptions stored on a customer directly on the customer * object, but you can also retrieve details about a specific active subscription for a customer. @@ -5341,7 +5341,7 @@ declare namespace StripeNode { */ retrieveSubscription(customerId: string, subscriptionId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveSubscription(customerId: string, subscriptionId: string, response?: IResponseFn): Promise; - + /** * Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, * we will optionally prorate the price we charge next month to make up for any price changes. @@ -5369,7 +5369,7 @@ declare namespace StripeNode { */ updateSubscription(customerId: string, subscriptionId: string, data: subscriptions.ISubscriptionUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateSubscription(customerId: string, subscriptionId: string, data: subscriptions.ISubscriptionUpdateOptions, response?: IResponseFn): Promise; - + /** * Cancels a customer's subscription. If you set the at_period_end parameter to true, the subscription will remain active until * the end of the period, at which point it will be canceled and not renewed. By default, the subscription is terminated @@ -5392,7 +5392,7 @@ declare namespace StripeNode { cancelSubscription(customerId: string, subscriptionId: string, data: subscriptions.ISubscriptionCancellationOptions, options: HeaderOptions, response?: IResponseFn): Promise; cancelSubscription(customerId: string, subscriptionId: string, data: subscriptions.ISubscriptionCancellationOptions, response?: IResponseFn): Promise; cancelSubscription(customerId: string, subscriptionId: string, response?: IResponseFn): Promise; - + /** * You can see a list of the customer's active subscriptions. Note that the 10 most recent active subscriptions are always available * by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page @@ -5408,8 +5408,8 @@ declare namespace StripeNode { listSubscriptions(customerId: string, data: IListOptions, response?: IResponseFn>): Promise>; listSubscriptions(customerId: string, options: HeaderOptions, response?: IResponseFn>): Promise>; listSubscriptions(customerId: string, response?: IResponseFn>): Promise>; - - + + /** * Removes the currently applied discount on a customer. * @@ -5420,7 +5420,7 @@ declare namespace StripeNode { */ deleteDiscount(customerId: string, options: HeaderOptions, response?: IResponseFn): Promise;; deleteDiscount(customerId: string, response?: IResponseFn): Promise;; - + /** * Removes the currently applied discount on a subscription. * @@ -5445,7 +5445,7 @@ declare namespace StripeNode { */ retrieve(subscriptionId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(subscriptionId: string, response?: IResponseFn): Promise; - + /** * Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, * we will optionally prorate the price we charge next month to make up for any price changes. @@ -5472,7 +5472,7 @@ declare namespace StripeNode { */ update(subscriptionId: string, data: subscriptions.ISubscriptionUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(subscriptionId: string, data: subscriptions.ISubscriptionUpdateOptions, response?: IResponseFn): Promise; - + /** * Cancels a customer's subscription. If you set the at_period_end parameter to true, the subscription will remain active until * the end of the period, at which point it will be canceled and not renewed. By default, the subscription is terminated @@ -5495,7 +5495,7 @@ declare namespace StripeNode { del(subscriptionId: string, data: subscriptions.ISubscriptionCancellationOptions, response?: IResponseFn): Promise; del(subscriptionId: string, options: HeaderOptions, response?: IResponseFn): Promise; del(subscriptionId: string, response?: IResponseFn): Promise; - + /** * You can see a list of the customer's active subscriptions. Note that the 10 most recent active subscriptions are always available * by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page @@ -5510,7 +5510,7 @@ declare namespace StripeNode { list(data: subscriptions.ISubscriptionListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * Removes the currently applied discount on a subscription. * @@ -5522,7 +5522,7 @@ declare namespace StripeNode { deleteDiscount(subscriptionId: string, options: HeaderOptions, response?: IResponseFn): Promise;; deleteDiscount(subscriptionId: string, response?: IResponseFn): Promise;; } - + class Subscriptions extends SubscriptionsBase { /** * Creates a new subscription on an existing customer. @@ -5549,7 +5549,7 @@ declare namespace StripeNode { create(data: subscriptions.ISubscriptionCustCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: subscriptions.ISubscriptionCustCreationOptions, response?: IResponseFn): Promise; } - + class Disputes extends StripeResource { /** * Retrieves the dispute with the given ID. @@ -5558,8 +5558,8 @@ declare namespace StripeNode { retrieve(disputeId: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(disputeId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(disputeId: string, response?: IResponseFn): Promise; - - + + /** * When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence in * order to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to @@ -5571,18 +5571,18 @@ declare namespace StripeNode { */ update(disputeId: string, data: disputes.IDisputeUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(disputeId: string, data: disputes.IDisputeUpdateOptions, response?: IResponseFn): Promise; - + /** - * Closing the dispute for a charge indicates that you do not have any evidence to submit and are + * Closing the dispute for a charge indicates that you do not have any evidence to submit and are * essentially ‘dismissing’ the dispute, acknowledging it as lost - * - * The status of the dispute will change from needs_response to lost. - * + * + * The status of the dispute will change from needs_response to lost. + * * *Closing a dispute is irreversible!* */ close(disputeId: string, options: HeaderOptions, response?: IResponseFn): Promise; close(disputeId: string, response?: IResponseFn): Promise; - + /** * Returns a list of your disputes. */ @@ -5590,22 +5590,22 @@ declare namespace StripeNode { list(data: IListOptionsCreated, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + setMetadata(): void; //TODO: Implement placeholder method getMetadata(): void; //TODO: Implement placeholder method } - + class Events extends StripeResource { /** - * Retrieves the details of an event. Supply the unique identifier of the event, which you might have + * Retrieves the details of an event. Supply the unique identifier of the event, which you might have * received in a webhook. */ retrieve(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - - + + /** * List events, going back up to 30 days. */ @@ -5617,25 +5617,25 @@ declare namespace StripeNode { class FileUploads extends StripeResource { /** - * To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. + * To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. * The request should contain the file you would like to upload, as well as the parameters for creating a file. - * + * * All of Stripe’s officially supported API libraries should have support for sending multipart/form-data. */ create(data: fileUploads.IFileUploadCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: fileUploads.IFileUploadCreationOptions, response?: IResponseFn): Promise; - + /** - * Retrieves the details of an existing file object. + * Retrieves the details of an existing file object. * Supply the unique file upload ID from a file creation request, and Stripe will return the corresponding transfer information. */ retrieve(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - + /** - * Returns a list of the files that you have uploaded to Stripe. + * Returns a list of the files that you have uploaded to Stripe. * The file uploads are returned sorted by creation date, with the most recently created file uploads appearing first. */ list(data: fileUploads.IFileUploadListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; @@ -5658,7 +5658,7 @@ declare namespace StripeNode { */ create(data: invoices.IInvoiceCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: invoices.IInvoiceCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the invoice with the given ID. The invoice object contains a * lines hash that contains information about the subscriptions and invoice items that have been applied to the @@ -5681,7 +5681,7 @@ declare namespace StripeNode { retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - + /** * When retrieving an invoice, you'll get a lines property containing the total count of line items and the first * handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -5695,7 +5695,7 @@ declare namespace StripeNode { retrieveLines(id: string, data: invoices.IInvoiceLineItemRetrievalOptions, response?: IResponseFn>): Promise; retrieveLines(id: string, options: HeaderOptions, response?: IResponseFn>): Promise; retrieveLines(id: string, response?: IResponseFn>): Promise; - + /** * At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, * including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable @@ -5712,7 +5712,7 @@ declare namespace StripeNode { retrieveUpcoming(id: string, data: invoices.IInvoiceUpcomingOptions, response?: IResponseFn): Promise; retrieveUpcoming(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveUpcoming(id: string, response?: IResponseFn): Promise; - + /** * Until an invoice is paid, it is marked as open (closed=false). If you'd like to stop Stripe from automatically attempting * payment on an invoice or would simply like to close the invoice out as no longer owed by the customer, you can update the @@ -5725,7 +5725,7 @@ declare namespace StripeNode { */ update(id: string, data: invoices.IInvoiceUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(id: string, data: invoices.IInvoiceUpdateOptions, response?: IResponseFn): Promise; - + /** * Stripe automatically creates and then attempts to pay invoices for customers on subscriptions. We'll also retry unpaid * invoices according to your retry settings. However, if you'd like to attempt to collect payment on an invoice out of the @@ -5737,7 +5737,7 @@ declare namespace StripeNode { */ pay(id: string, options: HeaderOptions, response?: IResponseFn): Promise; pay(id: string, response?: IResponseFn): Promise; - + /** * You can list all invoices, or list the invoices for a specific customer. The invoices are returned * sorted by creation date, with the most recently created invoices appearing first. @@ -5751,44 +5751,44 @@ declare namespace StripeNode { list(data: invoices.IInvoiceListOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; } - + class InvoiceItems extends StripeResource { /** * Adds an arbitrary charge or credit to the customer’s upcoming invoice. */ create(data: invoiceItems.InvoiceItemCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: invoiceItems.InvoiceItemCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the invoice item with the given ID. */ retrieve(invoiceItemId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(invoiceItemId: string, response?: IResponseFn): Promise; - + /** - * Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the + * Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the * invoice it's attached to is closed. */ update(invoiceItemId: string, data: invoiceItems.InvoiceItemUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(invoiceItemId: string, data: invoiceItems.InvoiceItemUpdateOptions, response?: IResponseFn): Promise; - + /** - * Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice + * Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice * items appearing first. */ list(data: invoiceItems.InvoiceItemListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; list(data: invoiceItems.InvoiceItemListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** - * Removes an invoice item from the upcoming invoice. Removing an invoice item is only possible before the invoice it's attached + * Removes an invoice item from the upcoming invoice. Removing an invoice item is only possible before the invoice it's attached * to is closed. */ del(invoiceItemId: string, options: HeaderOptions, response?: IResponseFn): Promise; del(invoiceItemId: string, response?: IResponseFn): Promise; } - + class Plans extends StripeResource { /** * You can create plans easily via the plan management page of the Stripe dashboard. Plan creation is also @@ -5800,7 +5800,7 @@ declare namespace StripeNode { */ create(data: plans.IPlanCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: plans.IPlanCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the plan with the given ID. * @@ -5810,7 +5810,7 @@ declare namespace StripeNode { */ retrieve(planName: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(planName: string, response?: IResponseFn): Promise; - + /** * Updates the name of a plan. Other plan details (price, interval, etc.) are, by design, not editable. * @@ -5821,7 +5821,7 @@ declare namespace StripeNode { */ update(planName: string, data: plans.IPlanUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(planName: string, data: plans.IPlanUpdateOptions, response?: IResponseFn): Promise; - + /** * You can delete plans via the plan management page of the Stripe dashboard. However, deleting a plan does not affect * any current subscribers to the plan; it merely means that new subscribers can't be added to that plan. You can also @@ -5833,7 +5833,7 @@ declare namespace StripeNode { */ del(planName: string, options: HeaderOptions, response?: IResponseFn): Promise; del(planName: string, response?: IResponseFn): Promise; - + /** * Returns a list of your plans. * @@ -5847,7 +5847,7 @@ declare namespace StripeNode { list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; } - + /** * @deprecated */ @@ -5901,24 +5901,24 @@ declare namespace StripeNode { */ del(id: string): void; } - + class Refunds extends StripeResource { /** * When you create a new refund, you must specify a charge to create it on. - * - * Creating a new refund will refund a charge that has previously been created but not yet refunded. - * Funds will be refunded to the credit or debit card that was originally charged. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. * The fees you were originally charged are also refunded. - * - * You can optionally refund only part of a charge. + * + * You can optionally refund only part of a charge. * You can do so as many times as you wish until the entire charge has been refunded. - * - * Once entirely refunded, a charge can't be refunded again. + * + * Once entirely refunded, a charge can't be refunded again. * This method will throw an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge. */ create(data: refunds.IRefundCreationOptionsWithCharge, options: HeaderOptions, response?: IResponseFn): Promise; create(data: refunds.IRefundCreationOptionsWithCharge, response?: IResponseFn): Promise; - + /** * Retrieves the details of an existing refund. */ @@ -5926,20 +5926,20 @@ declare namespace StripeNode { retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - - + + /** * Updates the specified refund by setting the values of the parameters passed. * Any parameters not provided will be left unchanged. - * + * * This request only accepts metadata as an argument. */ update(id: string, data: IDataOptionsWithMetadata, options: HeaderOptions, response?: IResponseFn): Promise; update(id: string, data: IDataOptionsWithMetadata, response?: IResponseFn): Promise; - + /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, - * with the most recent refunds appearing first. + * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, + * with the most recent refunds appearing first. * For convenience, the 10 most recent refunds are always available by default on the charge object. */ list(data: refunds.IRefundListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; @@ -5947,32 +5947,32 @@ declare namespace StripeNode { list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; } - + class Tokens extends StripeResource { /** - * Creates a single use token that wraps the details of a credit card. This token can be used - * in place of a credit card object with any API method. These tokens can only be used once: + * Creates a single use token that wraps the details of a credit card. This token can be used + * in place of a credit card object with any API method. These tokens can only be used once: * by creating a new charge object, or attaching them to a customer. */ create(data: tokens.ICardTokenCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: tokens.ICardTokenCreationOptions, response?: IResponseFn): Promise; - + /** - * Creates a single use token that wraps the details of a bank account. This token can be used - * in place of a bank account object with any API method. These tokens can only be used once: + * Creates a single use token that wraps the details of a bank account. This token can be used + * in place of a bank account object with any API method. These tokens can only be used once: * by attaching them to a recipient or managed account. */ create(data: tokens.IBankAccountTokenCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: tokens.IBankAccountTokenCreationOptions, response?: IResponseFn): Promise; - + /** - * Creates a single use token that wraps the details of personally identifiable information (PII). - * This token can be used in place of a personal_id_number in the Account Update API method. + * Creates a single use token that wraps the details of personally identifiable information (PII). + * This token can be used in place of a personal_id_number in the Account Update API method. * These tokens can only be used once. */ create(data: tokens.IPiiTokenCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: tokens.IPiiTokenCreationOptions, response?: IResponseFn): Promise; - + /** * Retrieves the token with the given ID. */ @@ -5980,155 +5980,155 @@ declare namespace StripeNode { retrieve(tokenId: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(tokenId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(tokenId: string, response?: IResponseFn): Promise; - + } class Transfers extends StripeResource { /** - * To send funds from your Stripe account to a third-party recipient or to your own bank account, you create a new transfer + * To send funds from your Stripe account to a third-party recipient or to your own bank account, you create a new transfer * object. Your Stripe balance must be able to cover the transfer amount, or you'll receive an "Insufficient Funds" error. - * + * * If your API key is in test mode, money won't actually be sent, though everything else will occur as if in live mode. - * - * If you are creating a manual transfer or a special case transfer on a Stripe account that uses multiple payment source - * types, you'll need to specify the source type balance that the transfer should draw from. The balance object details + * + * If you are creating a manual transfer or a special case transfer on a Stripe account that uses multiple payment source + * types, you'll need to specify the source type balance that the transfer should draw from. The balance object details * available and pending amounts by source type. */ create(data: transfers.ITransferCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: transfers.ITransferCreationOptions, response?: IResponseFn): Promise; - + /** - * Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or + * Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or * the transfer list, and Stripe will return the corresponding transfer information. */ retrieve(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; - - + + /** - * Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left + * Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left * unchanged. - * + * * This request accepts only the description and metadata as arguments. */ update(id: string, data: transfers.ITransferUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(id: string, data: transfers.ITransferUpdateOptions, response?: IResponseFn): Promise; - + /** - * Returns a list of existing transfers sent to third-party bank accounts or that Stripe has sent you. The transfers are + * Returns a list of existing transfers sent to third-party bank accounts or that Stripe has sent you. The transfers are * returned in sorted order, with the most recently created transfers appearing first. */ list(data: transfers.ITransferListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; list(data: transfers.ITransferListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + cancel(id: string, options: HeaderOptions, response?: IResponseFn): Promise; cancel(id: string, response?: IResponseFn): Promise; - + listTransactions(options: HeaderOptions, response?: IResponseFn>): Promise>; //TODO: Not sure if this should be a list of balance transactions or charges. listTransactions(response?: IResponseFn>): Promise>; //TODO: Not sure if this should be a list of balance transactions or charges. - + /** * When you create a new reversal, you must specify a transfer to create it on. - * - * Creating a new reversal on a transfer that has previously been created but not paid out will return the funds to your available balance + * + * Creating a new reversal on a transfer that has previously been created but not paid out will return the funds to your available balance * and refund the fees you were originally charged on the transfer. You may not reverse automatic Stripe transfers. - * - * When reversing transfers to Stripe accounts, you can optionally reverse part of the transfer. You can do so as many times as you wish + * + * When reversing transfers to Stripe accounts, you can optionally reverse part of the transfer. You can do so as many times as you wish * until the entire transfer has been reversed. - * - * Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, + * + * Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, * or when trying to reverse more money than is left on a transfer. */ reverse(id: string, data: transferReversals.IReversalCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; reverse(id: string, options: HeaderOptions, response?: IResponseFn): Promise; reverse(id: string, response?: IResponseFn): Promise; - + /** * When you create a new reversal, you must specify a transfer to create it on. - * - * Creating a new reversal on a transfer that has previously been created but not paid out will return the funds to your available balance + * + * Creating a new reversal on a transfer that has previously been created but not paid out will return the funds to your available balance * and refund the fees you were originally charged on the transfer. You may not reverse automatic Stripe transfers. - * - * When reversing transfers to Stripe accounts, you can optionally reverse part of the transfer. You can do so as many times as you wish + * + * When reversing transfers to Stripe accounts, you can optionally reverse part of the transfer. You can do so as many times as you wish * until the entire transfer has been reversed. - * - * Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, + * + * Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, * or when trying to reverse more money than is left on a transfer. */ createReverse(transferId: string, data: transferReversals.IReversalCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; createReverse(transferId: string, options: HeaderOptions, response?: IResponseFn): Promise; createReverse(transferId: string, response?: IResponseFn): Promise; - + /** - * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a + * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a * specific reversal stored on the transfer. */ retrieveReversal(transferId: string, reversalId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieveReversal(transferId: string, reversalId: string, response?: IResponseFn): Promise; - + /** * Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. - * + * * This request only accepts metadata and description as arguments. */ updateReversal(transferId: string, reversalId: string, data: transferReversals.IReversalUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; updateReversal(transferId: string, reversalId: string, data: transferReversals.IReversalUpdateOptions, response?: IResponseFn): Promise; - + /** - * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by - * default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after + * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by + * default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after * parameters to page through additional reversals. */ listReversals(transferId: string, data: IListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; listReversals(transferId: string, data: IListOptions, response?: IResponseFn>): Promise>; listReversals(transferId: string, options: HeaderOptions, response?: IResponseFn>): Promise>; listReversals(transferId: string, response?: IResponseFn>): Promise>; - + setMetadata(): void; //TODO: Implement placeholder method getMetadata(): void; //TODO: Implement placeholder method } - + class TransferReversals extends StripeResource { /** * When you create a new reversal, you must specify a transfer to create it on. - * - * Creating a new reversal on a transfer that has previously been created but not paid out will return the funds to your available balance + * + * Creating a new reversal on a transfer that has previously been created but not paid out will return the funds to your available balance * and refund the fees you were originally charged on the transfer. You may not reverse automatic Stripe transfers. - * - * When reversing transfers to Stripe accounts, you can optionally reverse part of the transfer. You can do so as many times as you wish + * + * When reversing transfers to Stripe accounts, you can optionally reverse part of the transfer. You can do so as many times as you wish * until the entire transfer has been reversed. - * - * Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, + * + * Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, * or when trying to reverse more money than is left on a transfer. */ create(data: transferReversals.IReversalCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(options: HeaderOptions, response?: IResponseFn): Promise; create(response?: IResponseFn): Promise; - + /** - * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a + * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a * specific reversal stored on the transfer. */ retrieve(reversalId: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(reversalId: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(reversalId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(reversalId: string, response?: IResponseFn): Promise; - + /** * Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. - * + * * This request only accepts metadata and description as arguments. */ update(reversalId: string, data: transferReversals.IReversalUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(reversalId: string, data: transferReversals.IReversalUpdateOptions, response?: IResponseFn): Promise; - + /** - * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by - * default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after + * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by + * default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after * parameters to page through additional reversals. */ list(data: IListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; @@ -6136,7 +6136,7 @@ declare namespace StripeNode { list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; } - + class CountrySpecs extends StripeResource { /** * Lists all Country Spec objects available in the API. @@ -6145,10 +6145,10 @@ declare namespace StripeNode { list(data: IListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * Returns a Country Spec for a given Country code. - * + * * @param retrieve An ISO country code. Available country codes can be listed with the List Country Specs endpoint. */ retrieve(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; @@ -6156,36 +6156,36 @@ declare namespace StripeNode { retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(id: string, response?: IResponseFn): Promise; } - + class Orders { /** * Creates a new order object. */ create(data: orders.IOrderCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: orders.IOrderCreationOptions, response?: IResponseFn): Promise; - + /** - * Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, + * Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, * and Stripe will return the corresponding order information. */ retrieve(orderId: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(orderId: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(orderId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(orderId: string, response?: IResponseFn): Promise; - + /** - * Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. * This request accepts only the metadata, and status as arguments. */ update(orderId: string, data: orders.IOrderUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(orderId: string, data: orders.IOrderUpdateOptions, response?: IResponseFn): Promise; - + /** * Pay an order by providing a source to create a payment. */ pay(orderId: string, data: orders.IOrderPayOptions, options: HeaderOptions, response?: IResponseFn): Promise; pay(orderId: string, data: orders.IOrderPayOptions, response?: IResponseFn): Promise; - + /** * Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. */ @@ -6194,32 +6194,32 @@ declare namespace StripeNode { list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; } - + class Products { /** * Creates a new product object. */ create(data: products.IProductCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: products.IProductCreationOptions, response?: IResponseFn): Promise; - + /** - * Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product + * Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product * list, and Stripe will return the corresponding product information. */ retrieve(productId: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(productId: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(productId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(productId: string, response?: IResponseFn): Promise; - + /** * Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. - * - * Note that a product's attributes are not editable. Instead, you would need to deactivate the existing product and create a new one + * + * Note that a product's attributes are not editable. Instead, you would need to deactivate the existing product and create a new one * with the new attribute values. */ update(productId: string, data: products.IProductUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(productId: string, data: products.IProductUpdateOptions, response?: IResponseFn): Promise; - + /** * Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. */ @@ -6227,39 +6227,39 @@ declare namespace StripeNode { list(data: products.IProductListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * Delete a product. Deleting a product is only possible if it has no SKUs associated with it. */ del(productId: string, options: HeaderOptions, response?: IResponseFn): Promise; del(productId: string, response?: IResponseFn): Promise; } - + class SKUs { /** * Creates a new SKU associated with a product. */ create(data: skus.ISkuCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; create(data: skus.ISkuCreationOptions, response?: IResponseFn): Promise; - + /** - * Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the + * Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the * product, and Stripe will return the corresponding SKU information. */ retrieve(skuId: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(skuId: string, data: IDataOptions, response?: IResponseFn): Promise; retrieve(skuId: string, options: HeaderOptions, response?: IResponseFn): Promise; retrieve(skuId: string, response?: IResponseFn): Promise; - + /** * Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged. - * - * Note that a SKU's attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with + * + * Note that a SKU's attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with * the new attribute values. */ update(skuId: string, data: skus.ISkuUpdateOptions, options: HeaderOptions, response?: IResponseFn): Promise; update(skuId: string, data: skus.ISkuUpdateOptions, response?: IResponseFn): Promise; - + /** * Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first. */ @@ -6267,7 +6267,7 @@ declare namespace StripeNode { list(data: skus.ISkuListOptions, response?: IResponseFn>): Promise>; list(options: HeaderOptions, response?: IResponseFn>): Promise>; list(response?: IResponseFn>): Promise>; - + /** * Delete a SKU. Deleting a SKU is only possible until it has been used in an order. */ @@ -6275,24 +6275,24 @@ declare namespace StripeNode { del(skuId: string, response?: IResponseFn): Promise; } } - + interface IObject { object: string; } - + interface IResourceObject extends IObject { id: string; } - + interface IResponseFn { (err: IStripeError, value: R): void; } - + interface IDeleteConfirmation { id: string; deleted: boolean; } - + /** - * A filter on the list based on this object field. The value can - * be a string with an integer Unix timestamp, or it can be a + * A filter on the list based on this object field. The value can + * be a string with an integer Unix timestamp, or it can be a * dictionary with the following options: */ type IDateFilter = string | { @@ -6387,12 +6387,12 @@ declare namespace StripeNode { * Value is 'list' */ object: string; - + /** * An array containing the actual response elements, paginated by any request parameters. */ data: Array; - + /** * Whether or not there are more elements available after this set. If false, this set comprises the end of the list. */ @@ -6437,22 +6437,22 @@ declare namespace StripeNode { */ created?: string | IDateFilter; } - + interface IDataOptions { expand?: Array; include?: Array; } - + interface IDataOptionsWithMetadata extends IDataOptions { /** - * A set of key/value pairs that you can attach to an object. It can be - * useful for storing additional information about the object in a structured - * format. You can unset an individual key by setting its value to null and + * A set of key/value pairs that you can attach to an object. It can be + * useful for storing additional information about the object in a structured + * format. You can unset an individual key by setting its value to null and * then saving. To clear all keys, set metadata to null, then save. */ metadata?: IMetadata; } - + interface IHeaderOptions { /** * To safely retry an API request without accidentally performing the same operation twice, @@ -6464,18 +6464,18 @@ declare namespace StripeNode { * with different request parameters. The keys expire after 24 hours. */ idempotency_key?: string; - + stripe_account?: string; - + api_key?: string; } - + /** - * Header options can either be a Connect Account Secret Key, + * Header options can either be a Connect Account Secret Key, * or a hash with one or more of these keys: idempotency_key, stripe_account, api_key */ type HeaderOptions = IHeaderOptions | string; - + /** * Stripe uses conventional HTTP response codes to indicate success or failure of an API request. * In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that diff --git a/umzug/umzug.d.ts b/umzug/umzug.d.ts index c15b165b4a9dc2..c02beed19fc680 100644 --- a/umzug/umzug.d.ts +++ b/umzug/umzug.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module "umzug" {