Class: VaucharAPI::DealRedemption
- Defined in:
- lib/vauchar_api/resources/deal_redemption.rb
Overview
Examples
Create
new_list = VaucharAPI::List.new(name: "max list", brand_id: "brn-15507182295c6e1515a956a")
new_list.save
Read
list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
redemptions = VaucharAPI::DealRedemption.all
Update
list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
list.name = "Max update"
list.save
Delete
list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
list.destroy
Customers
list = VaucharAPI::List.find("list-15502036875c663b27600fe")
list.get(:customers);
Add Customers
list = VaucharAPI::List.find("list-15502036875c663b27600fe")
list.post(:customers, {}, {customers: ["cust-15508280955c6fc23f7f807", "cust-15507323535c6e4c416c697"]}.to_json)
Delete Customers
list = VaucharAPI::List.find("list-15502036875c663b27600fe")
list.delete(:customers, {}, {customers: ["cust-15508280955c6fc23f7f807", "cust-15507323535c6e4c416c697"]})
Find By Brand
lists = VaucharAPI::List.find(:all, params: {brand_id: "brn-15507182295c6e1515a956a"})
Method Summary
Methods inherited from Base
#accepts_attributes, #encode, init_prefix, init_prefix_explicit, password, user