Created
April 26, 2018 14:58
-
-
Save jngnyc/b43ef0da9d691f9a834f6be459d29ff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.WebhookUtils = { | |
parseOrderStatus: function(ordersObj) { | |
var returnString = ""; | |
var orderNumber = ordersObj.orderNumber; | |
var orderStatus = ordersObj.orderStatus; | |
if ( (orderStatus) == "in_progress") { | |
returnString = "Your shipment " + orderNumber + " containing `shipment products` is being shipped by `carrier`. It is currently `status` and is estimated to arrive at `estimated_delivery_date"; | |
} | |
else if ( (orderStatus) == "available_for_pickup") { | |
returnString = "Your order is available for pickup"; | |
} | |
// rest of the parsing funtions... | |
return returnString; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment