Module: Paypal::Ipn::Item

Defined in:
lib/paypal/ipn/variables/item.rb

Instance Method Summary collapse

Instance Method Details

#item_name(index = nil) ⇒ Object



4
5
6
# File 'lib/paypal/ipn/variables/item.rb', line 4

def item_name(index = nil)
  item_attribute_value("item_name", index)
end

#item_number(index = nil) ⇒ Object



12
13
14
# File 'lib/paypal/ipn/variables/item.rb', line 12

def item_number(index = nil)
  item_attribute_value("item_number", index).to_s
end

#item_quantity(index = nil) ⇒ Object



8
9
10
# File 'lib/paypal/ipn/variables/item.rb', line 8

def item_quantity(index = nil)
  item_attribute_value("quantity", index).to_i
end

#number_of_cart_itemsObject



16
17
18
19
# File 'lib/paypal/ipn/variables/item.rb', line 16

def number_of_cart_items
  num_cart_items = params["num_cart_items"] || 1
  num_cart_items.to_i
end