-
-
Save rsheldiii/439edf2e489a158f0871 to your computer and use it in GitHub Desktop.
eror
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
var pizzapi=require('dominos'); | |
var thePresident = new pizzapi.Customer( | |
{ | |
firstName: 'first', | |
lastName: 'last', | |
address: 'address', | |
email: 'email' | |
} | |
); | |
var order = new pizzapi.Order( | |
{ | |
customer: thePresident, | |
storeID: id, | |
deliveryMethod: 'Delivery' | |
} | |
); | |
//order.addItem( | |
// new pizzapi.Item( | |
// { | |
// code: 'F_SBBRD', | |
// quantity: 1 | |
// } | |
// ) | |
//); | |
order.addItem( | |
new pizzapi.Item( | |
{ | |
code: 'P12IPAZA', | |
options: ['P', 'M'], | |
quantity: 1 | |
} | |
) | |
); | |
console.log(pizzapi) | |
order.addCoupon( | |
new pizzapi.Coupon( | |
{ | |
code: 9204, | |
quantity: 1 | |
} | |
) | |
); | |
order.validate( | |
function(result) { | |
console.log(result) | |
console.log(result.result); | |
console.log("We did it!"); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using the menu object to locate your item and see what the items object looks like. Paste it here and maybe I can help