Class: Moov::Models::Components::ProductOptionGroup

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/productoptiongroup.rb

Overview

Represents a group of product configuration options, such as size or color.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(name:, min_select:, max_select:, options:, description: nil) ⇒ ProductOptionGroup

Returns a new instance of ProductOptionGroup.



33
34
35
36
37
38
39
# File 'lib/moov/models/components/productoptiongroup.rb', line 33

def initialize(name:, min_select:, max_select:, options:, description: nil)
  @name = name
  @min_select = min_select
  @max_select = max_select
  @options = options
  @description = description
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
45
46
47
48
49
50
# File 'lib/moov/models/components/productoptiongroup.rb', line 42

def ==(other)
  return false unless other.is_a? self.class
  return false unless @name == other.name
  return false unless @min_select == other.min_select
  return false unless @max_select == other.max_select
  return false unless @options == other.options
  return false unless @description == other.description
  true
end