lib/russianpost/client.rb in russianpost-0.4.1 vs lib/russianpost/client.rb in russianpost-0.4.2

- old
+ new

@@ -16,10 +16,11 @@ end def call(opts = {barcode: nil}) message = { "wsdl:Barcode" => opts[:barcode], "wsdl:MessageType" => "0" } response = savon.call("OperationHistoryRequest", message: message) + result = response.to_hash[:operation_history_data][:history_record] - response.to_hash[:operation_history_data][:history_record] + result.kind_of?(Array) ? result : [result].compact end end end