mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
[stripe] Add get/setRequestTelemetry and setAppInfo (#36665)
* chore: add name to stripe contributors * feat(stripe): add get/setTelemetryEnabled * feat(stripe): add setAppInfo * test(stripe): add assertions for types
This commit is contained in:
committed by
Armando Aguirre
parent
d83339fdaa
commit
893d9e0111
Vendored
+4
@@ -25,6 +25,7 @@
|
||||
// Joshua Feltimo <https://github.com/opticalgenesis>
|
||||
// Josiah <https://github.com/spacetag>
|
||||
// Oleg Vaskevich <https://github.com/vaskevich>
|
||||
// Dylan Aspden <https://github.com/dhaspden>
|
||||
// Ethan Setnik <https://github.com/esetnik>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
@@ -101,11 +102,14 @@ declare class Stripe {
|
||||
setPort(port: string | number): void;
|
||||
setApiVersion(version?: string): void;
|
||||
setApiKey(key?: string): void;
|
||||
setAppInfo(info?: { partner_id?: string; name: string; url?: string; version?: string }): void;
|
||||
setTimeout(timeout?: number): void;
|
||||
setMaxNetworkRetries(maxNetworkRetries: number): void;
|
||||
setTelemetryEnabled(enabled: boolean): void;
|
||||
setHttpAgent(agent: string): void;
|
||||
getConstant(c: string): any;
|
||||
getMaxNetworkRetries(): number;
|
||||
getTelemetryEnabled(): boolean;
|
||||
getClientUserAgent(response: (userAgent: string) => void): void;
|
||||
}
|
||||
export = Stripe;
|
||||
|
||||
@@ -5,6 +5,15 @@ const stripe = new Stripe("sk_test_BF573NobVn98OiIsPAv7A04K");
|
||||
|
||||
stripe.setApiVersion('2019-05-16');
|
||||
|
||||
stripe.setAppInfo(); // $ExpectType void
|
||||
// $ExpectType void
|
||||
stripe.setAppInfo({
|
||||
name: 'DefinitelyTyped',
|
||||
});
|
||||
|
||||
stripe.setTelemetryEnabled(true); // $ExpectType void
|
||||
stripe.getTelemetryEnabled(); // $ExpectType boolean
|
||||
|
||||
// generic list tests
|
||||
// ##################################################################################
|
||||
stripe.balance.listTransactions().then(items => {
|
||||
|
||||
Reference in New Issue
Block a user