[amplitude-js] Give access to Identify and Revenue classes through AmplitudeClient. (#36313)

This commit is contained in:
Pascal Corpet 2019-06-26 20:10:34 +02:00 committed by Benjamin Lichtman
parent bd40cfc005
commit e7615ef16b
2 changed files with 6 additions and 0 deletions

View File

@ -107,6 +107,9 @@ module Amplitude.Tests {
revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99).setEventProperties({ 'city': 'San Francisco' });
revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99).setQuantity(5);
revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99).setRevenueType('purchase');
identify = new client.Identify()
revenue = new client.Revenue()
}
}

View File

@ -104,6 +104,9 @@ export class AmplitudeClient {
logRevenueV2(revenue_obj: Revenue): LogReturn;
logRevenue(pric: number, quantity: number, product: string): LogReturn;
logEventWithTimestamp(event: string, data?: any, timestamp?: number, callback?: Callback): LogReturn;
Identify: typeof Identify
Revenue: typeof Revenue
}
// Proxy methods that get executed on the default AmplitudeClient instance (not all client methods are proxied)