Module: RockRMS::Client::DefinedValue
- Included in:
- RockRMS::Client
- Defined in:
- lib/rock_rms/resources/defined_value.rb
Instance Method Summary collapse
- #create_defined_value(defined_type_id:, value:, description:, order: nil, active: false) ⇒ Object
- #list_defined_values(options = {}) ⇒ Object
Instance Method Details
#create_defined_value(defined_type_id:, value:, description:, order: nil, active: false) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rock_rms/resources/defined_value.rb', line 10 def create_defined_value(defined_type_id:, value:, description:, order: nil, active: false) order ||= Random.rand(100..1000) = { 'Value' => value, 'Description' => description, 'Order' => order, 'IsSystem' => false, 'DefinedTypeId' => defined_type_id, 'IsActive' => active } post(defined_values_path, ) end |
#list_defined_values(options = {}) ⇒ Object
4 5 6 7 8 |
# File 'lib/rock_rms/resources/defined_value.rb', line 4 def list_defined_values( = {}) Response::DefinedValue.format( get(defined_values_path, ) ) end |