Class: Moov::Models::Components::ProductCategory
- Inherits:
-
Object
- Object
- Moov::Models::Components::ProductCategory
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/productcategory.rb
Overview
A product category from the product taxonomy.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(category_id:, name:, full_name:, level:, parent_id: nil) ⇒ ProductCategory
constructor
A new instance of ProductCategory.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(category_id:, name:, full_name:, level:, parent_id: nil) ⇒ ProductCategory
Returns a new instance of ProductCategory.
27 28 29 30 31 32 33 |
# File 'lib/moov/models/components/productcategory.rb', line 27 def initialize(category_id:, name:, full_name:, level:, parent_id: nil) @category_id = category_id @name = name @full_name = full_name @level = level @parent_id = parent_id end |
Instance Method Details
#==(other) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/moov/models/components/productcategory.rb', line 36 def ==(other) return false unless other.is_a? self.class return false unless @category_id == other.category_id return false unless @name == other.name return false unless @full_name == other.full_name return false unless @level == other.level return false unless @parent_id == other.parent_id true end |