class PagseguroV2::Item
Public Instance Methods
quantity()
click to toggle source
# File lib/pagseguro_v2/item.rb, line 22 def quantity self[:quantity].to_i end
to_xml(options = {})
click to toggle source
# File lib/pagseguro_v2/item.rb, line 10 def to_xml(options = {}) builder = options[:builder] || Builder::XmlMarkup.new() builder.item do |item| item.id id item.description description item.amount amount item.quantity quantity item.shippingCost shipping_cost if shipping_cost item.weight weight if weight end end
weight()
click to toggle source
# File lib/pagseguro_v2/item.rb, line 26 def weight self[:weight].to_i if self[:weight] end