Class: VertexClient::Response::Quotation
- Inherits:
-
Base
- Object
- Base
- VertexClient::Response::Quotation
show all
- Defined in:
- lib/vertex_client/responses/quotation.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#line_items ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/vertex_client/responses/quotation.rb', line 17
def line_items
@line_items ||= normalized_line_items.map do |line_item|
LineItem.new(
product: product_for_line_item(line_item[:product]),
quantity: line_item[:quantity],
price: line_item[:extended_price],
total_tax: tax_for_line_item(line_item)
)
end
end
|
#subtotal ⇒ Object
5
6
7
|
# File 'lib/vertex_client/responses/quotation.rb', line 5
def subtotal
@subtotal ||= BigDecimal.new(@body[:sub_total])
end
|
#total ⇒ Object
13
14
15
|
# File 'lib/vertex_client/responses/quotation.rb', line 13
def total
@total ||= BigDecimal.new(@body[:total])
end
|
#total_tax ⇒ Object
9
10
11
|
# File 'lib/vertex_client/responses/quotation.rb', line 9
def total_tax
@total_tax ||= BigDecimal.new(@body[:total_tax])
end
|