Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's test adding @roundAtLineLevel=true to Vertex via SOAP #77

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Loading