Class: Moov::Models::Components::ProductRequest

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

Overview

Request to create or update a product.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(title:, base_price:, description: nil, images: nil, option_groups: nil) ⇒ ProductRequest

Returns a new instance of ProductRequest.



31
32
33
34
35
36
37
# File 'lib/moov/models/components/productrequest.rb', line 31

def initialize(title:, base_price:, description: nil, images: nil, option_groups: nil)
  @title = title
  @base_price = base_price
  @description = description
  @images = images
  @option_groups = option_groups
end

Instance Method Details

#==(other) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/moov/models/components/productrequest.rb', line 40

def ==(other)
  return false unless other.is_a? self.class
  return false unless @title == other.title
  return false unless @base_price == other.base_price
  return false unless @description == other.description
  return false unless @images == other.images
  return false unless @option_groups == other.option_groups
  true
end