Class: Mio::Model::MessageTemplate
- Inherits:
-
Mio::Model
- Object
- Mio::Model
- Mio::Model::MessageTemplate
- Defined in:
- lib/mio/model/message_template.rb
Instance Attribute Summary
Attributes inherited from Mio::Model
Instance Method Summary collapse
Methods inherited from Mio::Model
#configure, #create, field, #initialize, mappings, nested, #set_enable, set_resource, #set_start, #validate
Constructor Details
This class inherits a constructor from Mio::Model
Instance Method Details
#create_hash ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/mio/model/message_template.rb', line 15 def create_hash {name: @args.name, visibilityIds: @args.visibility, subject: @args.subject, priority: @args.priority } end |
#go ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mio/model/message_template.rb', line 23 def go @object = look_up unless @object @object = create else set_start :stop end template_path = "#{self.class.resource_name}/#{@object['id']}/body" @client.template template_path, @args.template set_enable return @object end |