terraform-provider-dominos
terraform-provider-dominos copied to clipboard
Support for coupon codes
Coupons list: https://www.dominos.com/en/pages/order/#!/section/Coupons/category/All/
Example coupon:
Its URL: https://www.dominos.com/en/pages/order/#!/order/coupons/new?code=5152&qty=1
Coupon price $9.99 vs $17.99 standard price is a big deal. To me - it's order or no order!
Please add support for coupons - if possible. Searching for coupons using data resources would be cool but the minimum viable solution is being able to provide coupon code (e.g. 5152).
I dont know Go but i was able to hardcode the Coupons string in resource_order.go
with this and rebuild to support it.
"Coupons": []map[string]interface{}{map[string]interface{}{"Code": "8682","Qty": "1","ID": "3"}},
Also, shout out to Store #4336 in DC for canceling my duplicated orders!
shout out to Store #4336 in DC for canceling my duplicated orders!
Next goal: backend implementation for terraform destroy
? :laughing: :laughing: :laughing:
Oh yeah, I can definitely add a coupon data source, and throw coupons into the order validator. The errors you get out if the coupons are not valid are frankly incomprehensible, and it's not obvious that it's possible to implement coupon validation, though.