Class: KashflowApi::Quote
- Inherits:
-
Invoice
- Object
- SoapObject
- Invoice
- KashflowApi::Quote
- Defined in:
- lib/kashflow_api/models/quote.rb
Constant Summary collapse
- KFObject =
{singular: "quote", plural: "quotes"}
Constants inherited from Invoice
Invoice::Finds, Invoice::Keys, Invoice::XMLKey
Instance Attribute Summary
Attributes inherited from SoapObject
Class Method Summary collapse
Methods inherited from Invoice
Methods inherited from SoapObject
all, define_methods, find, find_method, inherited, #initialize, #to_xml
Constructor Details
This class inherits a constructor from KashflowApi::SoapObject
Class Method Details
.build_arguments(action, object, field, argument) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/kashflow_api/models/quote.rb', line 6 def self.build_arguments(action, object, field, argument) if action == "get" expects argument, String return "<Quote#{field}>#{argument}</Quote#{field}>" if object == "quote" elsif action == "update" || action == "insert" expects argument, KashflowApi::Quote return "<InvoiceID>#{argument.invoiceid}</InvoiceID><InvLine>#{argument.to_xml}</InvLine>" if field == "Line" return "<InvoiceNumber>#{argument.invoicenumber}</InvoiceNumber><InvLine>#{argument.to_xml}</InvLine>" if field == "Number" return "<Inv>#{argument.to_xml}</Inv>" if object == "quote" end end |