Closed aprivette closed 8 years ago
Yes, I believe @julianh2o did add this. I'll look into the code
It appears you just create a new coupon the same way you would create a new item.
Thanks for your response - I actually tried that but it tells me that "addCoupon" is not a function.
can you show your code?
order.addCoupon( new pizzapi.Coupon( { code: 'CODE', quantity: 1 } ) );
are you using the dominos npm module or the pizzaapi module?
pizzapi
thats the problem :) its very out of date. I will take it out of the docs.
use the dominos api
Ok! Is there a way to prevent it from actually ordering pizza until I'm done testing?
use a bad card. I think there should also be another method but if not it is something we could probably add. or you could contribute it too. Either way.
Hahah. Sorry about that all! I've been meaning to come back to it and update it but just have been busy between work and other projects!
Thanks all! Great project, I can't wait to use it.
@madelinecameron it happens! Glad you are keeping busy!
Is there a way to use coupon codes in the API? I see there's some code for it in the repo and I also see that a menu request will return coupons, but I cant find a way to actually apply the codes to an order. An example would be very helpful. Thanks!