lib/kashflow_api/models/receipt.rb in kashflow_api-0.1.0 vs lib/kashflow_api/models/receipt.rb in kashflow_api-0.1.1
- old
+ new
@@ -11,10 +11,10 @@
def self.build_arguments(action, object, field, argument)
if action == "get"
expects argument, String
return "<ReceiptNumber>#{argument}</ReceiptNumber>" if object == "receipt"
elsif action == "update" || action == "insert"
- expects argument, KashflowApi::Receipt
+ expects argument, [KashflowApi::Receipt, KashflowApi::Line]
return "<ReceiptID>#{argument.receiptid}</ReceiptID><InvLine>#{argument.to_xml}</InvLine>" if field == "Line"
return "<ReceiptNumber>#{argument.invoicenumber}</ReceiptNumber><InvLine>#{argument.to_xml}</InvLine>" if field == "Number"
return "<Inv>#{argument.to_xml}</Inv>" if object == "receipt"
end
end
\ No newline at end of file