suretax 0.1.6 → 0.1.7
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 +1 -1
- data/lib/suretax/api/tax.rb +4 -1
- data/lib/suretax/version.rb +1 -1
- data/spec/lib/suretax/api/tax_spec.rb +12 -0
- data/spec/support/request_helper.rb +32 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0209125cf9027f73af19d0f78e0f1a8844681914
|
4
|
+
data.tar.gz: 4ed41091af0051eeb00d448be1d1a569d3d339e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417eeefb8d183c6b34a261eae148824227d2b9d790c71c6fa00e62afc4c0257903149e5d8604ea296def82e73855761722e1523a025612a70123f1c62d701c98
|
7
|
+
data.tar.gz: beccb4d7caee1ecdb7ea88f7e4910810314b085b028ffb528fef5f01d4a00faa1c9f6f3a27af885f1450e333c4ba0c399ac38fdc3844b657488aa098e3a2b22a
|
data/Gemfile.lock
CHANGED
data/lib/suretax/api/tax.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Suretax
|
2
2
|
module Api
|
3
3
|
class Tax
|
4
|
-
attr_reader :code, :description, :amount, :revenue, :county, :city, :rate, :taxable
|
4
|
+
attr_reader :code, :description, :amount, :revenue, :county, :city, :rate, :taxable, :fee_rate, :tax_on_tax, :revenue_base
|
5
5
|
|
6
6
|
def initialize(response_params)
|
7
7
|
@code = response_params.fetch('TaxTypeCode')
|
@@ -12,6 +12,9 @@ module Suretax
|
|
12
12
|
@city = response_params['CityName']
|
13
13
|
@rate = set_amount(response_params['TaxRate'])
|
14
14
|
@taxable = set_amount(response_params['PercentTaxable'])
|
15
|
+
@fee_rate = set_amount(response_params['FeeRate'])
|
16
|
+
@tax_on_tax = set_amount(response_params['TaxOnTax'])
|
17
|
+
@revenue_base = set_amount(response_params['RevenueBase'])
|
15
18
|
end
|
16
19
|
|
17
20
|
private
|
data/lib/suretax/version.rb
CHANGED
@@ -55,5 +55,17 @@ describe Suretax::Api::Tax do
|
|
55
55
|
it 'should have a percent taxable' do
|
56
56
|
expect(tax.taxable.to_f).to eql(1.0)
|
57
57
|
end
|
58
|
+
|
59
|
+
it 'should have a fee rate' do
|
60
|
+
expect(tax.fee_rate.to_f).to eql 0.0
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'should have a tax on tax' do
|
64
|
+
expect(tax.tax_on_tax.to_f).to eql 0.5
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'should have a revenue base' do
|
68
|
+
expect(tax.revenue_base.to_f).to eql 40.0
|
69
|
+
end
|
58
70
|
end
|
59
71
|
end
|
@@ -128,80 +128,104 @@ module RequestSpecHelper
|
|
128
128
|
"TaxTypeDesc" => "CA EMERG TEL. USERS SURCHARGE",
|
129
129
|
"TaxAmount" => "0.200760",
|
130
130
|
"Revenue" => "40",
|
131
|
+
"RevenueBase" => "40",
|
131
132
|
"CountyName" => "SAN DIEGO",
|
132
133
|
"CityName" => "SAN DIEGO",
|
133
134
|
"TaxRate" => 0.005,
|
134
|
-
"PercentTaxable" => 1.0
|
135
|
+
"PercentTaxable" => 1.0,
|
136
|
+
"FeeRate" => 0.0,
|
137
|
+
"TaxOnTax" => 0.50
|
135
138
|
},
|
136
139
|
{
|
137
140
|
"TaxTypeCode" => "108",
|
138
141
|
"TaxTypeDesc" => "CA P.U.C. FEE",
|
139
142
|
"TaxAmount" => "0.072130",
|
140
143
|
"Revenue" => "40",
|
144
|
+
"RevenueBase" => "40",
|
141
145
|
"CountyName" => "SAN DIEGO",
|
142
146
|
"CityName" => "SAN DIEGO",
|
143
147
|
"TaxRate" => 0.0018,
|
144
|
-
"PercentTaxable" => 1.0
|
148
|
+
"PercentTaxable" => 1.0,
|
149
|
+
"FeeRate" => 0.0,
|
150
|
+
"TaxOnTax" => 0.0
|
145
151
|
},
|
146
152
|
{
|
147
153
|
"TaxTypeCode" => "109",
|
148
154
|
"TaxTypeDesc" => "CA TELECOM RELAY SYSTEMS SURCHARGE",
|
149
155
|
"TaxAmount" => "0.080000",
|
150
156
|
"Revenue" => "40",
|
157
|
+
"RevenueBase" => "40",
|
151
158
|
"CountyName" => "SAN DIEGO",
|
152
159
|
"CityName" => "SAN DIEGO",
|
153
160
|
"TaxRate" => 0.002,
|
154
|
-
"PercentTaxable" => 1.0
|
161
|
+
"PercentTaxable" => 1.0,
|
162
|
+
"FeeRate" => 0.0,
|
163
|
+
"TaxOnTax" => 0.0
|
155
164
|
},
|
156
165
|
{
|
157
166
|
"TaxTypeCode" => "117",
|
158
167
|
"TaxTypeDesc" => "CA HIGH COST FUND(B) SURCHARGE",
|
159
168
|
"TaxAmount" => "0.120000",
|
160
169
|
"Revenue" => "40",
|
170
|
+
"RevenueBase" => "40",
|
161
171
|
"CountyName" => "SAN DIEGO",
|
162
172
|
"CityName" => "SAN DIEGO",
|
163
173
|
"TaxRate" => 0.003,
|
164
|
-
"PercentTaxable" => 1.0
|
174
|
+
"PercentTaxable" => 1.0,
|
175
|
+
"FeeRate" => 0.0,
|
176
|
+
"TaxOnTax" => 0.0
|
165
177
|
},
|
166
178
|
{
|
167
179
|
"TaxTypeCode" => "118",
|
168
180
|
"TaxTypeDesc" => "CA TELECONNECT FUND",
|
169
181
|
"TaxAmount" => "0.236000",
|
170
182
|
"Revenue" => "40",
|
183
|
+
"RevenueBase" => "40",
|
171
184
|
"CountyName" => "SAN DIEGO",
|
172
185
|
"CityName" => "SAN DIEGO",
|
173
186
|
"TaxRate" => 0.0059,
|
174
|
-
"PercentTaxable" => 1.0
|
187
|
+
"PercentTaxable" => 1.0,
|
188
|
+
"FeeRate" => 0.0,
|
189
|
+
"TaxOnTax" => 0.0
|
175
190
|
},
|
176
191
|
{
|
177
192
|
"TaxTypeCode" => "119",
|
178
193
|
"TaxTypeDesc" => "CA HIGH COST FUND(A) SURCHARGE",
|
179
194
|
"TaxAmount" => "0.160000",
|
180
195
|
"Revenue" => "40",
|
196
|
+
"RevenueBase" => "40",
|
181
197
|
"CountyName" => "SAN DIEGO",
|
182
198
|
"CityName" => "SAN DIEGO",
|
183
199
|
"TaxRate" => 0.004,
|
184
|
-
"PercentTaxable" => 1.0
|
200
|
+
"PercentTaxable" => 1.0,
|
201
|
+
"FeeRate" => 0.0,
|
202
|
+
"TaxOnTax" => 0.0
|
185
203
|
},
|
186
204
|
{
|
187
205
|
"TaxTypeCode" => "120",
|
188
206
|
"TaxTypeDesc" => "CA ADVANCED SERV FUND SURCH",
|
189
207
|
"TaxAmount" => "0.065600",
|
190
208
|
"Revenue" => "40",
|
209
|
+
"RevenueBase" => "40",
|
191
210
|
"CountyName" => "SAN DIEGO",
|
192
211
|
"CityName" => "SAN DIEGO",
|
193
212
|
"TaxRate" => 0.00164,
|
194
|
-
"PercentTaxable" => 1.0
|
213
|
+
"PercentTaxable" => 1.0,
|
214
|
+
"FeeRate" => 0.0,
|
215
|
+
"TaxOnTax" => 0.0
|
195
216
|
},
|
196
217
|
{
|
197
218
|
"TaxTypeCode" => "122",
|
198
219
|
"TaxTypeDesc" => "CA UNIVERSAL LIFELINE SURCHARGE",
|
199
220
|
"TaxAmount" => "0.460000",
|
200
221
|
"Revenue" => "40",
|
222
|
+
"RevenueBase" => "40",
|
201
223
|
"CountyName" => "SAN DIEGO",
|
202
224
|
"CityName" => "SAN DIEGO",
|
203
225
|
"TaxRate" => 0.0115,
|
204
|
-
"PercentTaxable" => 1.0
|
226
|
+
"PercentTaxable" => 1.0,
|
227
|
+
"FeeRate" => 0.0,
|
228
|
+
"TaxOnTax" => 0.0
|
205
229
|
}]
|
206
230
|
}
|
207
231
|
]
|
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.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damon Davison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|