Class: ApiReference::EditDimensionalPriceGroup
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::EditDimensionalPriceGroup
- Defined in:
- lib/api_reference/models/edit_dimensional_price_group.rb
Overview
EditDimensionalPriceGroup Model.
Instance Attribute Summary collapse
-
#external_dimensional_price_group_id ⇒ String
An optional user-defined ID for this dimensional price group resource, used throughout the system as an alias for this dimensional price group.
-
#metadata ⇒ Hash[String, String]
User-specified key/value pairs for the resource.
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(metadata: SKIP, external_dimensional_price_group_id: SKIP) ⇒ EditDimensionalPriceGroup
constructor
A new instance of EditDimensionalPriceGroup.
-
#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(metadata: SKIP, external_dimensional_price_group_id: SKIP) ⇒ EditDimensionalPriceGroup
Returns a new instance of EditDimensionalPriceGroup.
50 51 52 53 54 55 56 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 50 def initialize(metadata: SKIP, external_dimensional_price_group_id: SKIP) @metadata = unless == SKIP unless external_dimensional_price_group_id == SKIP @external_dimensional_price_group_id = external_dimensional_price_group_id end end |
Instance Attribute Details
#external_dimensional_price_group_id ⇒ String
An optional user-defined ID for this dimensional price group resource, used throughout the system as an alias for this dimensional price group. Use this field to identify a dimensional price group by an existing identifier in your system.
23 24 25 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 23 def external_dimensional_price_group_id @external_dimensional_price_group_id end |
#metadata ⇒ Hash[String, String]
User-specified key/value pairs for the resource. Individual keys can be
removed by setting the value to null, and the entire metadata mapping
can be cleared by setting metadata to null.
16 17 18 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 16 def @metadata end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('metadata') ? hash['metadata'] : SKIP external_dimensional_price_group_id = hash.key?('external_dimensional_price_group_id') ? hash['external_dimensional_price_group_id'] : SKIP # Create object from extracted values. EditDimensionalPriceGroup.new(metadata: , external_dimensional_price_group_id: external_dimensional_price_group_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['metadata'] = 'metadata' @_hash['external_dimensional_price_group_id'] = 'external_dimensional_price_group_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 48 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 43 def self.nullables %w[ metadata external_dimensional_price_group_id ] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 35 def self.optionals %w[ metadata external_dimensional_price_group_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
80 81 82 83 84 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 80 def inspect class_name = self.class.name.split('::').last "<#{class_name} metadata: #{@metadata.inspect}, external_dimensional_price_group_id:"\ " #{@external_dimensional_price_group_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
73 74 75 76 77 |
# File 'lib/api_reference/models/edit_dimensional_price_group.rb', line 73 def to_s class_name = self.class.name.split('::').last "<#{class_name} metadata: #{@metadata}, external_dimensional_price_group_id:"\ " #{@external_dimensional_price_group_id}>" end |