mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #21785 from kkamperschroer/master
Stripe types add some missing expandable types
This commit is contained in:
Vendored
+7
-3
@@ -1,10 +1,11 @@
|
||||
// Type definitions for stripe 4.8
|
||||
// Type definitions for stripe 4.9
|
||||
// Project: https://github.com/stripe/stripe-node/
|
||||
// Definitions by: William Johnston <https://github.com/wjohnsto>
|
||||
// Peter Harris <https://github.com/codeanimal>
|
||||
// Sampson Oliver <https://github.com/sampsonjoliver>
|
||||
// Linus Unnebäck <https://github.com/LinusU>
|
||||
// Brannon Jones <https://github.com/brannon>
|
||||
// Kyle Kamperschroer <https://github.com/kkamperschroer>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -735,7 +736,7 @@ declare namespace Stripe {
|
||||
* The application fee (if any) for the charge. See the Connect documentation
|
||||
* for details. [Expandable]
|
||||
*/
|
||||
application_fee?: string;
|
||||
application_fee?: string | applicationFees.IApplicationFee;
|
||||
|
||||
/**
|
||||
* ID of the balance transaction that describes the impact of this charge on
|
||||
@@ -4258,7 +4259,10 @@ declare namespace Stripe {
|
||||
*/
|
||||
current_period_start: number;
|
||||
|
||||
customer: string;
|
||||
/**
|
||||
* ID of the customer who owns the subscription. [Expandable]
|
||||
*/
|
||||
customer: string | customers.ICustomer;
|
||||
|
||||
/**
|
||||
* Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a
|
||||
|
||||
@@ -82,9 +82,15 @@ stripe.charges.create({
|
||||
|
||||
stripe.charges.retrieve("ch_15fvyXEe31JkLCeQOo0SwFk9", function (err, charge) {
|
||||
// asynchronously called
|
||||
if (typeof charge.application_fee === "object") {
|
||||
charge.application_fee.amount;
|
||||
}
|
||||
});
|
||||
stripe.charges.retrieve("ch_15fvyXEe31JkLCeQOo0SwFk9").then(function (charge) {
|
||||
// asynchronously called
|
||||
if (typeof charge.application_fee === "object") {
|
||||
charge.application_fee.amount;
|
||||
}
|
||||
});
|
||||
|
||||
stripe.charges.update(
|
||||
@@ -1083,9 +1089,15 @@ stripe.subscriptions.create({ plan: "platypi-dev", customer: "cus_5rfJKDJkuxzh5Q
|
||||
|
||||
stripe.subscriptions.retrieve("sub_8QwCiwZ9tmMSpt", function(err, subscription) {
|
||||
// asynchronously called
|
||||
if (typeof subscription.customer === "object") {
|
||||
subscription.customer.email;
|
||||
}
|
||||
});
|
||||
stripe.subscriptions.retrieve("sub_8QwCiwZ9tmMSpt").then(function(subscription) {
|
||||
// asynchronously called
|
||||
if (typeof subscription.customer === "object") {
|
||||
subscription.customer.email;
|
||||
}
|
||||
});
|
||||
|
||||
stripe.subscriptions.update("sub_8QwCiwZ9tmMSpt", { plan: "platypi" }, function(err, subscription) {
|
||||
|
||||
Reference in New Issue
Block a user