Module: Smslist::Client::Balance
- Included in:
- Smslist::Client
- Defined in:
- lib/smslist/client/balance.rb
Instance Method Summary collapse
-
#balance ⇒ Float
Get account balance.
-
#remaining_sms ⇒ Integer
Get remaining sms count.
Instance Method Details
#balance ⇒ Float
Get account balance
10 11 12 13 |
# File 'lib/smslist/client/balance.rb', line 10 def balance response = parse_xml(post build_xml_body.to_xml, :balance) response.xpath('response/money').text.to_f end |
#remaining_sms ⇒ Integer
Get remaining sms count
21 22 23 24 |
# File 'lib/smslist/client/balance.rb', line 21 def remaining_sms response = parse_xml(post build_xml_body.to_xml, :balance) response.xpath('response/sms').first.text.to_i end |