Class: RubyPaypalNvp::Model::Balance

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_paypal_nvp/model/balance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject

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_balanceObject

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

#subjectObject

Returns the value of attribute subject.



4
5
6
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 4

def subject
  @subject
end

#timestampObject

Returns the value of attribute timestamp.



4
5
6
# File 'lib/ruby_paypal_nvp/model/balance.rb', line 4

def timestamp
  @timestamp
end