Sha256: 3541e022f0e2672e385a0f8155e790f458f1c082b56827762c1a840a2148eca6
Contents?: true
Size: 410 Bytes
Versions: 10
Compression:
Stored size: 410 Bytes
Contents
module Mrkt module CrudHelpers def map_lead_ids(lead_ids) lead_ids.map { |id| { id: id } } end def post_json(url) post(url) do |req| payload = block_given? ? yield(req) : {} json_payload(req, payload) end end def json_payload(req, payload) req.headers[:content_type] = 'application/json' req.body = JSON.generate(payload) end end end
Version data entries
10 entries across 10 versions & 1 rubygems