Class: PagSeguro::Item
- Inherits:
-
Object
- Object
- PagSeguro::Item
- Includes:
- Extensions::MassAssignment
- Defined in:
- lib/pagseguro/item.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Set the amount per unit.
-
#description ⇒ Object
Set the product description.
-
#id ⇒ Object
Set the product identifier, such as SKU.
-
#quantity ⇒ Object
Set the quantity.
-
#shipping_cost ⇒ Object
Set the shipping cost per unit.
-
#weight ⇒ Object
Set the weight per unit, in grams.
Instance Method Summary collapse
Methods included from Extensions::MassAssignment
Instance Attribute Details
#amount ⇒ Object
Set the amount per unit.
16 17 18 |
# File 'lib/pagseguro/item.rb', line 16 def amount @amount end |
#description ⇒ Object
Set the product description.
9 10 11 |
# File 'lib/pagseguro/item.rb', line 9 def description @description end |
#id ⇒ Object
Set the product identifier, such as SKU.
6 7 8 |
# File 'lib/pagseguro/item.rb', line 6 def id @id end |
#quantity ⇒ Object
Set the quantity. Defaults to 1.
13 14 15 |
# File 'lib/pagseguro/item.rb', line 13 def quantity @quantity end |
#shipping_cost ⇒ Object
Set the shipping cost per unit.
22 23 24 |
# File 'lib/pagseguro/item.rb', line 22 def shipping_cost @shipping_cost end |
#weight ⇒ Object
Set the weight per unit, in grams.
19 20 21 |
# File 'lib/pagseguro/item.rb', line 19 def weight @weight end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 |
# File 'lib/pagseguro/item.rb', line 24 def ==(other) [id, description, amount] == [other.id, other.description, other.amount] end |