Class: ItemBuilder::Modes::Quantity::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/item_builder/modes/quantity/base.rb

Direct Known Subclasses

LazadaService, ZaloraService, ZilingoService

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(listing, available_quantity, local_qty) ⇒ Base

Returns a new instance of Base.



11
12
13
14
15
16
17
# File 'lib/item_builder/modes/quantity/base.rb', line 11

def initialize(listing, available_quantity, local_qty)
  raise 'listing is not set' if listing.nil?

  @listing = listing
  @available_quantity = available_quantity
  @local_qty = local_qty
end

Instance Attribute Details

#available_quantityObject (readonly)

Returns the value of attribute available_quantity.



8
9
10
# File 'lib/item_builder/modes/quantity/base.rb', line 8

def available_quantity
  @available_quantity
end

#listingObject (readonly)

Returns the value of attribute listing.



7
8
9
# File 'lib/item_builder/modes/quantity/base.rb', line 7

def listing
  @listing
end

#local_qtyObject (readonly)

Returns the value of attribute local_qty.



9
10
11
# File 'lib/item_builder/modes/quantity/base.rb', line 9

def local_qty
  @local_qty
end