Skip to content

Commit

Permalink
interim checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
dipanjanb authored and sayan-rudder committed Sep 30, 2019
1 parent 908a501 commit 33b030a
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions rudder-client-javascript/RudderClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ class CheckoutStepCompletedEvent extends CheckoutEvent {
}



//Parent class for order and checkout events
class OrderEvent {

constructor(){
Expand Down Expand Up @@ -685,11 +685,17 @@ class CheckoutStartedEvent extends OrderEvent{
class OrderCompletedEvent extends OrderEvent {

event(){
return
return ECommerceEvents.ORDER_COMPLETED;
}

}

//Class representing order updated event
class OrderUpdatedEvent extends OrderEvent {
this.event(){
return ECommerceEvents.ORDER_UPDATED;
}
}

//Class representing payment info entered event
class PaymentInfoEnteredEvent {
Expand Down Expand Up @@ -1841,6 +1847,19 @@ client.track(new RudderElementBuilder().
setPaymentMethod("Dummy Checkout Payment Method 3")).
build().getPropertyMap()).
build());
*/

client.track(new RudderElementBuilder().
setEvent(ECommerceEvents.ORDER_UPDATED).
setProperty(new OrderUpdatedEvent().
setOrder(new ECommerceOrder().setOrderId("Dummy Order 4").
setAffiliation("Dummy Affiliation 2");
addProduct(new ECommerceProduct().setName("Dummy Product 5")).
addProduct(new ECommerceProduct().setName("Dummy Product 6"))).
build().getPropertyMap()).
build());

/*
Expand All @@ -1852,10 +1871,6 @@ client.track(new RudderElementBuilder().
addProduct(new ECommerceProduct().setName("Dummy Product 5"))).
build().getPropertyMap()).
build());
*/


/*
client.track(new RudderElementBuilder().
setEvent(ECommerceEvents.PRODUCT_ADDED_TO_WISHLIST).
Expand Down

0 comments on commit 33b030a

Please sign in to comment.