Class: Moov::Models::Components::CreateTransferLineItem
- Inherits:
-
Object
- Object
- Moov::Models::Components::CreateTransferLineItem
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/createtransferlineitem.rb
Overview
Represents a single item in a transfer, including optional modifiers and quantity.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, base_price:, quantity:, options: nil, image_i_ds: nil, product_id: nil) ⇒ CreateTransferLineItem
constructor
A new instance of CreateTransferLineItem.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(name:, base_price:, quantity:, options: nil, image_i_ds: nil, product_id: nil) ⇒ CreateTransferLineItem
Returns a new instance of CreateTransferLineItem.
30 31 32 33 34 35 36 37 |
# File 'lib/moov/models/components/createtransferlineitem.rb', line 30 def initialize(name:, base_price:, quantity:, options: nil, image_i_ds: nil, product_id: nil) @name = name @base_price = base_price @quantity = quantity @options = @image_i_ds = image_i_ds @product_id = product_id end |
Instance Method Details
#==(other) ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/moov/models/components/createtransferlineitem.rb', line 40 def ==(other) return false unless other.is_a? self.class return false unless @name == other.name return false unless @base_price == other.base_price return false unless @quantity == other.quantity return false unless @options == other. return false unless @image_i_ds == other.image_i_ds return false unless @product_id == other.product_id true end |