taxjar-ruby 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/taxjar/breakdown.rb +2 -2
- data/lib/taxjar/breakdown_line_item.rb +3 -3
- data/lib/taxjar/order.rb +1 -1
- data/lib/taxjar/refund.rb +1 -1
- data/lib/taxjar/shipping.rb +3 -2
- data/lib/taxjar/tax.rb +2 -2
- data/lib/taxjar/version.rb +1 -1
- data/spec/taxjar/api/order_spec.rb +5 -0
- data/spec/taxjar/api/refund_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd133d25374b0e81e58a96fdb951329848e577a5
|
4
|
+
data.tar.gz: da271f53ff9fdd4eef5123da7fcf320ae78b99fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e996b3715a70f75c10b8a7048c1049c949c55fe8e4d1f9e06c0d81b1b8d5765692bc0778ff7bdae1822b18f0ae7c501f1cb00024a44cab23d1951a6e3f9ea867
|
7
|
+
data.tar.gz: f1ce3c2e1a23462cd7a9f6f44c08b45a3b827a364ca2a4c24066513843a644a77ceeea306959232ec6f69c9463cc1183bf778f49b7540ce842f90b36109f642a
|
data/lib/taxjar/breakdown.rb
CHANGED
@@ -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
|
-
|
8
|
-
|
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, :
|
6
|
-
:county_tax_rate, :city_taxable_amount, :city_tax_rate, :
|
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
data/lib/taxjar/refund.rb
CHANGED
data/lib/taxjar/shipping.rb
CHANGED
@@ -2,8 +2,9 @@ require 'taxjar/base'
|
|
2
2
|
|
3
3
|
module Taxjar
|
4
4
|
class Shipping < Taxjar::Base
|
5
|
-
attr_reader :
|
6
|
-
|
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, :
|
6
|
-
|
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
|
|
data/lib/taxjar/version.rb
CHANGED
@@ -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
|