suretax 0.1.9 → 0.2.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/suretax/api/request_item.rb +32 -2
- data/lib/suretax/configuration.rb +1 -1
- data/lib/suretax/version.rb +1 -1
- data/spec/lib/suretax/api/request_item_spec.rb +16 -1
- data/spec/lib/suretax/configuration_spec.rb +6 -1
- data/spec/support/request_helper.rb +16 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db246ae1db930ab0822bd5d2d2c51ddd088a350e
|
4
|
+
data.tar.gz: b543ce85b99c9ce845dc1cf65b18a263c4cd2bcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a105bc4b6c23ffb53d55a1d31a40e6daea9b05f61f7e1fb1a5b5e8db12e63c0a60f5bb922b34e9c63f56f4a29ed774e8c2ccbee1fa228d50834a6d0e309c82ca
|
7
|
+
data.tar.gz: 044fdfd4ba8f5187063c3db4314580361bf240c502f354c7f980a6371061ed88fd0caea9a5527f9065f5c205f30c9d3041ece0ed5fa17d53fabec26b78e5ad10
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
suretax (0.1
|
4
|
+
suretax (0.2.0.beta.1)
|
5
5
|
excon
|
6
6
|
monetize
|
7
7
|
money (~> 6.5.1)
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
diff-lcs (1.2.5)
|
18
18
|
docile (1.1.5)
|
19
19
|
dotenv (1.0.2)
|
20
|
-
excon (0.
|
20
|
+
excon (0.54.0)
|
21
21
|
i18n (0.7.0)
|
22
22
|
method_source (0.8.2)
|
23
23
|
monetize (1.3.0)
|
@@ -72,4 +72,4 @@ DEPENDENCIES
|
|
72
72
|
webmock
|
73
73
|
|
74
74
|
BUNDLED WITH
|
75
|
-
1.
|
75
|
+
1.13.6
|
@@ -26,7 +26,22 @@ module Suretax
|
|
26
26
|
:units,
|
27
27
|
:zipcode,
|
28
28
|
:tax_exemption_codes,
|
29
|
-
:user_defined_field
|
29
|
+
:user_defined_field,
|
30
|
+
:ship_from_zipcode,
|
31
|
+
:ship_from_plus_four,
|
32
|
+
:order_placement_zipcode,
|
33
|
+
:order_placement_plus_four,
|
34
|
+
:order_approval_zipcode,
|
35
|
+
:order_approval_plus_four,
|
36
|
+
:geocode,
|
37
|
+
:aux_revenue,
|
38
|
+
:aux_revenue_type,
|
39
|
+
:freight_on_board,
|
40
|
+
:ship_from_pob,
|
41
|
+
:mail_order,
|
42
|
+
:common_carrier,
|
43
|
+
:origin_country_code,
|
44
|
+
:dest_country_code
|
30
45
|
|
31
46
|
validate :bill_to_number,
|
32
47
|
:customer_number,
|
@@ -78,7 +93,22 @@ module Suretax
|
|
78
93
|
"SalesTypeCode" => sales_type_code,
|
79
94
|
"RegulatoryCode" => regulatory_code,
|
80
95
|
"TaxExemptionCodeList" => tax_exemption_codes,
|
81
|
-
"UDF"
|
96
|
+
"UDF" => user_defined_field || '',
|
97
|
+
"ShipFromZipCode" => ship_from_zipcode || "",
|
98
|
+
"ShipFromPlus4" => ship_from_plus_four || "",
|
99
|
+
"OrderPlacementZipcode" => order_placement_zipcode || "",
|
100
|
+
"OrderPlacementPlus4" => order_approval_plus_four || "",
|
101
|
+
"OrderApprovalZipcode" => order_approval_zipcode || "",
|
102
|
+
"OrderApprovalPlus4" => order_approval_plus_four || "",
|
103
|
+
"Geocode" => geocode || "",
|
104
|
+
"AuxRevenue" => aux_revenue || "0.00",
|
105
|
+
"AuxRevenueType" => aux_revenue_type || "01",
|
106
|
+
"FreightOnBoard" => freight_on_board || "",
|
107
|
+
"ShipFromPOB" => ship_from_pob || "1",
|
108
|
+
"MailOrder" => mail_order || "1",
|
109
|
+
"CommonCarrier" => common_carrier || "1",
|
110
|
+
"OriginCountryCode" => origin_country_code || "",
|
111
|
+
"DestCountryCode" => dest_country_code || ""
|
82
112
|
}
|
83
113
|
end
|
84
114
|
end
|
data/lib/suretax/version.rb
CHANGED
@@ -34,7 +34,22 @@ describe Suretax::Api::RequestItem do
|
|
34
34
|
unit_type: "00",
|
35
35
|
units: "1",
|
36
36
|
zipcode: "",
|
37
|
-
user_defined_field: ''
|
37
|
+
user_defined_field: '',
|
38
|
+
ship_from_zipcode: "",
|
39
|
+
ship_from_plus_four: "",
|
40
|
+
order_placement_zipcode: "",
|
41
|
+
order_placement_plus_four: "",
|
42
|
+
order_approval_zipcode: "",
|
43
|
+
order_approval_plus_four: "",
|
44
|
+
geocode: "",
|
45
|
+
aux_revenue: "0.00",
|
46
|
+
aux_revenue_type: "01",
|
47
|
+
freight_on_board: "",
|
48
|
+
ship_from_pob: "1",
|
49
|
+
mail_order: "1",
|
50
|
+
common_carrier: "1",
|
51
|
+
origin_country_code: "",
|
52
|
+
dest_country_code: ""
|
38
53
|
}.each_pair do |key,value|
|
39
54
|
it "##{key} should return the correct value" do
|
40
55
|
subject.send("#{key.to_s}=",value)
|
@@ -10,13 +10,14 @@ describe Suretax do
|
|
10
10
|
|
11
11
|
let(:key) { 'xxxxxxxx' }
|
12
12
|
let(:client) { '9999999999' }
|
13
|
-
let(:post_path) { '/Services/
|
13
|
+
let(:post_path) { '/Services/V04/SureTax.asmx/PostRequest' }
|
14
14
|
let(:cancel_path) { '/Services/V01/SureTax.asmx/CancelPostRequest' }
|
15
15
|
|
16
16
|
before do
|
17
17
|
Suretax.configure do |c|
|
18
18
|
c.validation_key = key
|
19
19
|
c.client_number = client
|
20
|
+
c.request_version = "04"
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
@@ -44,6 +45,10 @@ describe Suretax do
|
|
44
45
|
expect(config.test?).to eql true
|
45
46
|
end
|
46
47
|
|
48
|
+
it "should allow me to set the request version" do
|
49
|
+
expect(config.request_version).to eql 4
|
50
|
+
end
|
51
|
+
|
47
52
|
context 'when setting the mode' do
|
48
53
|
around(:each) do |test|
|
49
54
|
original_url = Suretax.configuration.base_url
|
@@ -41,7 +41,22 @@ module RequestSpecHelper
|
|
41
41
|
"00",
|
42
42
|
"00"
|
43
43
|
],
|
44
|
-
"UDF"
|
44
|
+
"UDF" => "",
|
45
|
+
"ShipFromZipCode" => "",
|
46
|
+
"ShipFromPlus4" => "",
|
47
|
+
"OrderPlacementZipcode" => "",
|
48
|
+
"OrderPlacementPlus4" => "",
|
49
|
+
"OrderApprovalZipcode" => "",
|
50
|
+
"OrderApprovalPlus4" => "",
|
51
|
+
"Geocode" => "",
|
52
|
+
"AuxRevenue" => "0.00",
|
53
|
+
"AuxRevenueType" => "01",
|
54
|
+
"FreightOnBoard" => "",
|
55
|
+
"ShipFromPOB" => "1",
|
56
|
+
"MailOrder" => "1",
|
57
|
+
"CommonCarrier" => "1",
|
58
|
+
"OriginCountryCode" => "",
|
59
|
+
"DestCountryCode" => "",
|
45
60
|
}
|
46
61
|
]
|
47
62
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suretax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damon Davison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -251,12 +251,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
251
251
|
version: '0'
|
252
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
253
|
requirements:
|
254
|
-
- - "
|
254
|
+
- - ">"
|
255
255
|
- !ruby/object:Gem::Version
|
256
|
-
version:
|
256
|
+
version: 1.3.1
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.
|
259
|
+
rubygems_version: 2.6.7
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: This gem will allow Ruby developers to easily integrate SureTax into their
|
@@ -279,4 +279,3 @@ test_files:
|
|
279
279
|
- spec/support/request_helper.rb
|
280
280
|
- spec/support/suretax_helper.rb
|
281
281
|
- spec/support/validations_shared_examples.rb
|
282
|
-
has_rdoc:
|