Class: Moov::Models::Components::CreatePaymentLinkLineItem

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

Overview

Represents a single line item in a payment link, including optional modifiers and quantity.

Instance Method Summary collapse

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) ⇒ CreatePaymentLinkLineItem

Returns a new instance of CreatePaymentLinkLineItem.



34
35
36
37
38
39
40
41
# File 'lib/moov/models/components/createpaymentlinklineitem.rb', line 34

def initialize(name:, base_price:, quantity:, options: nil, image_i_ds: nil, product_id: nil)
  @name = name
  @base_price = base_price
  @quantity = quantity
  @options = options
  @image_i_ds = image_i_ds
  @product_id = product_id
end

Instance Method Details

#==(other) ⇒ Object



44
45
46
47
48
49
50
51
52
53
# File 'lib/moov/models/components/createpaymentlinklineitem.rb', line 44

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.options
  return false unless @image_i_ds == other.image_i_ds
  return false unless @product_id == other.product_id
  true
end