Class: PagseguroCatcher::Transaction::Amount
- Inherits:
-
Body
- Object
- Body
- PagseguroCatcher::Transaction::Amount
show all
- Defined in:
- lib/pagseguro_catcher/transaction/amount.rb
Instance Attribute Summary
Attributes inherited from Body
#body
Instance Method Summary
collapse
Methods inherited from Body
#[], #method_missing
Constructor Details
#initialize(body) ⇒ Amount
Returns a new instance of Amount.
6
7
8
|
# File 'lib/pagseguro_catcher/transaction/amount.rb', line 6
def initialize(body)
self.body = body
end
|
Instance Method Details
#discount ⇒ Object
14
15
16
|
# File 'lib/pagseguro_catcher/transaction/amount.rb', line 14
def discount
self[:discountAmount].to_f
end
|
26
27
28
|
# File 'lib/pagseguro_catcher/transaction/amount.rb', line 26
def
self[:extraAmount].to_f
end
|
#fee ⇒ Object
18
19
20
|
# File 'lib/pagseguro_catcher/transaction/amount.rb', line 18
def fee
self[:feeAmount].to_f
end
|
#gross ⇒ Object
10
11
12
|
# File 'lib/pagseguro_catcher/transaction/amount.rb', line 10
def gross
self[:grossAmount].to_f
end
|
#net ⇒ Object
22
23
24
|
# File 'lib/pagseguro_catcher/transaction/amount.rb', line 22
def net
self[:netAmount].to_f
end
|