Skip to content

Commit

Permalink
feat: add data property bag to track order
Browse files Browse the repository at this point in the history
  • Loading branch information
mzanoni committed Mar 4, 2024
1 parent 6259eaa commit bc66aad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/client/src/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export class Tracker extends RelewiseClient {
super(datasetId, apiKey, options);
}


public async trackOrder({ user, subtotal, orderNumber, lineItems, cartName = 'default', trackingNumber }: {
public async trackOrder({ user, subtotal, orderNumber, lineItems, cartName = 'default', trackingNumber, data }: {
user: User,
subtotal: { currency: string, amount: number },
orderNumber: string,
/** @deprecated Use orderNumber instead. */
trackingNumber?: string,
lineItems: { productId: string, variantId?: string, lineTotal: number, quantity: number, data?: Record<string, DataValue> }[],
data?: Record<string, DataValue>,
cartName?: string
}, options?: RelewiseRequestOptions): Promise<void | undefined> {
return this.request<TrackOrderRequest, void>('TrackOrderRequest', {
Expand All @@ -36,6 +36,7 @@ export class Tracker extends RelewiseClient {
orderNumber: orderNumber,
trackingNumber: trackingNumber,
cartName: cartName,
data: data,
user: user,
},
}, options);
Expand Down

0 comments on commit bc66aad

Please sign in to comment.