mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Stripe types added expandable application fee to charge and expandable customer to subscription
This commit is contained in:
Vendored
+6
-2
@@ -5,6 +5,7 @@
|
||||
// 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