Avatax_TaxService 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,50 @@
1
+ #Load the Avalara Address Service module
2
+ require 'avatax_taxservice'
3
+
4
+ #Create an tax service instance
5
+ username = 'USERNAME' #Your user account number or name here
6
+ password = 'PASSSWORD' #The password that was e-mailed to you here
7
+ name = 'Avalara Inc.'
8
+ clientname = 'MyShoppingCart'
9
+ adapter = 'Avatax SDK for Ruby 1.0.1'
10
+ machine = 'Lenovo W520 Windows 7'
11
+ TaxServ = AvaTax::TaxService.new(username,password,name,clientname,adapter,machine)
12
+
13
+
14
+ docid = "99999999"
15
+ companycode = 'APITrialCompany'
16
+ doctype = "SalesInvoice"
17
+ doccode = ""
18
+ detaillevel = "Line"
19
+ debug = false
20
+
21
+ tax_result = {}
22
+ #Call the gettax service
23
+ tax_result = TaxServ.gettaxhistory(docid,
24
+ companycode,
25
+ doctype,
26
+ doccode,
27
+ detaillevel,
28
+ debug)
29
+
30
+
31
+ require 'pp'
32
+ pp tax_result
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
@@ -0,0 +1,77 @@
1
+ #Load the Avalara Address Service module
2
+ require 'avatax_taxservice'
3
+
4
+ #Create an tax service instance
5
+ username = 'USERNAME' #Your user account number or name here
6
+ password = 'PASSWORD' #The password that was e-mailed to you here
7
+ name = 'Avalara Inc.'
8
+ clientname = 'MyShoppingCart'
9
+ adapter = 'Avatax SDK for Ruby 1.0.1'
10
+ machine = 'Lenovo W520 Windows 7'
11
+ TaxServ = AvaTax::TaxService.new(username,password,name,clientname,adapter,machine)
12
+
13
+ companycode = 'APITrialCompany'
14
+ lastdocid = "99999999"
15
+ reconciled = false
16
+ startdate = '2013-01-01'
17
+ enddate = "2013-10-15"
18
+ docstatus = "Any"
19
+ doctype = "SalesInvoice"
20
+ lastdoccode =""
21
+ pagesize ="1"
22
+ debug = true
23
+
24
+ tax_result = []
25
+ #Call the gettax service
26
+ tax_result = TaxServ.reconciletaxhistory(companycode,
27
+ lastdocid,
28
+ reconciled,
29
+ startdate,
30
+ enddate,
31
+ docstatus,
32
+ doctype,
33
+ lastdoccode,
34
+ pagesize,
35
+ debug)
36
+
37
+
38
+ require 'pp'
39
+ pp tax_result
40
+
41
+ #Calculate the number od docs returned
42
+ no_recs = tax_result.size - 2
43
+ puts no_recs
44
+
45
+ #Print out the document details
46
+ i = 0
47
+ while i <= no_recs
48
+ puts tax_result[:GetTaxResultDocId][i]
49
+ puts tax_result[:GetTaxResultDocType][i]
50
+ puts tax_result[:GetTaxResultDocDate][i]
51
+ puts tax_result[:GetTaxResultTotalAmount][i]
52
+ puts tax_result[:GetTaxResultTotalTax][i]
53
+ puts
54
+ i += 1
55
+ end
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Avatax_TaxService
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Graham S Wilson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.4.0
22
+ - - <
23
+ - !ruby/object:Gem::Version
24
+ version: '1.6'
25
+ type: :runtime
26
+ prerelease: false
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.4.0
33
+ - - <
34
+ - !ruby/object:Gem::Version
35
+ version: '1.6'
36
+ - !ruby/object:Gem::Dependency
37
+ name: savon
38
+ requirement: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.0
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: 2.3.0
52
+ description: Ruby SDK provides means of communication with Avatax Web Services.
53
+ email: support@Avalara.com
54
+ executables: []
55
+ extensions: []
56
+ extra_rdoc_files: []
57
+ files:
58
+ - lib/tax_log.txt
59
+ - lib/taxservice_dev.wsdl
60
+ - lib/taxservice_prd.wsdl
61
+ - lib/avatax_taxservice.rb
62
+ - lib/template_adjusttax.erb
63
+ - lib/template_canceltax.erb
64
+ - lib/template_committax.erb
65
+ - lib/template_gettax.erb
66
+ - lib/template_gettaxhistory.erb
67
+ - lib/template_isauthorized.erb
68
+ - lib/template_ping.erb
69
+ - lib/template_posttax.erb
70
+ - lib/template_reconciletaxhistory.erb
71
+ - lib/xpath_adjtax.txt
72
+ - lib/xpath_cancel.txt
73
+ - lib/xpath_commit.txt
74
+ - lib/xpath_gettax.txt
75
+ - lib/xpath_gettaxhistory.txt
76
+ - lib/xpath_isauthorized.txt
77
+ - lib/xpath_ping.txt
78
+ - lib/xpath_post.txt
79
+ - lib/xpath_reconciletaxhistory.txt
80
+ - test/test_adjtax.rb
81
+ - test/test_gettax.rb
82
+ - test/test_gettaxhistory.rb
83
+ - test/test_reconciletaxhistory.rb
84
+ - Avatax_TaxService.gemspec
85
+ - Avatax Ruby SDK Guide.docx
86
+ - LICENSE.txt
87
+ homepage: http://www.avalara.com/
88
+ licenses: []
89
+ post_install_message: Thanks for installing the Avalara AddressService Ruby SDK. Refer
90
+ to "Avatax Ruby SDK User Guide.docx" to get started.
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: 1.9.3
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubyforge_project:
108
+ rubygems_version: 1.8.24
109
+ signing_key:
110
+ specification_version: 3
111
+ summary: Ruby SDK for Avatax Web Services
112
+ test_files: []