Class: IqSMS::Response::Balance
Instance Attribute Summary
#hash, #original_response, #status
Instance Method Summary
collapse
#initialize
Instance Method Details
#balance ⇒ Object
8
9
10
11
|
# File 'lib/iqsms/response/balance.rb', line 8
def balance
@balance ||= balance_hash[:balance].to_s.to_d
@balance
end
|
#balance_hash ⇒ Object
4
5
6
|
# File 'lib/iqsms/response/balance.rb', line 4
def balance_hash
@hash[:balance].first
end
|
#credit ⇒ Object
17
18
19
20
|
# File 'lib/iqsms/response/balance.rb', line 17
def credit
@credit ||= balance_hash[:credit].to_s.to_d
@credit
end
|
#currency ⇒ Object
13
14
15
|
# File 'lib/iqsms/response/balance.rb', line 13
def currency
balance_hash[:type]
end
|