Class: Qiwi::Request::GetBillList
Instance Method Summary collapse
-
#initialize(client, hash) ⇒ GetBillList
constructor
A new instance of GetBillList.
- #result_from_xml(xml) ⇒ Object
Methods inherited from Base
attributes, #body, inherited, #method, #soap_body, #with_envelope
Constructor Details
#initialize(client, hash) ⇒ GetBillList
Returns a new instance of GetBillList.
129 130 131 132 133 |
# File 'lib/qiwi/request.rb', line 129 def initialize(client, hash) super @dateFrom = hash[:date_from].strftime('%d.%m.%Y %H:%M:%S') if hash[:date_from] @dateTo = hash[:date_to].strftime('%d.%m.%Y %H:%M:%S') if hash[:date_to] end |
Instance Method Details
#result_from_xml(xml) ⇒ Object
135 136 137 138 139 140 141 |
# File 'lib/qiwi/request.rb', line 135 def result_from_xml(xml) el = xml.xpath("//getBillListResponse") OpenStruct.new({ txns: el.at('txns').text, count: el.at('count').text.to_i }) end |