Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import dateutil.parser
from zenpy.lib.objects.base_object import BaseObject
class Ticket(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self._via = None
self.updated_at = None
self.submitter_id = None
self.assignee_id = None
self.brand_id = None
self.id = None
self._custom_fields = None
self.subject = None
self.sharing_agreement_ids = None
self.collaborator_ids = None
self.priority = None
self._satisfaction_rating = None
self.type = None
self.status = None
from zenpy.lib.objects.base_object import BaseObject
class Source(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self._to = None
self._from_ = None
self.rel = None
for key, value in kwargs.items():
setattr(self, key, value)
@property
def from_(self):
if self.api and self._from_:
return self.api.get_from_(self._from_)
@from_.setter
def from_(self, from_):
from zenpy.lib.objects.base_object import BaseObject
class CcEvent(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self._via = None
self.type = None
self.id = None
self._recipients = None
for key, value in kwargs.items():
setattr(self, key, value)
@property
def via(self):
if self.api and self._via:
return self.api.get_via(self._via)
@via.setter
from zenpy.lib.objects.base_object import BaseObject
class FacebookCommentEvent(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self.body = None
self._attachments = None
self.type = None
self.public = None
self.graph_object_id = None
self.author_id = None
self._data = None
self.id = None
self.trusted = None
self.html_body = None
for key, value in kwargs.items():
setattr(self, key, value)
from zenpy.lib.objects.base_object import BaseObject
class Result(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self.count = None
self.facets = None
self.prev_page = None
self._results = None
self.next_page = None
for key, value in kwargs.items():
setattr(self, key, value)
@property
def results(self):
if self.api and self._results:
return self.api.get_results(self._results)
import dateutil.parser
from zenpy.lib.objects.base_object import BaseObject
class SuspendedTicket(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self._via = None
self._author = None
self.url = None
self.recipient = None
self.created_at = None
self.updated_at = None
self.content = None
self.brand_id = None
self.ticket_id = None
self.cause = None
self.id = None
self.subject = None
for key, value in kwargs.items():
from zenpy.lib.objects.base_object import BaseObject
class System(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self.latitude = None
self.client = None
self.ip_address = None
self.location = None
self.longitude = None
for key, value in kwargs.items():
setattr(self, key, value)
from zenpy.lib.objects.base_object import BaseObject
class OrganizationActivityEvent(BaseObject):
def __init__(self, api=None):
self.api = api
self.body = None
self.via = None
self.recipients = None
self.type = None
self.id = None
self.subject = None
from zenpy.lib.objects.base_object import BaseObject
class SatisfactionRatingEvent(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self.assignee_id = None
self.body = None
self.score = None
self.type = None
self.id = None
for key, value in kwargs.items():
setattr(self, key, value)
@property
def assignee(self):
if self.api and self.assignee_id:
return self.api.get_user(self.assignee_id)
from zenpy.lib.objects.base_object import BaseObject
class TicketEvent(BaseObject):
def __init__(self, api=None, **kwargs):
self.api = api
self.via = None
self._child_events = None
self.timestamp = None
self.ticket_id = None
self.id = None
self.updater_id = None
for key, value in kwargs.items():
setattr(self, key, value)
@property
def child_events(self):
if self.api and self._child_events:
return self.api.get_child_events(self._child_events)