taxjar-ruby 1.1.2 → 1.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e9e5cb199d0e47c612532283ba094ff9f5b3369
4
- data.tar.gz: cd4f10ce8d7bda72a4ff4d7646d75235f8043b8c
3
+ metadata.gz: cd133d25374b0e81e58a96fdb951329848e577a5
4
+ data.tar.gz: da271f53ff9fdd4eef5123da7fcf320ae78b99fd
5
5
  SHA512:
6
- metadata.gz: 159cf9c8b365cadbb64b95077e302c1cfac95a5c3f4c57990aa838f330b1b51dc073622d4d8c75f0a7dc3b52a3a2eca16586415deb1b4d2921fc6cb2813e609c
7
- data.tar.gz: 729c4ec602658e892fc9dad587b3fb30f3a085e0143c69800b28afa222047010ac338d2ec5045b4bff4e265bd95a5e25a642722710a750abe62cc3054d0f6ab8
6
+ metadata.gz: e996b3715a70f75c10b8a7048c1049c949c55fe8e4d1f9e06c0d81b1b8d5765692bc0778ff7bdae1822b18f0ae7c501f1cb00024a44cab23d1951a6e3f9ea867
7
+ data.tar.gz: f1ce3c2e1a23462cd7a9f6f44c08b45a3b827a364ca2a4c24066513843a644a77ceeea306959232ec6f69c9463cc1183bf778f49b7540ce842f90b36109f642a
@@ -4,8 +4,8 @@ require 'taxjar/shipping'
4
4
  module Taxjar
5
5
  class Breakdown < Taxjar::Base
6
6
  attr_reader :state_taxable_amount, :state_tax_collectable, :county_taxable_amount,
7
- :county_tax_collectable, :city_tax_collectable,
8
- :special_district_taxable_amount, :special_district_tax_collectable
7
+ :county_tax_collectable, :city_taxable_amount, :city_tax_collectable,
8
+ :special_district_taxable_amount, :special_district_tax_collectable
9
9
 
10
10
  object_attr_reader Taxjar::Shipping, :shipping
11
11
 
@@ -2,9 +2,9 @@ require 'taxjar/base'
2
2
 
3
3
  module Taxjar
4
4
  class BreakdownLineItem < Taxjar::Base
5
- attr_reader :id, :state_taxable_amount, :state_sales_tax_rate, :county_taxable_amount,
6
- :county_tax_rate, :city_taxable_amount, :city_tax_rate, :special_district_taxable_amount
7
- :special_tax_rate
5
+ attr_reader :id, :tax_collectable, :state_taxable_amount, :state_sales_tax_rate, :state_amount,
6
+ :county_taxable_amount, :county_tax_rate, :county_amount, :city_taxable_amount, :city_tax_rate, :city_amount,
7
+ :special_district_taxable_amount, :special_tax_rate, :special_district_amount
8
8
 
9
9
  end
10
10
  end
data/lib/taxjar/order.rb CHANGED
@@ -6,7 +6,7 @@ module Taxjar
6
6
  :to_state, :to_city, :to_street, :amount, :shipping, :sales_tax
7
7
 
8
8
  def line_items
9
- @line_items ||= map_collection(Taxjar::LineItem, :line_items)
9
+ map_collection(Taxjar::LineItem, :line_items)
10
10
  end
11
11
 
12
12
  end
data/lib/taxjar/refund.rb CHANGED
@@ -7,7 +7,7 @@ module Taxjar
7
7
  :to_state, :to_city, :to_street, :amount, :shipping, :sales_tax
8
8
 
9
9
  def line_items
10
- @line_items ||= map_collection(Taxjar::LineItem, :line_items)
10
+ map_collection(Taxjar::LineItem, :line_items)
11
11
  end
12
12
  end
13
13
  end
@@ -2,8 +2,9 @@ require 'taxjar/base'
2
2
 
3
3
  module Taxjar
4
4
  class Shipping < Taxjar::Base
5
- attr_reader :state_amount, :state_sales_tax_rate, :county_amount, :county_tax_rate,
6
- :city_amount, :city_tax_rate, :special_district_amount, :special_tax_rate
5
+ attr_reader :taxable_amount, :tax_collectable, :state_amount, :state_sales_tax_rate,
6
+ :county_amount, :county_tax_rate, :city_amount, :city_tax_rate, :special_district_amount,
7
+ :special_tax_rate
7
8
 
8
9
  end
9
10
  end
data/lib/taxjar/tax.rb CHANGED
@@ -2,8 +2,8 @@ require 'taxjar/base'
2
2
 
3
3
  module Taxjar
4
4
  class Tax < Taxjar::Base
5
- attr_reader :order_total_amount, :amount_to_collect, :has_nexus,
6
- :freight_taxable, :tax_source
5
+ attr_reader :order_total_amount, :shipping, :taxable_amount, :amount_to_collect, :rate,
6
+ :has_nexus, :freight_taxable, :tax_source
7
7
 
8
8
  object_attr_reader Taxjar::Breakdown, :breakdown
9
9
 
@@ -11,7 +11,7 @@ module Taxjar
11
11
  end
12
12
 
13
13
  def patch
14
- 2
14
+ 3
15
15
  end
16
16
 
17
17
  def pre
@@ -68,6 +68,11 @@ describe Taxjar::API::Order do
68
68
  expect(order).to be_an Taxjar::Order
69
69
  expect(order.transaction_id).to eq(123)
70
70
  end
71
+
72
+ it 'allows access to line_items' do
73
+ order = @client.show_order('123')
74
+ expect(order.line_items[0].quantity).to eq(1)
75
+ end
71
76
  end
72
77
 
73
78
  describe "#create_order" do
@@ -68,6 +68,11 @@ describe Taxjar::API::Refund do
68
68
  expect(refund).to be_an Taxjar::Refund
69
69
  expect(refund.transaction_id).to eq(321)
70
70
  end
71
+
72
+ it 'allows access to line_items' do
73
+ refund = @client.show_refund('321')
74
+ expect(refund.line_items[0].quantity).to eq(1)
75
+ end
71
76
  end
72
77
 
73
78
  describe "#create_refund" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taxjar-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TaxJar