Module: Mrkt::CrudActivities

Included in:
Client
Defined in:
lib/mrkt/concerns/crud_activities.rb

Instance Method Summary collapse

Instance Method Details

#get_activities(next_page_token, activity_type_ids: [], lead_ids: []) ⇒ Object


11
12
13
14
15
16
17
18
19
20
# File 'lib/mrkt/concerns/crud_activities.rb', line 11

def get_activities(next_page_token, activity_type_ids: [], lead_ids: [])
  params = {
    nextPageToken: next_page_token
  }

  params[:activityTypeIds] = activity_type_ids unless blank?(activity_type_ids)
  params[:leadIds] = lead_ids unless blank?(lead_ids)

  get('/rest/v1/activities.json', params)
end

#get_activity_typesObject


3
4
5
# File 'lib/mrkt/concerns/crud_activities.rb', line 3

def get_activity_types
  get('/rest/v1/activities/types.json')
end

#get_deleted_leads(next_page_token) ⇒ Object


22
23
24
# File 'lib/mrkt/concerns/crud_activities.rb', line 22

def get_deleted_leads(next_page_token)
  get('/rest/v1/activities/deletedleads.json', nextPageToken: next_page_token)
end

#get_paging_token(since_datetime) ⇒ Object


7
8
9
# File 'lib/mrkt/concerns/crud_activities.rb', line 7

def get_paging_token(since_datetime)
  get('/rest/v1/activities/pagingtoken.json', sinceDatetime: since_datetime.iso8601)
end