taxjar-ruby 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b7aa7c93c3a6dc05ffd13a0d6efd955033d841e
4
- data.tar.gz: 1ef818356db3fb21e1b94bb6342ffae716eef57e
3
+ metadata.gz: e9adee0198596906af12330e1955674f4ac57bf7
4
+ data.tar.gz: fde4261b6505e019557f14a24a5733996c706247
5
5
  SHA512:
6
- metadata.gz: 4cfe6ce5a86c1b2a4995152b76cbb016d3b64b3807f62fade7ee9b3dd8dd0f90aadf90116cf3a95131735b51d9efb3d50e6b98ee60bf313fe159047c99be10e4
7
- data.tar.gz: 7240aad485c2d64e7ed8a1e5cf819c7837db1862c699f29991e567430ece0e102021353ff3cbbe4529905bb57508716d4216452a3d5b7cb1e143a7c0da81b19c
6
+ metadata.gz: d6379a1d7f112fefc52bfb43c2b2b8e2357f319254eb2d6580b862fb3a493cc4db0b28983679bf87f0ec64850a4dab3e790ec25b5f415cd9616025ace9d27e02
7
+ data.tar.gz: caaa54167ae736de86485c79c153becab2dbf7847b88e8dd7a0baacafccbab227bc8a4e66ca3624891a6bb71422e11fe13e484b1f06b8f5526e7c23e6e7a76d0
data/README.md CHANGED
@@ -215,7 +215,7 @@ client.tax_for_order({
215
215
  :special_district_tax_collectable => 0.22,
216
216
  :line_items => [
217
217
  {
218
- :id => 1,
218
+ :id => '1',
219
219
  :state_taxable_amount => 15,
220
220
  :state_sales_tax_rate => 0.065,
221
221
  :county_taxable_amount => 15,
@@ -305,7 +305,7 @@ client.show_order('123')
305
305
  :sales_tax => 0.95,
306
306
  :line_items => [
307
307
  {
308
- :id => 1,
308
+ :id => '1',
309
309
  :quantity => 1,
310
310
  :product_identifier => '12-34243-0',
311
311
  :product_tax_code => nil,
@@ -379,7 +379,7 @@ order = client.create_order({
379
379
  :sales_tax => 0.95,
380
380
  :line_items => [
381
381
  {
382
- :id => 1,
382
+ :id => '1',
383
383
  :quantity => 1,
384
384
  :product_identifier => '12-34243-9',
385
385
  :product_tax_code => nil,
@@ -442,7 +442,7 @@ order = client.update_order({
442
442
  :sales_tax => 0.95,
443
443
  :line_items => [
444
444
  {
445
- :id => 1,
445
+ :id => '1',
446
446
  :quantity => 1,
447
447
  :product_identifier => '12-34243-0',
448
448
  :product_tax_code => nil,
@@ -469,7 +469,7 @@ client.delete_order
469
469
  require 'taxjar'
470
470
  client = Taxjar::Client.new(api_key: '48ceecccc8af930bd02597aec0f84a78')
471
471
 
472
- client.delete_order(123)
472
+ client.delete_order('123')
473
473
  ```
474
474
 
475
475
  #### Example Response
@@ -495,7 +495,7 @@ client.delete_order(123)
495
495
  :sales_tax => 0.95,
496
496
  :line_items => [
497
497
  {
498
- :id => 1,
498
+ :id => '1',
499
499
  :quantity => 1,
500
500
  :product_identifier => '12-34243-0',
501
501
  :product_tax_code => nil,
@@ -572,7 +572,7 @@ client.show_refund('321')
572
572
  :sales_tax => 0.95,
573
573
  :line_items => [
574
574
  {
575
- :id => 1,
575
+ :id => '1',
576
576
  :quantity => 1,
577
577
  :product_identifier => '12-34243-0',
578
578
  :product_tax_code => nil,
@@ -647,7 +647,7 @@ refund = client.create_refund({
647
647
  :sales_tax => 0.95,
648
648
  :line_items => [
649
649
  {
650
- :id => 1,
650
+ :id => '1',
651
651
  :quantity => 1,
652
652
  :product_identifier => '12-34243-0',
653
653
  :product_tax_code => nil,
@@ -710,7 +710,7 @@ refund = client.update_refund({
710
710
  :sales_tax => 0.95,
711
711
  :line_items => [
712
712
  {
713
- :id => 1,
713
+ :id => '1',
714
714
  :quantity => 1,
715
715
  :product_identifier => '12-34243-9',
716
716
  :product_tax_code => nil,
@@ -737,7 +737,7 @@ client.delete_refund
737
737
  require 'taxjar'
738
738
  client = Taxjar::Client.new(api_key: '48ceecccc8af930bd02597aec0f84a78')
739
739
 
740
- client.delete_refund(321)
740
+ client.delete_refund('321')
741
741
  ```
742
742
 
743
743
  #### Example Response
@@ -763,7 +763,7 @@ client.delete_refund(321)
763
763
  :sales_tax => 0.95,
764
764
  :line_items => [
765
765
  {
766
- :id => 1,
766
+ :id => '1',
767
767
  :quantity => 1,
768
768
  :product_identifier => '12-34243-9',
769
769
  :product_tax_code => nil,
@@ -3,8 +3,8 @@ require 'taxjar/base'
3
3
  module Taxjar
4
4
  class BreakdownLineItem < Taxjar::Base
5
5
  extend ModelAttribute
6
-
7
- attribute :id, :integer
6
+
7
+ attribute :id, :string
8
8
  attribute :taxable_amount, :float
9
9
  attribute :tax_collectable, :float
10
10
  attribute :combined_tax_rate, :float
@@ -4,7 +4,7 @@ module Taxjar
4
4
  class LineItem < Taxjar::Base
5
5
  extend ModelAttribute
6
6
 
7
- attribute :id, :integer
7
+ attribute :id, :string
8
8
  attribute :quantity, :integer
9
9
  attribute :product_identifier, :string
10
10
  attribute :description, :string
@@ -6,7 +6,7 @@ module Taxjar
6
6
  end
7
7
 
8
8
  def minor
9
- 5
9
+ 6
10
10
  end
11
11
 
12
12
  def patch
@@ -18,7 +18,7 @@
18
18
  "sales_tax": "0.95",
19
19
  "line_items": [
20
20
  {
21
- "id": 1,
21
+ "id": "1",
22
22
  "quantity": 1,
23
23
  "product_identifier": "12-34243-9",
24
24
  "description": "Fuzzy Widget",
@@ -19,7 +19,7 @@
19
19
  "sales_tax": "0.95",
20
20
  "line_items": [
21
21
  {
22
- "id": 1,
22
+ "id": "1",
23
23
  "quantity": 1,
24
24
  "product_identifier": "12-34243-9",
25
25
  "description": "Fuzzy Widget",
@@ -93,7 +93,8 @@ describe Taxjar::API do
93
93
  :to_zip => '07446',
94
94
  :amount => 16.50,
95
95
  :shipping => 1.5,
96
- :line_items => [{:line_item => {:quantity => 1,
96
+ :line_items => [{:line_item => {:id => '1',
97
+ :quantity => 1,
97
98
  :unit_price => 15.0,
98
99
  :product_tax_code => '20010'}}]
99
100
  }
@@ -157,7 +158,7 @@ describe Taxjar::API do
157
158
 
158
159
  it 'allows access to breakdown.line_items' do
159
160
  tax = @client.tax_for_order(@order)
160
- expect(tax.breakdown.line_items[0].id).to eq(1)
161
+ expect(tax.breakdown.line_items[0].id).to eq('1')
161
162
  expect(tax.breakdown.line_items[0].taxable_amount).to eq(15)
162
163
  expect(tax.breakdown.line_items[0].tax_collectable).to eq(1.05)
163
164
  expect(tax.breakdown.line_items[0].combined_tax_rate).to eq(0.07)
@@ -215,7 +216,7 @@ describe Taxjar::API do
215
216
 
216
217
  it 'allows access to breakdown.line_items' do
217
218
  tax = @client.tax_for_order(@order)
218
- expect(tax.breakdown.line_items[0].id).to eq(1)
219
+ expect(tax.breakdown.line_items[0].id).to eq('1')
219
220
  expect(tax.breakdown.line_items[0].taxable_amount).to eq(16.95)
220
221
  expect(tax.breakdown.line_items[0].tax_collectable).to eq(4.07)
221
222
  expect(tax.breakdown.line_items[0].combined_tax_rate).to eq(0.24)
@@ -277,7 +278,7 @@ describe Taxjar::API do
277
278
 
278
279
  it 'allows access to breakdown.line_items' do
279
280
  tax = @client.tax_for_order(@order)
280
- expect(tax.breakdown.line_items[0].id).to eq(1)
281
+ expect(tax.breakdown.line_items[0].id).to eq('1')
281
282
  expect(tax.breakdown.line_items[0].taxable_amount).to eq(16.95)
282
283
  expect(tax.breakdown.line_items[0].tax_collectable).to eq(2.2)
283
284
  expect(tax.breakdown.line_items[0].combined_tax_rate).to eq(0.13)
@@ -85,7 +85,7 @@ describe Taxjar::API::Order do
85
85
 
86
86
  it 'allows access to line_items' do
87
87
  order = @client.show_order('123')
88
- expect(order.line_items[0].id).to eq(1)
88
+ expect(order.line_items[0].id).to eq('1')
89
89
  expect(order.line_items[0].quantity).to eq(1)
90
90
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
91
91
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
@@ -145,7 +145,7 @@ describe Taxjar::API::Order do
145
145
 
146
146
  it 'allows access to line_items' do
147
147
  order = @client.create_order(@order)
148
- expect(order.line_items[0].id).to eq(1)
148
+ expect(order.line_items[0].id).to eq('1')
149
149
  expect(order.line_items[0].quantity).to eq(1)
150
150
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
151
151
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
@@ -201,7 +201,7 @@ describe Taxjar::API::Order do
201
201
 
202
202
  it 'allows access to line_items' do
203
203
  order = @client.update_order(@order)
204
- expect(order.line_items[0].id).to eq(1)
204
+ expect(order.line_items[0].id).to eq('1')
205
205
  expect(order.line_items[0].quantity).to eq(1)
206
206
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
207
207
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
@@ -245,7 +245,7 @@ describe Taxjar::API::Order do
245
245
 
246
246
  it 'allows access to line items' do
247
247
  order = @client.delete_order('123')
248
- expect(order.line_items[0].id).to eq(1)
248
+ expect(order.line_items[0].id).to eq('1')
249
249
  expect(order.line_items[0].quantity).to eq(1)
250
250
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
251
251
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
@@ -86,7 +86,7 @@ describe Taxjar::API::Refund do
86
86
 
87
87
  it 'allows access to line_items' do
88
88
  refund = @client.show_refund('321')
89
- expect(refund.line_items[0].id).to eq(1)
89
+ expect(refund.line_items[0].id).to eq('1')
90
90
  expect(refund.line_items[0].quantity).to eq(1)
91
91
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
92
92
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
@@ -149,7 +149,7 @@ describe Taxjar::API::Refund do
149
149
 
150
150
  it 'allows access to line_items' do
151
151
  refund = @client.create_refund(@refund)
152
- expect(refund.line_items[0].id).to eq(1)
152
+ expect(refund.line_items[0].id).to eq('1')
153
153
  expect(refund.line_items[0].quantity).to eq(1)
154
154
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
155
155
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
@@ -206,7 +206,7 @@ describe Taxjar::API::Refund do
206
206
 
207
207
  it 'allows access to line_items' do
208
208
  refund = @client.update_refund(@refund)
209
- expect(refund.line_items[0].id).to eq(1)
209
+ expect(refund.line_items[0].id).to eq('1')
210
210
  expect(refund.line_items[0].quantity).to eq(1)
211
211
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
212
212
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
@@ -252,7 +252,7 @@ describe Taxjar::API::Refund do
252
252
 
253
253
  it 'allows access to line_items' do
254
254
  refund = @client.delete_refund('321')
255
- expect(refund.line_items[0].id).to eq(1)
255
+ expect(refund.line_items[0].id).to eq('1')
256
256
  expect(refund.line_items[0].quantity).to eq(1)
257
257
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
258
258
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
data/taxjar-ruby.gemspec CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.required_ruby_version = '>= 1.9.3'
22
+
21
23
  spec.add_dependency 'addressable', '~> 2.3.8'
22
24
  spec.add_dependency 'http', '~> 0.9.4'
23
25
  spec.add_dependency 'memoizable', '~> 0.4.0'
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: 1.5.0
4
+ version: 1.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: 2016-11-12 00:00:00.000000000 Z
11
+ date: 2017-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - ">="
167
167
  - !ruby/object:Gem::Version
168
- version: '0'
168
+ version: 1.9.3
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.4.5.1
176
+ rubygems_version: 2.4.8
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Ruby wrapper for Taxjar API