Skip to content

Instantly share code, notes, and snippets.

@mbraga-sfdc
Created October 9, 2020 17:53
Show Gist options
  • Save mbraga-sfdc/c20026a257324cd752cf0935aab00e88 to your computer and use it in GitHub Desktop.
Save mbraga-sfdc/c20026a257324cd752cf0935aab00e88 to your computer and use it in GitHub Desktop.
/**
* Get list of all orders for the user
*
* type String json or xml
* pOSTDATA List Creates a new employee in DB (optional)
* returns List
**/
exports.typePost_orderPOST = function(type,pOSTDATA) {
return new Promise(function(resolve, reject) {
var examples = {};
examples['application/json'] = [ {
"Item Total Price" : 1998.0,
"Order Item ID" : 643,
"Order ID" : 298,
"Total Order Price" : 3996.0
}, {
"Item Total Price" : 1998.0,
"Order Item ID" : 643,
"Order ID" : 298,
"Total Order Price" : 3996.0
} ];
if (Object.keys(examples).length > 0) {
resolve(examples[Object.keys(examples)[0]]);
} else {
resolve();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment