Class: RubyPaypalNvp::Model::Balance
- Inherits:
-
Object
- Object
- RubyPaypalNvp::Model::Balance
- Defined in:
- lib/ruby_paypal_nvp/model/balance.rb
Instance Attribute Summary collapse
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#opening_balance ⇒ Object
Returns the value of attribute opening_balance.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(result) ⇒ Balance
constructor
A new instance of Balance.
Constructor Details
#initialize(result) ⇒ Balance
Returns a new instance of Balance.
6 7 8 9 10 11 |
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 6 def initialize(result) @currency_code = result[:meta]['currency_code'] @subject = result[:meta]['subject'] @timestamp = result[:meta]['timestamp'] @opening_balance = result[:values]['L_AMT'].to_f end |
Instance Attribute Details
#currency_code ⇒ Object
Returns the value of attribute currency_code.
4 5 6 |
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 4 def currency_code @currency_code end |
#opening_balance ⇒ Object
Returns the value of attribute opening_balance.
4 5 6 |
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 4 def opening_balance @opening_balance end |
#subject ⇒ Object
Returns the value of attribute subject.
4 5 6 |
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 4 def subject @subject end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 4 def @timestamp end |