Class: NewStoreApi::RoutingInsightsRoutingStrategies
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::RoutingInsightsRoutingStrategies
- Defined in:
- lib/new_store_api/models/routing_insights_routing_strategies.rb
Overview
RoutingInsightsRoutingStrategies Model.
Instance Attribute Summary collapse
-
#current ⇒ Hash[String, RoutingInsightsRoutingStrategy1]
The routing strategy for each item id in this LO.
-
#original ⇒ Hash[String, RoutingInsightsRoutingStrategy1]
The routing strategy for each item id in this LO.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(current = SKIP, original = SKIP) ⇒ RoutingInsightsRoutingStrategies
constructor
A new instance of RoutingInsightsRoutingStrategies.
-
#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(current = SKIP, original = SKIP) ⇒ RoutingInsightsRoutingStrategies
Returns a new instance of RoutingInsightsRoutingStrategies.
41 42 43 44 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 41 def initialize(current = SKIP, original = SKIP) @current = current unless current == SKIP @original = original unless original == SKIP end |
Instance Attribute Details
#current ⇒ Hash[String, RoutingInsightsRoutingStrategy1]
The routing strategy for each item id in this LO
14 15 16 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 14 def current @current end |
#original ⇒ Hash[String, RoutingInsightsRoutingStrategy1]
The routing strategy for each item id in this LO
18 19 20 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 18 def original @original end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 47 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. current = RoutingInsightsRoutingStrategy1.from_hash(hash['current']) if hash['current'] current = SKIP unless hash.key?('current') original = RoutingInsightsRoutingStrategy1.from_hash(hash['original']) if hash['original'] original = SKIP unless hash.key?('original') # Create object from extracted values. RoutingInsightsRoutingStrategies.new(current, original) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['current'] = 'current' @_hash['original'] = 'original' @_hash end |
.nullables ⇒ Object
An array for nullable fields
37 38 39 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 37 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 34 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 29 def self.optionals %w[ current original ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
65 66 67 68 69 70 71 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 65 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
80 81 82 83 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 80 def inspect class_name = self.class.name.split('::').last "<#{class_name} current: #{@current.inspect}, original: #{@original.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
74 75 76 77 |
# File 'lib/new_store_api/models/routing_insights_routing_strategies.rb', line 74 def to_s class_name = self.class.name.split('::').last "<#{class_name} current: #{@current}, original: #{@original}>" end |