Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/vertex_client/payloads/quotation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Payload
class Quotation < Base

SALE_TRANSACTION_TYPE = 'SALE'.freeze
ROUND_AT_LINE_LEVEL_BOOLEAN = true.freeze

def validate!
raise VertexClient::ValidationError.new('customer requires either state or country and postal_code') if customer_missing_location?
Expand All @@ -12,6 +13,7 @@ def validate!
def body
{}.tap do |data|
data[:'@transactionType'] = SALE_TRANSACTION_TYPE
date[:'@roundAtLineLevel'] = ROUND_AT_LINE_LEVEL_BOOLEAN
data[:'@isTaxOnlyAdjustmentIndicator'] = true if params[:tax_only_adjustment]
data[:'@deliveryTerm'] = params[:delivery_term] if params[:delivery_term]
data[:line_item] = params[:line_items].map.with_index do |line_item, index|
Expand Down