Class: NewStoreApi::UpdateTagRequest
- Defined in:
- lib/new_store_api/models/update_tag_request.rb
Overview
UpdateTagRequest Model.
Instance Attribute Summary collapse
-
#display_name ⇒ String
The human readable tag identifier.
-
#store_ids ⇒ Array[String]
A list of store IDs the tag belongs to.
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(display_name = SKIP, store_ids = SKIP) ⇒ UpdateTagRequest
constructor
A new instance of UpdateTagRequest.
-
#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(display_name = SKIP, store_ids = SKIP) ⇒ UpdateTagRequest
Returns a new instance of UpdateTagRequest.
42 43 44 45 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 42 def initialize(display_name = SKIP, store_ids = SKIP) @display_name = display_name unless display_name == SKIP @store_ids = store_ids unless store_ids == SKIP end |
Instance Attribute Details
#display_name ⇒ String
The human readable tag identifier.
14 15 16 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 14 def display_name @display_name end |
#store_ids ⇒ Array[String]
A list of store IDs the tag belongs to. If no store ID is provided, then the tag is global and will be visible for all the stores.
19 20 21 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 19 def store_ids @store_ids end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. display_name = hash.key?('display_name') ? hash['display_name'] : SKIP store_ids = hash.key?('store_ids') ? hash['store_ids'] : SKIP # Create object from extracted values. UpdateTagRequest.new(display_name, store_ids) end |
.names ⇒ Object
A mapping from model property names to API property names.
22 23 24 25 26 27 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['display_name'] = 'display_name' @_hash['store_ids'] = 'store_ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
38 39 40 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 38 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
30 31 32 33 34 35 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 30 def self.optionals %w[ display_name store_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
67 68 69 70 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 67 def inspect class_name = self.class.name.split('::').last "<#{class_name} display_name: #{@display_name.inspect}, store_ids: #{@store_ids.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
61 62 63 64 |
# File 'lib/new_store_api/models/update_tag_request.rb', line 61 def to_s class_name = self.class.name.split('::').last "<#{class_name} display_name: #{@display_name}, store_ids: #{@store_ids}>" end |