Avatax_TaxService 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Avatax_TaxService.gemspec +7 -4
- data/lib/avatax_taxservice.rb +127 -225
- data/lib/template_gettax.erb +2 -2
- data/samples/CancelTax.rb +27 -0
- data/samples/GetTax.rb +118 -0
- data/samples/GetTaxHistory.rb +39 -0
- data/samples/Ping.rb +24 -0
- data/samples/PostTax.rb +34 -0
- data/samples/Validate.rb +37 -0
- data/samples/credentials.yml +5 -0
- data/spec/adjusttax_spec.rb +235 -0
- data/spec/canceltax_spec.rb +148 -0
- data/spec/committax_spec.rb +145 -0
- data/spec/gettax_spec.rb +281 -0
- data/spec/gettaxhistory_spec.rb +120 -0
- data/spec/isauthorized_spec.rb +75 -0
- data/spec/ping_spec.rb +75 -0
- data/spec/posttax_spec.rb +169 -0
- data/spec/reconciletaxhistory_spec.rb +125 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/taxservice_spec.rb +42 -0
- metadata +20 -6
- data/test/test_adjtax.rb +0 -127
- data/test/test_gettax.rb +0 -150
- data/test/test_gettaxhistory.rb +0 -55
- data/test/test_reconciletaxhistory.rb +0 -63
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2JhMDM0YTBiNmUwN2NhZGYzOTg4ZWFmOGNlYTJmODgyYWMwY2ExNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWE5MmQ5MDc4ODRjNzk4NzUyMzQyNzhhYzViOGJjZTZmNzdjMzc2OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGVhODZlZjQ3OTFkMWY2NzE5ZmI3OGQwMGJiYWE3M2NiMGYxOTllZjJhYjVj
|
10
|
+
NzdiYzU1NDUyZjkxNWRjZjMyYzFmYmVlNmM0NmFlZTgwMjE3YTdhMjMyNmI5
|
11
|
+
MjU3ZDBmN2U3NjJkOGQyOWYzZmFiYmIzNTIyMTdkNzA4OWUyZGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTBkZWVlNzU3ZmUwZDBjNjA4NDU5ZTQ0NmYyZWNmZmE5ZWY0NDAzYTE5YjA4
|
14
|
+
NmZkZDdiNDIxOWVlMjQwYTI0Mzg4OWE2OGRlOTdlNDc0YmJhNjA4ZTM5MThm
|
15
|
+
YzgyYTRhMGM2NjExZTExOTJhODRhYjJiZDhmYWQ5ZTAyNjIwNWU=
|
data/Avatax_TaxService.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "Avatax_TaxService"
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.12"
|
4
4
|
s.date = "2012-10-28"
|
5
5
|
s.author = "Graham S Wilson"
|
6
6
|
s.email = "support@Avalara.com"
|
@@ -11,10 +11,13 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = ["lib/tax_log.txt", "lib/taxservice_dev.wsdl", "lib/taxservice_prd.wsdl", "lib/avatax_taxservice.rb",
|
12
12
|
"lib/template_adjusttax.erb", "lib/template_canceltax.erb", "lib/template_committax.erb","lib/template_gettax.erb",
|
13
13
|
"lib/template_gettaxhistory.erb","lib/template_isauthorized.erb","lib/template_ping.erb","lib/template_posttax.erb",
|
14
|
-
"lib/template_reconciletaxhistory.erb",
|
15
|
-
"
|
14
|
+
"lib/template_reconciletaxhistory.erb",
|
15
|
+
"samples/CancelTax.rb","samples/credentials.yml","samples/GetTax.rb","samples/GetTaxHistory.rb","samples/Ping.rb","samples/PostTax.rb","samples/Validate.rb",
|
16
|
+
"spec/adjusttax_spec.rb","spec/canceltax_spec.rb","spec/committax_spec.rb","spec/gettax_spec.rb",
|
17
|
+
"spec/gettaxhistory_spec.rb","spec/isauthorized_spec.rb","spec/ping_spec.rb","spec/posttax_spec.rb","spec/reconciletaxhistory_spec.rb",
|
18
|
+
"spec/spec_helper.rb","spec/taxservice_spec.rb","Avatax_TaxService.gemspec","Avatax Ruby SDK Guide.docx", "LICENSE.txt"]
|
16
19
|
s.add_dependency "savon", ">= 2.3.0"
|
17
20
|
s.required_ruby_version = '>= 1.9.1'
|
18
|
-
s.post_install_message = 'Thanks for installing the Avalara
|
21
|
+
s.post_install_message = 'Thanks for installing the Avalara TaxService Ruby SDK. Refer to "Avatax Ruby SDK User Guide.docx" to get started.'
|
19
22
|
end
|
20
23
|
|
data/lib/avatax_taxservice.rb
CHANGED
@@ -17,6 +17,9 @@ module AvaTax
|
|
17
17
|
#Extract data from hash
|
18
18
|
username = credentials[:username]
|
19
19
|
password = credentials[:password]
|
20
|
+
if username.nil? and password.nil?
|
21
|
+
raise ArgumentError, "username and password are required"
|
22
|
+
end
|
20
23
|
name = credentials[:name]
|
21
24
|
clientname = credentials[:clientname]
|
22
25
|
adapter = credentials[:adapter]
|
@@ -120,12 +123,12 @@ module AvaTax
|
|
120
123
|
####################################################################################################
|
121
124
|
# ping - Verifies connectivity to the web service and returns version information about the service.
|
122
125
|
####################################################################################################
|
123
|
-
def ping(
|
126
|
+
def ping(message = nil)
|
124
127
|
|
125
128
|
@service = 'Ping'
|
126
129
|
|
127
|
-
|
128
|
-
|
130
|
+
#Read in the SOAP template
|
131
|
+
@message = message == nil ? "?" : message
|
129
132
|
|
130
133
|
# Subsitute real vales for template place holders
|
131
134
|
@soap = @template_ping.result(binding)
|
@@ -153,7 +156,7 @@ module AvaTax
|
|
153
156
|
end
|
154
157
|
|
155
158
|
#Strip off outer layer of the hash - not needed
|
156
|
-
@response = @response[:ping_response]
|
159
|
+
@response = @response[:ping_response][:ping_result]
|
157
160
|
|
158
161
|
return @response
|
159
162
|
|
@@ -170,29 +173,40 @@ module AvaTax
|
|
170
173
|
def gettax(document)
|
171
174
|
|
172
175
|
@service = 'GetTax'
|
173
|
-
|
174
|
-
#Extract data from document hash
|
175
|
-
xtract(document)
|
176
176
|
|
177
|
-
#
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
177
|
+
#create instance variables for each entry in input
|
178
|
+
document.each do |k,v|
|
179
|
+
instance_variable_set("@#{k}",v)
|
180
|
+
end
|
181
|
+
#set required default values for missing required inputs
|
182
|
+
@doctype ||= "SalesOrder"
|
183
|
+
@discount ||= "0"
|
184
|
+
@detaillevel ||= "Tax"
|
185
|
+
@commit ||= false
|
186
|
+
@servicemode ||= "Remote"
|
187
|
+
@paymentdate ||= "1900-01-01"
|
188
|
+
@exchangerate ||= "0"
|
189
|
+
@exchangerateeffdate ||= "1900-01-01"
|
190
|
+
@taxoverridetype ||= "None"
|
191
|
+
@taxamount ||= "0"
|
192
|
+
@taxdate ||= "1900-01-01"
|
193
|
+
|
194
|
+
#set required values for some fields
|
195
|
+
@hashcode = "0"
|
196
|
+
@batchcode = ""
|
197
|
+
|
198
|
+
|
199
|
+
#@addresses
|
200
|
+
@addresses.each do |addr|
|
201
|
+
addr[:taxregionid] ||= "0"
|
202
|
+
end
|
203
|
+
#@lines
|
204
|
+
@lines.each do |line|
|
205
|
+
line[:taxoverridetypeline] ||= "None"
|
206
|
+
line[:taxamountline] ||= "0"
|
207
|
+
line[:taxdateline] ||= "1900-01-01"
|
208
|
+
line[:discounted] ||= false
|
209
|
+
line[:taxincluded] ||= false
|
196
210
|
end
|
197
211
|
|
198
212
|
# Subsitute template place holders with real values
|
@@ -222,7 +236,7 @@ module AvaTax
|
|
222
236
|
end
|
223
237
|
|
224
238
|
#Strip off outer layer of the hash - not needed
|
225
|
-
@response = @response[:get_tax_response]
|
239
|
+
@response = @response[:get_tax_response][:get_tax_result]
|
226
240
|
|
227
241
|
#Return data to calling program
|
228
242
|
return @response
|
@@ -239,31 +253,44 @@ module AvaTax
|
|
239
253
|
def adjusttax(document)
|
240
254
|
|
241
255
|
@service = 'AdjustTax'
|
242
|
-
|
243
|
-
#Extract data from document hash
|
244
|
-
xtract(document)
|
245
256
|
|
246
|
-
#
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
257
|
+
#create instance variables for each entry in input
|
258
|
+
document.each do |k,v|
|
259
|
+
instance_variable_set("@#{k}",v)
|
260
|
+
end
|
261
|
+
#set required default values for missing required inputs
|
262
|
+
@doctype ||= "SalesOrder"
|
263
|
+
@discount ||= "0"
|
264
|
+
@detaillevel ||= "Tax"
|
265
|
+
@commit ||= false
|
266
|
+
@servicemode ||= "Remote"
|
267
|
+
@paymentdate ||= "1900-01-01"
|
268
|
+
@exchangerate ||= "0"
|
269
|
+
@exchangerateeffdate ||= "1900-01-01"
|
270
|
+
@taxoverridetype ||= "None"
|
271
|
+
@taxamount ||= "0"
|
272
|
+
@taxdate ||= "1900-01-01"
|
273
|
+
|
274
|
+
#set required values for some fields
|
275
|
+
@hashcode = "0"
|
276
|
+
@batchcode = ""
|
277
|
+
|
278
|
+
|
279
|
+
#@addresses
|
280
|
+
@addresses.each do |addr|
|
281
|
+
addr[:taxregionid] ||= "0"
|
282
|
+
end
|
283
|
+
#@lines
|
284
|
+
@lines.each do |line|
|
285
|
+
line[:taxoverridetypeline] ||= "None"
|
286
|
+
line[:taxamountline] ||= "0"
|
287
|
+
line[:taxdateline] ||= "1900-01-01"
|
288
|
+
line[:discounted] ||= false
|
289
|
+
line[:taxincluded] ||= false
|
265
290
|
end
|
266
291
|
|
292
|
+
|
293
|
+
|
267
294
|
# Subsitute template place holders with real values
|
268
295
|
@soap = @template_adjust.result(binding)
|
269
296
|
if @debug
|
@@ -290,10 +317,7 @@ module AvaTax
|
|
290
317
|
end
|
291
318
|
|
292
319
|
#Strip off outer layer of the hash - not needed
|
293
|
-
|
294
|
-
|
295
|
-
#Return data to calling program
|
296
|
-
return @response
|
320
|
+
return @response[:adjust_tax_response][:adjust_tax_result]
|
297
321
|
|
298
322
|
#Capture unexpected errors
|
299
323
|
rescue Savon::Error => error
|
@@ -309,9 +333,15 @@ module AvaTax
|
|
309
333
|
|
310
334
|
@service = 'PostTax'
|
311
335
|
|
312
|
-
#
|
313
|
-
|
314
|
-
|
336
|
+
#create instance variables for each entry in input
|
337
|
+
document.each do |k,v|
|
338
|
+
instance_variable_set("@#{k}",v)
|
339
|
+
end
|
340
|
+
#set required default values for missing required inputs
|
341
|
+
@hashcode = "0"
|
342
|
+
|
343
|
+
|
344
|
+
|
315
345
|
# Subsitute template place holders with real values
|
316
346
|
@soap = @template_post.result(binding)
|
317
347
|
if @debug
|
@@ -338,10 +368,8 @@ module AvaTax
|
|
338
368
|
end
|
339
369
|
|
340
370
|
#Strip off outer layer of the hash - not needed
|
341
|
-
@response = @response[:post_tax_response]
|
342
|
-
|
343
371
|
#Return data to calling program
|
344
|
-
return @response
|
372
|
+
return @response[:post_tax_response][:post_tax_result]
|
345
373
|
|
346
374
|
#Capture unexpected errors
|
347
375
|
rescue Savon::Error => error
|
@@ -357,8 +385,12 @@ module AvaTax
|
|
357
385
|
|
358
386
|
@service = 'CommitTax'
|
359
387
|
|
360
|
-
#
|
361
|
-
|
388
|
+
#create instance variables for each entry in input
|
389
|
+
document.each do |k,v|
|
390
|
+
instance_variable_set("@#{k}",v)
|
391
|
+
end
|
392
|
+
#set required default values for missing required inputs
|
393
|
+
#no required default values exist for committax
|
362
394
|
|
363
395
|
# Subsitute template place holders with real values
|
364
396
|
@soap = @template_commit.result(binding)
|
@@ -386,10 +418,8 @@ module AvaTax
|
|
386
418
|
end
|
387
419
|
|
388
420
|
#Strip off outer layer of the hash - not needed
|
389
|
-
@response = @response[:commit_tax_response]
|
390
|
-
|
391
421
|
#Return data to calling program
|
392
|
-
return @response
|
422
|
+
return @response[:commit_tax_response][:commit_tax_result]
|
393
423
|
|
394
424
|
#Capture unexpected errors
|
395
425
|
rescue Savon::Error => error
|
@@ -404,8 +434,12 @@ module AvaTax
|
|
404
434
|
|
405
435
|
@service = 'CancelTax'
|
406
436
|
|
407
|
-
#
|
408
|
-
|
437
|
+
#create instance variables for each entry in input
|
438
|
+
document.each do |k,v|
|
439
|
+
instance_variable_set("@#{k}",v)
|
440
|
+
end
|
441
|
+
#set required default values for missing required inputs
|
442
|
+
#no required default values exist for canceltax
|
409
443
|
|
410
444
|
# Subsitute template place holders with real values
|
411
445
|
@soap = @template_cancel.result(binding)
|
@@ -433,11 +467,8 @@ module AvaTax
|
|
433
467
|
end
|
434
468
|
|
435
469
|
#Strip off outer layer of the hash - not needed
|
436
|
-
|
437
|
-
|
438
|
-
#Return data to calling program
|
439
|
-
return @response
|
440
|
-
|
470
|
+
return @response[:cancel_tax_response][:cancel_tax_result]
|
471
|
+
|
441
472
|
#Capture unexpected errors
|
442
473
|
rescue Savon::Error => error
|
443
474
|
abend(error)
|
@@ -451,8 +482,12 @@ module AvaTax
|
|
451
482
|
|
452
483
|
@service = 'GetTaxHistory'
|
453
484
|
|
454
|
-
#
|
455
|
-
|
485
|
+
#create instance variables for each entry in input
|
486
|
+
document.each do |k,v|
|
487
|
+
instance_variable_set("@#{k}",v)
|
488
|
+
end
|
489
|
+
#set required default values for missing required inputs
|
490
|
+
@detaillevel ||= "Tax"
|
456
491
|
|
457
492
|
# Subsitute template place holders with real values
|
458
493
|
@soap = @template_gettaxhistory.result(binding)
|
@@ -480,10 +515,8 @@ module AvaTax
|
|
480
515
|
end
|
481
516
|
|
482
517
|
#Strip off outer layer of the hash - not needed
|
483
|
-
|
484
|
-
|
485
|
-
#Return data to calling program
|
486
|
-
return @response
|
518
|
+
return @response[:get_tax_history_response][:get_tax_history_result]
|
519
|
+
|
487
520
|
|
488
521
|
#Capture unexpected errors
|
489
522
|
rescue Savon::Error => error
|
@@ -499,8 +532,18 @@ module AvaTax
|
|
499
532
|
|
500
533
|
@service = 'ReconcileTaxHistory'
|
501
534
|
|
502
|
-
#
|
503
|
-
|
535
|
+
#create instance variables for each entry in input
|
536
|
+
document.each do |k,v|
|
537
|
+
instance_variable_set("@#{k}",v)
|
538
|
+
end
|
539
|
+
#set required default values for missing required inputs
|
540
|
+
@pagesize ||= "100"
|
541
|
+
@reconciled ||= false
|
542
|
+
@doctype ||= "SalesInvoice"
|
543
|
+
@docstatus ||= "Any"
|
544
|
+
@lastdoccode ||= ''
|
545
|
+
|
546
|
+
|
504
547
|
|
505
548
|
# Subsitute template place holders with real values
|
506
549
|
@soap = @template_reconciletaxhistory.result(binding)
|
@@ -528,11 +571,8 @@ module AvaTax
|
|
528
571
|
end
|
529
572
|
|
530
573
|
#Strip off outer layer of the hash - not needed
|
531
|
-
|
532
|
-
|
533
|
-
#Return data to calling program
|
534
|
-
return @response
|
535
|
-
|
574
|
+
return @response[:reconcile_tax_history_response][:reconcile_tax_history_result]
|
575
|
+
|
536
576
|
#Capture unexpected errors
|
537
577
|
rescue Savon::Error => error
|
538
578
|
abend(error)
|
@@ -546,8 +586,8 @@ module AvaTax
|
|
546
586
|
|
547
587
|
@service = 'IsAuthorized'
|
548
588
|
|
549
|
-
#
|
550
|
-
|
589
|
+
#Read in the SOAP template
|
590
|
+
@operation = operation == nil ? "?" : operation
|
551
591
|
|
552
592
|
# Subsitute real vales for template place holders
|
553
593
|
@soap = @template_isauthorized.result(binding)
|
@@ -561,9 +601,7 @@ module AvaTax
|
|
561
601
|
@response = @client.call(:is_authorized, xml: @soap).to_hash
|
562
602
|
|
563
603
|
#Strip off outer layer of the hash - not needed
|
564
|
-
|
565
|
-
|
566
|
-
return @response
|
604
|
+
return @response[:is_authorized_response][:is_authorized_result]
|
567
605
|
|
568
606
|
#Capture unexpected errors
|
569
607
|
rescue Savon::Error => error
|
@@ -572,142 +610,6 @@ module AvaTax
|
|
572
610
|
end
|
573
611
|
|
574
612
|
private
|
575
|
-
|
576
|
-
############################################################################################################
|
577
|
-
# valaddr - Validates an address using the Avatax Address Validation Service
|
578
|
-
############################################################################################################
|
579
|
-
def valaddr
|
580
|
-
@x = 0
|
581
|
-
@addresses.each do |addresscode,line1,line2,line3,city,region,postalcode,country,taxregionid,latitude,longitude,textcase,coordinates,taxability|
|
582
|
-
@log.puts "#{Time.now}: Calling Address Validation Service for Address #{line1}, #{line2}, #{line3}, #{city}, #{region}, #{postalcode}, #{country}"
|
583
|
-
#Call the address validation service
|
584
|
-
@val_addr = AddrService.validate(addresscode,line1,line2,line3,city,region,postalcode,country,taxregionid,latitude,longitude,textcase,coordinates,taxability)
|
585
|
-
#Update address details with the validated results
|
586
|
-
@val_addr.each do
|
587
|
-
@addresses[@x][0] = @val_addr[:AddressCode]
|
588
|
-
@addresses[@x][1] = @val_addr[:Line1]
|
589
|
-
@addresses[@x][2] = @val_addr[:Line2]
|
590
|
-
@addresses[@x][3] = @val_addr[:Line3]
|
591
|
-
@addresses[@x][4] = @val_addr[:City]
|
592
|
-
@addresses[@x][5] = @val_addr[:Region]
|
593
|
-
@addresses[@x][6] = @val_addr[:PostalCode]
|
594
|
-
@addresses[@x][7] = @val_addr[:Country]
|
595
|
-
@addresses[@x][8] = @val_addr[:TaxRegionId]
|
596
|
-
@addresses[@x][9] = @val_addr[:Latitude]
|
597
|
-
@addresses[@x][10] = @val_addr[:Longitude]
|
598
|
-
end
|
599
|
-
@x += @x
|
600
|
-
end
|
601
|
-
end
|
602
|
-
|
603
|
-
############################################################################################################
|
604
|
-
# xtract - Extract data from document hash
|
605
|
-
############################################################################################################
|
606
|
-
def xtract(document)
|
607
|
-
|
608
|
-
companycode = document[:companycode]
|
609
|
-
doctype = document[:doctype]
|
610
|
-
doccode = document[:doccode]
|
611
|
-
docdate = document[:docdate]
|
612
|
-
docid = document[:docid]
|
613
|
-
salespersoncode = document[:salespersoncode]
|
614
|
-
customercode = document[:customercode]
|
615
|
-
customerusagetype = document[:customerusagetype]
|
616
|
-
discount = document[:discount]
|
617
|
-
purchaseorderno = document[:purchaseorderno]
|
618
|
-
exemptionno = document[:exemptionno]
|
619
|
-
origincode = document[:origincode]
|
620
|
-
destinationcode = document[:destinationcode]
|
621
|
-
addresses = document[:addresses]
|
622
|
-
lines = document[:lines]
|
623
|
-
detaillevel = document[:detaillevel]
|
624
|
-
referencecode = document[:referencecode]
|
625
|
-
hashcode = document[:hashcode]
|
626
|
-
locationcode = document[:locationcode]
|
627
|
-
commit = document[:commit]
|
628
|
-
batchcode = document[:batchcode]
|
629
|
-
taxoverridetype = document[:taxoverridetype]
|
630
|
-
taxamount = document[:taxamount]
|
631
|
-
taxdate = document[:taxdate]
|
632
|
-
reason = document[:reason]
|
633
|
-
currencycode = document[:currencycode]
|
634
|
-
servicemode = document[:servicemode]
|
635
|
-
paymentdate = document[:paymentdate]
|
636
|
-
exchangerate = document[:exchangerate]
|
637
|
-
exchangerateeffdate = document[:exchangerateeffdate]
|
638
|
-
poslanecode = document[:poslanecode]
|
639
|
-
businessidentificationno = document[:businessidentificationno]
|
640
|
-
adjustmentreason = document[:adjustmentreason]
|
641
|
-
adjustmentdescription = document[:adjustmentdescription]
|
642
|
-
totalamount = document[:totalamount]
|
643
|
-
totaltax = document[:totaltax]
|
644
|
-
newdoccode = document[:newdoccode]
|
645
|
-
lastdocid = document[:lastdocid]
|
646
|
-
reconciled = document[:reconciled]
|
647
|
-
startdate = document[:startdate]
|
648
|
-
enddate = document[:enddate]
|
649
|
-
docstatus = document[:docstatus]
|
650
|
-
lastdoccode = document[:lastdoccode]
|
651
|
-
cancelcode = document[:cancelcode]
|
652
|
-
pagesize = document[:pagesize]
|
653
|
-
debug = document[:debug]
|
654
|
-
validate = document[:validate]
|
655
|
-
message = document[:message]
|
656
|
-
operation = document[:operation]
|
657
|
-
|
658
|
-
#Set parms passed by user - If Nil then default else use passed value
|
659
|
-
@companycode = companycode == nil ? "" : companycode
|
660
|
-
@doctype = doctype == nil ? "" : doctype
|
661
|
-
@doccode = doccode == nil ? "" : doccode
|
662
|
-
@docdate = docdate == nil ? "" : docdate
|
663
|
-
@docid = docid == nil ? "" : docid
|
664
|
-
@salespersoncode = salespersoncode == nil ? "" : salespersoncode
|
665
|
-
@customercode = customercode == nil ? "" : customercode
|
666
|
-
@customerusagetype = customerusagetype == nil ? "" : customerusagetype
|
667
|
-
@discount = discount == nil ? "" : discount
|
668
|
-
@purchaseorderno = purchaseorderno == nil ? "" : purchaseorderno
|
669
|
-
@exemptionno = exemptionno == nil ? "" : exemptionno
|
670
|
-
@origincode = origincode == nil ? "" : origincode
|
671
|
-
@destinationcode = destinationcode == nil ? "" : destinationcode
|
672
|
-
@addresses = addresses == nil ? "" : addresses
|
673
|
-
@lines = lines == nil ? "" : lines
|
674
|
-
@detaillevel = detaillevel == nil ? "" : detaillevel
|
675
|
-
@referencecode = referencecode == nil ? "" : referencecode
|
676
|
-
@hashcode = hashcode == nil ? "" : hashcode
|
677
|
-
@locationcode = locationcode == nil ? "" : locationcode
|
678
|
-
@commit = commit == nil ? "" : commit
|
679
|
-
@batchcode = batchcode == nil ? "" : batchcode
|
680
|
-
@taxoverridetype = taxoverridetype == nil ? "" : taxoverridetype
|
681
|
-
@taxamount = taxamount == nil ? "" : taxamount
|
682
|
-
@taxdate = taxdate == nil ? "" : taxdate
|
683
|
-
@reason = reason == nil ? "" : reason
|
684
|
-
@currencycode = currencycode == nil ? "" : currencycode
|
685
|
-
@servicemode = servicemode == nil ? "" : servicemode
|
686
|
-
@paymentdate = paymentdate == nil ? "" : paymentdate
|
687
|
-
@exchangerate = exchangerate == nil ? "" : exchangerate
|
688
|
-
@exchangerateeffdate = exchangerateeffdate == nil ? "" : exchangerateeffdate
|
689
|
-
@poslanecode = poslanecode == nil ? "" : poslanecode
|
690
|
-
@businessidentificationno = businessidentificationno == nil ? "" : businessidentificationno
|
691
|
-
@validate = validate == nil ? false : validate
|
692
|
-
@adjustmentreason = adjustmentreason == nil ? "" : adjustmentreason
|
693
|
-
@adjustmentdescription = adjustmentdescription == nil ? "" : adjustmentdescription
|
694
|
-
@totalamount = totalamount == nil ? "" : totalamount
|
695
|
-
@totaltax = totaltax == nil ? "" : totaltax
|
696
|
-
@newdoccode = newdoccode == nil ? "" : newdoccode
|
697
|
-
@cancelcode = cancelcode == nil ? "" : cancelcode
|
698
|
-
@detaillevel = detaillevel == nil ? "" : detaillevel
|
699
|
-
@lastdocid = lastdocid == nil ? "" : lastdocid
|
700
|
-
@reconciled = reconciled == nil ? "" : reconciled
|
701
|
-
@startdate = startdate == nil ? "" : startdate
|
702
|
-
@enddate = enddate == nil ? "" : enddate
|
703
|
-
@docstatus = docstatus == nil ? "" : docstatus
|
704
|
-
@lastdoccode = lastdoccode == nil ? "" : lastdoccode
|
705
|
-
@pagesize = pagesize == nil ? "" : pagesize
|
706
|
-
@debug = debug == nil ? false : debug
|
707
|
-
@ping_message = message
|
708
|
-
@operation = operation
|
709
|
-
|
710
|
-
end
|
711
613
|
|
712
614
|
############################################################################################################
|
713
615
|
# abend - Unexpected error handling
|