class Economic::Order
Public Instance Methods
attention()
click to toggle source
# File lib/economic/order.rb, line 24 def attention return nil if attention_handle.nil? @attention ||= session.contacts.find(attention_handle) end
attention=(contact)
click to toggle source
# File lib/economic/order.rb, line 29 def attention=(contact) self.attention_handle = contact.handle @attention = contact end
attention_handle=(handle)
click to toggle source
# File lib/economic/order.rb, line 34 def attention_handle=(handle) @attention = nil unless handle == @attention_handle @attention_handle = handle end
cancel_sent_status()
click to toggle source
# File lib/economic/order.rb, line 39 def cancel_sent_status request(:cancel_sent_status, "orderHandle" => handle.to_hash) end
debtor()
click to toggle source
# File lib/economic/order.rb, line 43 def debtor return nil if debtor_handle.nil? @debtor ||= session.debtors.find(debtor_handle) end
debtor=(debtor)
click to toggle source
# File lib/economic/order.rb, line 48 def debtor=(debtor) self.debtor_handle = debtor.handle @debtor = debtor end
debtor_handle=(handle)
click to toggle source
# File lib/economic/order.rb, line 53 def debtor_handle=(handle) @debtor = nil unless handle == @debtor_handle @debtor_handle = handle end
order_lines()
click to toggle source
# File lib/economic/order.rb, line 58 def order_lines OrderLineProxy.new(self).find_by_order(handle.to_hash) end
pdf()
click to toggle source
Returns the PDF version of Invoice
as a String.
To get it as a file you can do:
File.open("invoice.pdf", 'wb') do |file| file << invoice.pdf end
# File lib/economic/order.rb, line 69 def pdf response = request(:get_pdf, "orderHandle" => handle.to_hash) Base64.decode64(response) end
register_as_sent()
click to toggle source
# File lib/economic/order.rb, line 75 def register_as_sent request(:register_as_sent, "orderHandle" => handle.to_hash) end