Class: InsalesApi::Order
Instance Method Summary
collapse
find_in_batches, find_updated_since
Methods inherited from Base
configure, dump_config, for_account, restore_config
#count
#find_each, #find_in_batches
Instance Method Details
#order_lines_attributes ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/insales_api/order.rb', line 7
def order_lines_attributes
@order_lines_attributes = order_lines.map do |order_line|
ol = order_line.as_json
ol = ol['order_line'] if ol['order_line']
ol
end
end
|
#paid? ⇒ Boolean
24
25
26
|
# File 'lib/insales_api/order.rb', line 24
def paid?
financial_status == 'paid'
end
|
#to_xml(options = {}) ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/insales_api/order.rb', line 16
def to_xml(options = {})
serialized_options = options.dup
if respond_to? :order_lines_attributes
serialized_options[:methods] = :order_lines_attributes
end
super(serialized_options)
end
|