lib/mrkt/concerns/crud_campaigns.rb in mrkt-0.9.0 vs lib/mrkt/concerns/crud_campaigns.rb in mrkt-0.10.0
- old
+ new
@@ -1,16 +1,14 @@
module Mrkt
module CrudCampaigns
def request_campaign(id, lead_ids, tokens = {})
- post("/rest/v1/campaigns/#{id}/trigger.json") do |req|
- params = {
+ post_json("/rest/v1/campaigns/#{id}/trigger.json") do
+ {
input: {
leads: map_lead_ids(lead_ids),
tokens: tokens
}
}
-
- json_payload(req, params)
end
end
end
end