12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- class OrderTicket(object):
- def __init__(self, serviceType, driverSearchEngine, comment, arrivalTime, additionalServices, tasks, spendingLimit, isWithPaymentDocument, id, isProceedBeforeArrival):
- self.serviceType = serviceType
- self.driverSearchEngine = driverSearchEngine
- self.comment = comment
- self.arrivalTime = arrivalTime
- self.additionalServices = additionalServices
- self.tasks = tasks
- self.spendingLimit = spendingLimit
- self.isWithPaymentDocument = isWithPaymentDocument
- self.id = id
- self.isProceedBeforeArrival = isProceedBeforeArrival
- #ticket json example
- '''
- {
- "id": 2,
- "status": 111,
- "created_date": "2023-05-15",
- "status_changed_date": "2023-05-15T17:16:22.955601Z",
- "priority": 0,
- "title": "Test",
- "note": "{\n \n \"ticket\": 1,\n \"state\": 1,\n \"id_metaservice\": 1,\n \"is_global\": false,\n \"is_visible\": false,\n \"service\": 1,\n \"service_type\": 1,\n\n \"time_placed\": 1}"
- "due_date": "2023-05-15",
- "task_list": 10,
- "created_by": 1,
- "type": 1,
- "assigned_to": 1
- }
- '''
- #ticket minimal example
- '''
- {
- "id": 2,
- "status": 111,
- "created_date": "2023-05-15",
- "status_changed_date": "2023-05-15T17:16:22.955601Z",
- "priority": 0,
- "title": null,
- "note": null,
- "due_date": null,
- "task_list": 10,
- "created_by": 1,
- "type": 1,
- "assigned_to": null
- }
- {
- "serviceType": 2,
- "driverSearchEngine": 0,
- "comment": "Yyyy",
- "arrivalTime": "2023-12-07T14:39:54Z",
- "additionalServices": [],
- "tasks": [
- {
- "text": "Eeee",
- "address": "Jjjj"
- }
- ],
- "spendingLimit": 6668,
- "isWithPaymentDocument": true,
- "id": 294830,
- "isProceedBeforeArrival": true
- }
- '''
- # class OrderTicketOLD(object):
- # def __init__(self, id, status, created_date, status_changed_date, priority, title=None, note=None, due_date=None, task_list=None, created_by=None, type=None, assigned_to=None):
- # self.id = id
- # self.status = status
- # self.created_date = created_date
- # self.status_changed_date = status_changed_date
- # self.priority = priority
- # self.title = title
- # self.note = note
- # self.due_date = due_date
- # self.task_list = task_list
- # self.created_by = created_by
- # self.type = type
- # self.assigned_to = assigned_to
- # def __str__(self):
- # return "{0}, {1}, {2}, {3}, {4}, {5}, {6},\n{7}, {8}, {9}, {10}, {11}\n".format(self.id, self.status, self.created_date, self.status_changed_date, self.priority, self.title, self.note, self.due_date, self.task_list, self.created_by, self.type, self.assigned_to)
|