Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Value
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Value
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb
Overview
Value Model.
Instance Attribute Summary collapse
-
#group ⇒ String
TODO: Write general description for this method.
-
#is_variant ⇒ String
TODO: Write general description for this method.
-
#rank ⇒ String
TODO: Write general description for this method.
-
#source ⇒ String
TODO: Write general description for this method.
-
#value ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(value = nil, group = nil, source = nil, rank = nil, is_variant = nil) ⇒ Value
constructor
A new instance of Value.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(value = nil, group = nil, source = nil, rank = nil, is_variant = nil) ⇒ Value
Returns a new instance of Value.
54 55 56 57 58 59 60 61 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 54 def initialize(value = nil, group = nil, source = nil, rank = nil, is_variant = nil) @value = value @group = group @source = source @rank = rank @is_variant = is_variant end |
Instance Attribute Details
#group ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 19 def group @group end |
#is_variant ⇒ String
TODO: Write general description for this method
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 31 def is_variant @is_variant end |
#rank ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 27 def rank @rank end |
#source ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 23 def source @source end |
#value ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 15 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. value = hash.key?('value') ? hash['value'] : nil group = hash.key?('group') ? hash['group'] : nil source = hash.key?('source') ? hash['source'] : nil rank = hash.key?('rank') ? hash['rank'] : nil is_variant = hash.key?('isVariant') ? hash['isVariant'] : nil # Create object from extracted values. Value.new(value, group, source, rank, is_variant) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['value'] = 'value' @_hash['group'] = 'group' @_hash['source'] = 'source' @_hash['rank'] = 'rank' @_hash['is_variant'] = 'isVariant' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 45 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} value: #{@value.inspect}, group: #{@group.inspect}, source:"\ " #{@source.inspect}, rank: #{@rank.inspect}, is_variant: #{@is_variant.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/value.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} value: #{@value}, group: #{@group}, source: #{@source}, rank: #{@rank},"\ " is_variant: #{@is_variant}>" end |