Class: Qiwi::Request::CheckBill
Instance Method Summary collapse
Methods inherited from Base
attributes, #body, inherited, #initialize, #method, #soap_body, #with_envelope
Constructor Details
This class inherits a constructor from Qiwi::Request::Base
Instance Method Details
#result_from_xml(xml) ⇒ Object
106 107 108 109 110 111 112 113 114 115 |
# File 'lib/qiwi/request.rb', line 106 def result_from_xml(xml) el = xml.xpath("//checkBillResponse") OpenStruct.new({ user: el.at('user').text, amount: el.at('amount').text.to_f, date: el.at('date').text, lifetime: el.at('lifetime').text, status: el.at('status').text.to_i }) end |