Class: Simplepay::Support::SimpleAmount
- Inherits:
-
Object
- Object
- Simplepay::Support::SimpleAmount
- Defined in:
- lib/simplepay/support/simple_amount.rb
Overview
In new Amazon API requests the amount does not include the currency, SimpleAmount is used for this, for now.
At the present time, Amazon only uses USD.
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
Instance Method Summary collapse
-
#initialize(amount) ⇒ SimpleAmount
constructor
A new instance of SimpleAmount.
- #to_s ⇒ Object
Constructor Details
#initialize(amount) ⇒ SimpleAmount
Returns a new instance of SimpleAmount.
15 16 17 |
# File 'lib/simplepay/support/simple_amount.rb', line 15 def initialize(amount) self.amount = amount end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
13 14 15 |
# File 'lib/simplepay/support/simple_amount.rb', line 13 def amount @amount end |
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'lib/simplepay/support/simple_amount.rb', line 30 def to_s "#{'%0.2f' % amount}" end |