taxjar-ruby 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -1
- data/lib/taxjar/order.rb +1 -0
- data/lib/taxjar/refund.rb +1 -0
- data/lib/taxjar/tax.rb +1 -0
- data/lib/taxjar/version.rb +1 -1
- data/spec/fixtures/order.json +1 -0
- data/spec/fixtures/refund.json +1 -0
- data/spec/fixtures/taxes.json +1 -0
- data/spec/fixtures/taxes_canada.json +1 -0
- data/spec/fixtures/taxes_international.json +1 -0
- data/spec/taxjar/api/api_spec.rb +4 -0
- data/spec/taxjar/api/order_spec.rb +6 -0
- data/spec/taxjar/api/refund_spec.rb +6 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 46f2c66034905b6051c6ad0815fda363f5033ef96ccda22eae49522655e9812b
|
4
|
+
data.tar.gz: 8bb30db9db295fc155ca27f4709710fd4530c69880e2df215d2095f2d2a3ab06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e339755e82dd454775aca629daed57db0a0f7a438fb565d6ec5f610ae31159fbc0418aca99db4a810eb363b62fc9093830c8237a0135a9a2fc071230a99d838e
|
7
|
+
data.tar.gz: bef9cbd0e1963ee164436985cb1dbb898701cc4cca1b16ae3e49ab7f4049f90172cfb5b41b1f1218ae08fc92285b2f6d717497df601391577617ac4239189fed
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [2.6.0] - 2019-07-09
|
11
|
+
- Support `exemption_type` param for order-level exempt transactions
|
12
|
+
|
10
13
|
## [2.5.0] - 2019-06-19
|
11
14
|
- Support `provider` param for marketplace exempt transactions
|
12
15
|
- Add proxy support when instantiating client
|
@@ -31,7 +34,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
31
34
|
- Update minimum required Ruby version to 2.0
|
32
35
|
- Update HTTP (The Gem) to 2.2
|
33
36
|
|
34
|
-
[Unreleased]: https://github.com/taxjar/taxjar-ruby/compare/v2.
|
37
|
+
[Unreleased]: https://github.com/taxjar/taxjar-ruby/compare/v2.6.0...HEAD
|
38
|
+
[2.6.0]: https://github.com/taxjar/taxjar-ruby/compare/v2.5.0...v2.6.0
|
35
39
|
[2.5.0]: https://github.com/taxjar/taxjar-ruby/compare/v2.4.1...v2.5.0
|
36
40
|
[2.4.1]: https://github.com/taxjar/taxjar-ruby/compare/v2.4.0...v2.4.1
|
37
41
|
[2.4.0]: https://github.com/taxjar/taxjar-ruby/compare/v2.3.0...v2.4.0
|
data/lib/taxjar/order.rb
CHANGED
data/lib/taxjar/refund.rb
CHANGED
@@ -9,6 +9,7 @@ module Taxjar
|
|
9
9
|
attribute :transaction_date, :string
|
10
10
|
attribute :transaction_reference_id, :string
|
11
11
|
attribute :provider, :string
|
12
|
+
attribute :exemption_type, :string
|
12
13
|
attribute :from_country, :string
|
13
14
|
attribute :from_zip, :string
|
14
15
|
attribute :from_state, :string
|
data/lib/taxjar/tax.rb
CHANGED
@@ -12,6 +12,7 @@ module Taxjar
|
|
12
12
|
attribute :has_nexus, :boolean
|
13
13
|
attribute :freight_taxable, :boolean
|
14
14
|
attribute :tax_source, :string
|
15
|
+
attribute :exemption_type, :string
|
15
16
|
|
16
17
|
object_attr_reader Taxjar::Jurisdictions, :jurisdictions
|
17
18
|
object_attr_reader Taxjar::Breakdown, :breakdown
|
data/lib/taxjar/version.rb
CHANGED
data/spec/fixtures/order.json
CHANGED
data/spec/fixtures/refund.json
CHANGED
data/spec/fixtures/taxes.json
CHANGED
data/spec/taxjar/api/api_spec.rb
CHANGED
@@ -168,6 +168,7 @@ describe Taxjar::API do
|
|
168
168
|
:to_zip => '07446',
|
169
169
|
:amount => 16.50,
|
170
170
|
:shipping => 1.5,
|
171
|
+
:exemption_type => 'non_exempt',
|
171
172
|
:line_items => [{:line_item => {:id => '1',
|
172
173
|
:quantity => 1,
|
173
174
|
:unit_price => 15.0,
|
@@ -191,6 +192,7 @@ describe Taxjar::API do
|
|
191
192
|
expect(tax.has_nexus).to eq(true)
|
192
193
|
expect(tax.freight_taxable).to eq(true)
|
193
194
|
expect(tax.tax_source).to eq('destination')
|
195
|
+
expect(tax.exemption_type).to eq('non_exempt')
|
194
196
|
end
|
195
197
|
|
196
198
|
it 'allows access to jurisdictions' do
|
@@ -275,6 +277,7 @@ describe Taxjar::API do
|
|
275
277
|
expect(tax.has_nexus).to eq(true)
|
276
278
|
expect(tax.freight_taxable).to eq(true)
|
277
279
|
expect(tax.tax_source).to eq('destination')
|
280
|
+
expect(tax.exemption_type).to eq('non_exempt')
|
278
281
|
end
|
279
282
|
|
280
283
|
it 'allows access to jurisdictions' do
|
@@ -330,6 +333,7 @@ describe Taxjar::API do
|
|
330
333
|
expect(tax.has_nexus).to eq(true)
|
331
334
|
expect(tax.freight_taxable).to eq(true)
|
332
335
|
expect(tax.tax_source).to eq('destination')
|
336
|
+
expect(tax.exemption_type).to eq('non_exempt')
|
333
337
|
end
|
334
338
|
|
335
339
|
it 'allows access to jurisdictions' do
|
@@ -71,6 +71,7 @@ describe Taxjar::API::Order do
|
|
71
71
|
expect(order.user_id).to eq(10649)
|
72
72
|
expect(order.transaction_date).to eq('2015-05-14T00:00:00Z')
|
73
73
|
expect(order.provider).to eq('api')
|
74
|
+
expect(order.exemption_type).to eq('non_exempt')
|
74
75
|
expect(order.from_country).to eq('US')
|
75
76
|
expect(order.from_zip).to eq('93107')
|
76
77
|
expect(order.from_state).to eq('CA')
|
@@ -107,6 +108,7 @@ describe Taxjar::API::Order do
|
|
107
108
|
@order = {:transaction_id => '123',
|
108
109
|
:transaction_date => '2015/05/14',
|
109
110
|
:provider => 'api',
|
111
|
+
:exemption_type => 'non_exempt',
|
110
112
|
:to_country => 'US',
|
111
113
|
:to_zip => '90002',
|
112
114
|
:to_city => 'Los Angeles',
|
@@ -137,6 +139,7 @@ describe Taxjar::API::Order do
|
|
137
139
|
expect(order.user_id).to eq(10649)
|
138
140
|
expect(order.transaction_date).to eq("2015-05-14T00:00:00Z")
|
139
141
|
expect(order.provider).to eq('api')
|
142
|
+
expect(order.exemption_type).to eq('non_exempt')
|
140
143
|
expect(order.from_country).to eq('US')
|
141
144
|
expect(order.from_zip).to eq('93107')
|
142
145
|
expect(order.from_state).to eq('CA')
|
@@ -174,6 +177,7 @@ describe Taxjar::API::Order do
|
|
174
177
|
@order = {:transaction_id => '123',
|
175
178
|
:amount => 17.95,
|
176
179
|
:shipping => 2.0,
|
180
|
+
:exemption_type => 'non_exempt',
|
177
181
|
:line_items => [{:id => 1,
|
178
182
|
:quantity => 1,
|
179
183
|
:product_identifier => '12-34243-0',
|
@@ -197,6 +201,7 @@ describe Taxjar::API::Order do
|
|
197
201
|
expect(order.user_id).to eq(10649)
|
198
202
|
expect(order.transaction_date).to eq("2015-05-14T00:00:00Z")
|
199
203
|
expect(order.provider).to eq('api')
|
204
|
+
expect(order.exemption_type).to eq('non_exempt')
|
200
205
|
expect(order.from_country).to eq('US')
|
201
206
|
expect(order.from_zip).to eq('93107')
|
202
207
|
expect(order.from_state).to eq('CA')
|
@@ -244,6 +249,7 @@ describe Taxjar::API::Order do
|
|
244
249
|
expect(order.user_id).to eq(10649)
|
245
250
|
expect(order.transaction_date).to eq("2015-05-14T00:00:00Z")
|
246
251
|
expect(order.provider).to eq('api')
|
252
|
+
expect(order.exemption_type).to eq('non_exempt')
|
247
253
|
expect(order.from_country).to eq('US')
|
248
254
|
expect(order.from_zip).to eq('93107')
|
249
255
|
expect(order.from_state).to eq('CA')
|
@@ -72,6 +72,7 @@ describe Taxjar::API::Refund do
|
|
72
72
|
expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
|
73
73
|
expect(refund.transaction_reference_id).to eq("123")
|
74
74
|
expect(refund.provider).to eql('api')
|
75
|
+
expect(refund.exemption_type).to eq('non_exempt')
|
75
76
|
expect(refund.from_country).to eq('US')
|
76
77
|
expect(refund.from_zip).to eq('93107')
|
77
78
|
expect(refund.from_state).to eq('CA')
|
@@ -109,6 +110,7 @@ describe Taxjar::API::Refund do
|
|
109
110
|
:transaction_date => '2015/05/14',
|
110
111
|
:transaction_reference_id => '123',
|
111
112
|
:provider => 'api',
|
113
|
+
:exemption_type => 'non_exempt',
|
112
114
|
:to_country => 'US',
|
113
115
|
:to_zip => '90002',
|
114
116
|
:to_state => 'CA',
|
@@ -140,6 +142,7 @@ describe Taxjar::API::Refund do
|
|
140
142
|
expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
|
141
143
|
expect(refund.transaction_reference_id).to eq("123")
|
142
144
|
expect(refund.provider).to eq('api')
|
145
|
+
expect(refund.exemption_type).to eq('non_exempt')
|
143
146
|
expect(refund.from_country).to eq('US')
|
144
147
|
expect(refund.from_zip).to eq('93107')
|
145
148
|
expect(refund.from_state).to eq('CA')
|
@@ -178,6 +181,7 @@ describe Taxjar::API::Refund do
|
|
178
181
|
:amount => 17.95,
|
179
182
|
:shipping => 2.0,
|
180
183
|
:sales_tax => 0.95,
|
184
|
+
:exemption_type => 'non_exempt',
|
181
185
|
:line_items => [{:quantity => 1,
|
182
186
|
:product_identifier => '12-34243-9',
|
183
187
|
:description => 'Heavy Widget',
|
@@ -201,6 +205,7 @@ describe Taxjar::API::Refund do
|
|
201
205
|
expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
|
202
206
|
expect(refund.transaction_reference_id).to eq("123")
|
203
207
|
expect(refund.provider).to eq('api')
|
208
|
+
expect(refund.exemption_type).to eq('non_exempt')
|
204
209
|
expect(refund.from_country).to eq('US')
|
205
210
|
expect(refund.from_zip).to eq('93107')
|
206
211
|
expect(refund.from_state).to eq('CA')
|
@@ -249,6 +254,7 @@ describe Taxjar::API::Refund do
|
|
249
254
|
expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
|
250
255
|
expect(refund.transaction_reference_id).to eq("123")
|
251
256
|
expect(refund.provider).to eq('api')
|
257
|
+
expect(refund.exemption_type).to eq('non_exempt')
|
252
258
|
expect(refund.from_country).to eq('US')
|
253
259
|
expect(refund.from_zip).to eq('93107')
|
254
260
|
expect(refund.from_state).to eq('CA')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taxjar-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TaxJar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -196,8 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
|
-
|
200
|
-
rubygems_version: 2.6.8
|
199
|
+
rubygems_version: 3.0.4
|
201
200
|
signing_key:
|
202
201
|
specification_version: 4
|
203
202
|
summary: Ruby wrapper for Taxjar API
|