Class: WixAnswers::Models::Ticket
- Inherits:
-
Base
- Object
- Base
- WixAnswers::Models::Ticket
show all
- Defined in:
- lib/wixanswers/models/ticket/ticket.rb
Instance Attribute Summary
Attributes inherited from Base
#attrs
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#method_missing, #validate!, #validate_schema!
Constructor Details
#initialize(attrs = {}) ⇒ Ticket
Returns a new instance of Ticket.
53
54
55
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 53
def initialize(attrs={})
super(attrs)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class WixAnswers::Models::Base
Class Method Details
.from_payload(payload) ⇒ Object
Instance Method Details
#all_cc_users ⇒ Object
93
94
95
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 93
def all_cc_users
@_all_cc_users ||= (self.attrs[:allCcUsers] || []).map {|attrs| User.new(attrs)}
end
|
#assigned_by ⇒ Object
77
78
79
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 77
def assigned_by
@_assigned_by ||= User.new(self.attrs[:assignedBy] || {})
end
|
#assigned_group ⇒ Object
89
90
91
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 89
def assigned_group
@_assigned_group ||= Group.new(self.attrs[:assignedGroup] || {})
end
|
#assigned_user ⇒ Object
85
86
87
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 85
def assigned_user
@_assigned_user ||= Agent.new(self.attrs[:assignedUser] || {})
end
|
#attachments ⇒ Object
57
58
59
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 57
def attachments
@_attachments ||= (self.attrs[:attachments] || []).map {|attrs| Attachment.new(attrs)}
end
|
#created_by_agent ⇒ Object
81
82
83
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 81
def created_by_agent
@_created_by_agent ||= User.new(self.attrs[:createdByAgent] || {})
end
|
#labels ⇒ Object
69
70
71
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 69
def labels
@_labels ||= (self.attrs[:labels] || []).map {|attrs| Label.new(attrs)}
end
|
#last_reply ⇒ Object
73
74
75
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 73
def last_reply
@_last_reply ||= Reply.new(self.attrs[:lastReply] || {})
end
|
#user ⇒ Object
65
66
67
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 65
def user
@_user ||= User.new(self.attrs[:user] || {})
end
|
#user_info ⇒ Object
61
62
63
|
# File 'lib/wixanswers/models/ticket/ticket.rb', line 61
def user_info
@_user_info ||= UserInfo.new(self.attrs[:userInfo] || {})
end
|