Class: MokiRuby::Action
- Inherits:
-
Object
- Object
- MokiRuby::Action
- Defined in:
- lib/moki_ruby/action.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#client_name ⇒ Object
Returns the value of attribute client_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#item_name ⇒ Object
Returns the value of attribute item_name.
-
#last_seen ⇒ Object
Returns the value of attribute last_seen.
-
#note ⇒ Object
Returns the value of attribute note.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#status ⇒ Object
Returns the value of attribute status.
-
#third_party_user ⇒ Object
Returns the value of attribute third_party_user.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def action @action end |
#client_name ⇒ Object
Returns the value of attribute client_name.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def client_name @client_name end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def id @id end |
#item_name ⇒ Object
Returns the value of attribute item_name.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def item_name @item_name end |
#last_seen ⇒ Object
Returns the value of attribute last_seen.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def last_seen @last_seen end |
#note ⇒ Object
Returns the value of attribute note.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def note @note end |
#payload ⇒ Object
Returns the value of attribute payload.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def payload @payload end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def status @status end |
#third_party_user ⇒ Object
Returns the value of attribute third_party_user.
3 4 5 |
# File 'lib/moki_ruby/action.rb', line 3 def third_party_user @third_party_user end |
Class Method Details
.from_hash(input_hash) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/moki_ruby/action.rb', line 5 def self.from_hash(input_hash) new_action = self.new new_action.id = input_hash["id"] new_action.last_seen = input_hash["lastSeen"] new_action.action = input_hash["action"] new_action.status = input_hash["status"] new_action.client_name = input_hash["clientName"] new_action.item_name = input_hash["itemName"] new_action.third_party_user = input_hash["thirdPartyUser"] new_action.payload = input_hash["payload"] new_action.note = input_hash["note"] new_action end |
Instance Method Details
#to_hash ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/moki_ruby/action.rb', line 21 def to_hash { "id" => self.id, "lastSeen" => self.last_seen, "action" => self.action, "status" => self.status, "clientName" => self.client_name, "itemName" => self.item_name, "thirdPartyUser" => self.third_party_user, "payload" => self.payload, "note" => self.note } end |