lib/economic/cash_book.rb in rconomic-0.4.1 vs lib/economic/cash_book.rb in rconomic-0.5.0

- old
+ new

@@ -16,24 +16,22 @@ CashBookEntryProxy.new(self) end # Books all entries in the cashbook. Returns book result. def book - response = session.request(soap_action(:book)) do - soap.body = { "cashBookHandle" => handle.to_hash } - end + response = request(:book, { + "cashBookHandle" => handle.to_hash + }) response[:number].to_i end protected def build_soap_data - data = ActiveSupport::OrderedHash.new - - data['Handle'] = handle.to_hash - data['Name'] = name - data['Number'] = number - - return data + { + 'Handle' => handle.to_hash, + 'Name' => name, + 'Number' => number + } end end end