Sha256: 51d17b822006a7c67840207354e44f3716e1306d819403f323c5b68673d0c64a

Contents?: true

Size: 674 Bytes

Versions: 10

Compression:

Stored size: 674 Bytes

Contents

module Mrkt
  module CrudLists
    def get_leads_by_list(list_id, fields: nil, batch_size: nil, next_page_token: nil)
      optional = {
        fields: fields,
        batchSize: batch_size,
        nextPageToken: next_page_token
      }

      get("/rest/v1/list/#{list_id}/leads.json", {}, optional)
    end

    def add_leads_to_list(list_id, lead_ids)
      post_json("/rest/v1/lists/#{list_id}/leads.json") do
        { input: map_lead_ids(lead_ids) }
      end
    end

    def remove_leads_from_list(list_id, lead_ids)
      delete("/rest/v1/lists/#{list_id}/leads.json") do |req|
        json_payload(req, input: map_lead_ids(lead_ids))
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mrkt-1.2.2 lib/mrkt/concerns/crud_lists.rb
mrkt-1.2.1 lib/mrkt/concerns/crud_lists.rb
mrkt-1.2.0 lib/mrkt/concerns/crud_lists.rb
mrkt-1.1.1 lib/mrkt/concerns/crud_lists.rb
mrkt-1.1.0 lib/mrkt/concerns/crud_lists.rb
mrkt-1.0.1 lib/mrkt/concerns/crud_lists.rb
mrkt-1.0.0 lib/mrkt/concerns/crud_lists.rb
mrkt-0.11.1 lib/mrkt/concerns/crud_lists.rb
mrkt-0.11.0 lib/mrkt/concerns/crud_lists.rb
mrkt-0.10.0 lib/mrkt/concerns/crud_lists.rb