mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #21244 from lauvigne/master
types/stripe add amount body in stripe.charges.capture
This commit is contained in:
Vendored
+11
-2
@@ -975,6 +975,16 @@ declare namespace Stripe {
|
||||
statement_descriptor?: string;
|
||||
}
|
||||
|
||||
interface IChargeCaptureOptions 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
|
||||
* currency).
|
||||
*/
|
||||
amount?: number;
|
||||
}
|
||||
|
||||
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.
|
||||
@@ -4785,8 +4795,7 @@ declare namespace Stripe {
|
||||
* you created a charge with the capture option set to false. Uncaptured payments expire exactly seven days after they are
|
||||
* created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
|
||||
*/
|
||||
capture(id: string, options: HeaderOptions, response?: IResponseFn<charges.ICharge>): Promise<charges.ICharge>;
|
||||
capture(id: string, response?: IResponseFn<charges.ICharge>): Promise<charges.ICharge>;
|
||||
capture(id: string, data?: charges.IChargeCaptureOptions, options?: HeaderOptions, response?: IResponseFn<charges.ICharge>): Promise<charges.ICharge>;
|
||||
|
||||
/**
|
||||
* Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges
|
||||
|
||||
@@ -105,7 +105,16 @@ stripe.charges.update(
|
||||
// asynchronously called
|
||||
});
|
||||
|
||||
stripe.charges.capture("ch_15fvyXEe31JkLCeQOo0SwFk9", function (err, charge) {
|
||||
stripe.charges.capture("ch_15fvyXEe31JkLCeQOo0SwFk9", {amount: 1}, {}, function (err, charge) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.charges.capture("ch_15fvyXEe31JkLCeQOo0SwFk9", {amount: 1}, {}).then( function (charge) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.charges.capture("ch_15fvyXEe31JkLCeQOo0SwFk9", {}, {},function (err, charge) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.charges.capture("ch_15fvyXEe31JkLCeQOo0SwFk9", {}).then( function (charge) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.charges.capture("ch_15fvyXEe31JkLCeQOo0SwFk9").then( function (charge) {
|
||||
|
||||
Reference in New Issue
Block a user