Class: Paymill::Fee
- Inherits:
-
Object
- Object
- Paymill::Fee
- Defined in:
- lib/paymill/models/fee.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#application ⇒ Object
Returns the value of attribute application.
-
#billed_at ⇒ Object
Returns the value of attribute billed_at.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ Fee
constructor
A new instance of Fee.
Constructor Details
#initialize(json) ⇒ Fee
Returns a new instance of Fee.
6 7 8 9 10 11 |
# File 'lib/paymill/models/fee.rb', line 6 def initialize( json ) json.each_pair do |key, value| instance_variable_set( "@#{key}", ( Integer( value ) rescue value ) ) end @billed_at &&= Time.at( @billed_at ) end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
4 5 6 |
# File 'lib/paymill/models/fee.rb', line 4 def amount @amount end |
#application ⇒ Object
Returns the value of attribute application.
4 5 6 |
# File 'lib/paymill/models/fee.rb', line 4 def application @application end |
#billed_at ⇒ Object
Returns the value of attribute billed_at.
4 5 6 |
# File 'lib/paymill/models/fee.rb', line 4 def billed_at @billed_at end |
#currency ⇒ Object
Returns the value of attribute currency.
4 5 6 |
# File 'lib/paymill/models/fee.rb', line 4 def currency @currency end |
#payment ⇒ Object
Returns the value of attribute payment.
4 5 6 |
# File 'lib/paymill/models/fee.rb', line 4 def payment @payment end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/paymill/models/fee.rb', line 4 def type @type end |