def get_activities(self, **kwargs): fields = kwargs.pop('fields', None) if fields: kwargs['_fields'] = ','.join(fields) return paginate( self._api.activity.get, **kwargs)
def get_leads(self, query=None, fields=None): args = {} if query: args['query'] = query if fields: args['_fields'] = ','.join(fields) return paginate( self._api.lead.get, **args)
def get_tasks(self, **kwargs): kwargs = convert(kwargs) kwargs.update({ k: 'true' if v else 'false' for k, v in kwargs.items() if isinstance(v, bool) }) kwargs.setdefault('_order_by', '-date_created') return paginate( self._api.task.get, **kwargs )
def get_opportunity_statuss(self): return paginate(self._api.status.opportunity.get)
def get_email_templates(self): return paginate( self._api.email_template.get )
def get_opportunities(self): return paginate( self._api.opportunity.get, )
def get_activity_note(self, lead_id): return paginate( self._api.activity.note.get, lead_id=lead_id, )
def get_activity_call(self, lead_id): return paginate( self._api.activity.call.get, lead_id=lead_id, )
def get_activity_email(self, lead_id): return paginate( self._api.activity.email.get, lead_id=lead_id, )
def get_lead_statuss(self): return paginate(self._api.status.lead.get)