Class: PagseguroCatcher::Transaction::Item
- Defined in:
- lib/pagseguro_catcher/transaction/item.rb
Instance Attribute Summary
Attributes inherited from Body
Instance Method Summary collapse
- #amount ⇒ Object
- #id ⇒ Object
-
#initialize(body) ⇒ Item
constructor
A new instance of Item.
Methods inherited from Body
Constructor Details
#initialize(body) ⇒ Item
Returns a new instance of Item.
6 7 8 |
# File 'lib/pagseguro_catcher/transaction/item.rb', line 6 def initialize(body) self.body = body end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PagseguroCatcher::Transaction::Body
Instance Method Details
#amount ⇒ Object
14 15 16 |
# File 'lib/pagseguro_catcher/transaction/item.rb', line 14 def amount self[:amount].to_f end |
#id ⇒ Object
10 11 12 |
# File 'lib/pagseguro_catcher/transaction/item.rb', line 10 def id self[:id].to_i end |