Module: RockRMS::Client::LavaShortcode
- Included in:
- RockRMS::Client
- Defined in:
- lib/rock_rms/resources/lava_shortcode.rb
Instance Method Summary collapse
- #create_lava_shortcode(name:, description:, documentation:, active:, is_system:, markup:, enabled_lava_commands:, parameters:, tag_name:, tag_type:, foreign_key: nil) ⇒ Object
- #find_lava_shortcode(id) ⇒ Object
- #list_lava_shortcodes(options = {}) ⇒ Object
- #update_lava_shortcode(id, name: nil, description: nil, documentation: nil, active: nil, is_system: nil, markup: nil, enabled_lava_commands: nil, parameters: nil, tag_name: nil, tag_type: nil, foreign_key: nil) ⇒ Object
Instance Method Details
#create_lava_shortcode(name:, description:, documentation:, active:, is_system:, markup:, enabled_lava_commands:, parameters:, tag_name:, tag_type:, foreign_key: nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/rock_rms/resources/lava_shortcode.rb', line 14 def create_lava_shortcode( name:, description:, documentation:, active:, is_system:, markup:, enabled_lava_commands:, parameters:, tag_name:, tag_type:, foreign_key: nil ) = { 'Name' => name, 'Description' => description, 'Documentation' => documentation, 'IsActive' => active, 'IsSystem' => is_system, 'Markup' => markup, 'EnabledLavaCommands' => enabled_lava_commands, 'Parameters' => parameters, 'TagName' => tag_name, 'TagType' => tag_type, 'ForeignKey' => foreign_key } post(lava_shortcodes_path, ) end |
#find_lava_shortcode(id) ⇒ Object
9 10 11 12 |
# File 'lib/rock_rms/resources/lava_shortcode.rb', line 9 def find_lava_shortcode(id) res = get(lava_shortcodes_path(id)) Response::LavaShortcode.format(res) end |
#list_lava_shortcodes(options = {}) ⇒ Object
4 5 6 7 |
# File 'lib/rock_rms/resources/lava_shortcode.rb', line 4 def list_lava_shortcodes( = {}) res = get(lava_shortcodes_path, ) Response::LavaShortcode.format(res) end |
#update_lava_shortcode(id, name: nil, description: nil, documentation: nil, active: nil, is_system: nil, markup: nil, enabled_lava_commands: nil, parameters: nil, tag_name: nil, tag_type: nil, foreign_key: nil) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/rock_rms/resources/lava_shortcode.rb', line 44 def update_lava_shortcode( id, name: nil, description: nil, documentation: nil, active: nil, is_system: nil, markup: nil, enabled_lava_commands: nil, parameters: nil, tag_name: nil, tag_type: nil, foreign_key: nil ) = {} ['Name'] = name if name ['Description'] = description if description ['Documentation'] = documentation if documentation ['IsActive'] = active unless active.nil? ['IsSystem'] = is_system unless is_system.nil? ['Markup'] = markup if markup ['Parameters'] = parameters if parameters ['TagName'] = tag_name if tag_name ['TagType'] = tag_type if tag_type ['ForeignKey'] = foreign_key if foreign_key ['EnabledLavaCommands'] = enabled_lava_commands if enabled_lava_commands patch(lava_shortcodes_path(id), ) end |