taxjar-ruby 1.7.0 → 1.7.1

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: ef0beb68bc2c8a4918e20e96567d017917657141
4
- data.tar.gz: '0485c1753a51cb65ccd80af337794ea77d07a3ce'
3
+ metadata.gz: b9eb2e7131efcdba8714c438b63ef315fcca25ef
4
+ data.tar.gz: c7b76ae3a307b72a1d0a6c330deb4c5c1a62ac00
5
5
  SHA512:
6
- metadata.gz: e7009cd1589b9c551143d483c05ddc24cfd3e0a2b05782046ef41a4671c8d313f8b1cee4efe61afc8d178903f14bbc2aac18ed8bc523a3a9824487e9b2d9c646
7
- data.tar.gz: cdb219a9e69e4f27cbb1998b9b1563a3e5dc89028effffe0ee44fa2486be9691fe8d3122535dd50f43bb1e6010184bf3bb0c2868febf378e6934a3355de9a917
6
+ metadata.gz: 985a2137521594703c2b5cdcad7e83ed4e7a49d7a9c8045daa9cbe771dc0fe5c9366bd62b50aab3a118124bbf7292355d79264db1cadf510a57242b7ece06ff4
7
+ data.tar.gz: 05d505aa344cf7547232121239e4c10e3f07b520839fc25a1f75984458d8bb90c9d40db71b290308f9fce49f0e5605dd36722bb5ead753701c06af19621ba35b
data/README.md CHANGED
@@ -1,13 +1,12 @@
1
- # TaxJar Ruby Gem [![RubyGems](http://img.shields.io/gem/v/taxjar-ruby.svg?style=flat-square)](https://rubygems.org/gems/taxjar-ruby) [![Build Status](http://img.shields.io/travis/taxjar/taxjar-ruby.svg?style=flat-square)](https://travis-ci.org/taxjar/taxjar-ruby)
1
+ # TaxJar Sales Tax API for Ruby [![RubyGems](http://img.shields.io/gem/v/taxjar-ruby.svg?style=flat-square)](https://rubygems.org/gems/taxjar-ruby) [![Build Status](http://img.shields.io/travis/taxjar/taxjar-ruby.svg?style=flat-square)](https://travis-ci.org/taxjar/taxjar-ruby)
2
2
 
3
3
  <a href="http://developers.taxjar.com"><img src="http://www.taxjar.com/img/TJ_logo_color_office_png.png" alt="TaxJar" width="220"></a>
4
4
 
5
- A Ruby interface to the TaxJar Sales Tax API. TaxJar makes sales tax filing easier for online sellers and merchants.
6
- See local jurisdictional tax reports, get payment reminders, and more. You can use our API to access TaxJar API endpoints,
7
- which can get information on sales tax rates, categories or upload transactions.
5
+ A Ruby interface to the TaxJar [Sales Tax API](https://developers.taxjar.com/api/reference/). TaxJar makes sales tax filing easier for online sellers and merchants.
6
+ See local jurisdictional tax reports, get payment reminders, and more. You can use our API to access TaxJar API endpoints, which can get information on sales tax rates, categories or upload transactions.
8
7
 
9
- * This wrapper supports 100% of the [TaxJar API Version 2](http://developers.taxjar.com/api/#introduction)
10
- * Data returned from API calls are mapped into Ruby objects
8
+ * This wrapper supports 100% of [SmartCalcs v2](http://developers.taxjar.com/api/#introduction)
9
+ * Data returned from API calls are mapped to Ruby objects
11
10
 
12
11
  ## Supported Ruby Versions
13
12
 
@@ -15,12 +14,12 @@ Ruby 1.9.3 or greater
15
14
 
16
15
  ## Gem Dependencies
17
16
 
18
- Installing this gem also installs the following gems:
17
+ Installing this gem also bundles the following dependencies:
19
18
 
20
- * [http](https://github.com/httprb/http.rb) Fast Ruby HTTP client with a chainable API and full streaming support.
21
- * [addressable](https://github.com/sporkmonger/addressable) Replacement for the URI implementation that is part of Ruby's standard library. It more closely conforms to the relevant RFCs and adds support for IRIs and URI templates.
22
- * [memoizable](https://github.com/dkubb/memoizable) Memoize method return values.
23
- * [model_attribute](https://github.com/yammer/model_attribute) Type casted attributes for non-ActiveRecord models. [Forked](https://github.com/taxjar/model_attribute) to handle floats and more types.
19
+ * [http](https://github.com/httprb/http.rb) - Fast Ruby HTTP client with a chainable API and full streaming support.
20
+ * [addressable](https://github.com/sporkmonger/addressable) - Replacement for the URI implementation that is part of Ruby's standard library. It more closely conforms to the relevant RFCs and adds support for IRIs and URI templates.
21
+ * [memoizable](https://github.com/dkubb/memoizable) - Memoize method return values.
22
+ * [model_attribute](https://github.com/yammer/model_attribute) - Type casted attributes for non-ActiveRecord models. [Forked](https://github.com/taxjar/model_attribute) to handle floats and more types.
24
23
 
25
24
  ## Installation
26
25
 
@@ -42,11 +41,16 @@ Or install it yourself as:
42
41
  $ gem install taxjar-ruby
43
42
  ```
44
43
 
45
- ## Quick Start Guide
44
+ ## Authentication
46
45
 
47
- First, [get an API key from TaxJar](https://app.taxjar.com/api_sign_up/plus/). Copy and paste in your API key:
46
+ [Generate an API token from TaxJar](https://app.taxjar.com/api_sign_up/). Copy and paste your API token when instantiating a new client:
48
47
 
49
- You are now ready to use TaxJar!
48
+ ```ruby
49
+ require 'taxjar'
50
+ client = Taxjar::Client.new(api_key: 'YOUR_API_TOKEN')
51
+ ```
52
+
53
+ You're now ready to use TaxJar! [Check out our quickstart guide](https://developers.taxjar.com/api/guides/ruby/#ruby-quickstart) to get up and running quickly.
50
54
 
51
55
  ## Usage
52
56
 
@@ -946,7 +950,7 @@ $ rspec
946
950
 
947
951
  ## More Information
948
952
 
949
- More information can be found on the [TaxJar developer site](http://developers.taxjar.com).
953
+ More information can be found on [TaxJar Developers](http://developers.taxjar.com).
950
954
 
951
955
  ## License
952
956
 
@@ -8,6 +8,7 @@ module Taxjar
8
8
  attribute :quantity, :integer
9
9
  attribute :product_identifier, :string
10
10
  attribute :description, :string
11
+ attribute :product_tax_code, :string
11
12
  attribute :unit_price, :float
12
13
  attribute :discount, :float
13
14
  attribute :sales_tax, :float
@@ -10,7 +10,7 @@ module Taxjar
10
10
  end
11
11
 
12
12
  def patch
13
- 0
13
+ 1
14
14
  end
15
15
 
16
16
  def pre
@@ -22,6 +22,7 @@
22
22
  "quantity": 1,
23
23
  "product_identifier": "12-34243-9",
24
24
  "description": "Fuzzy Widget",
25
+ "product_tax_code": "20010",
25
26
  "unit_price": "15.0",
26
27
  "discount": "0.0",
27
28
  "sales_tax": "0.95"
@@ -23,6 +23,7 @@
23
23
  "quantity": 1,
24
24
  "product_identifier": "12-34243-9",
25
25
  "description": "Fuzzy Widget",
26
+ "product_tax_code": "20010",
26
27
  "unit_price": "15.0",
27
28
  "discount": "0.0",
28
29
  "sales_tax": "0.95"
@@ -89,7 +89,9 @@ describe Taxjar::API::Order do
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')
92
+ expect(order.line_items[0].product_tax_code).to eq('20010')
92
93
  expect(order.line_items[0].unit_price).to eq(15.0)
94
+ expect(order.line_items[0].discount).to eq(0.0)
93
95
  expect(order.line_items[0].sales_tax).to eq(0.95)
94
96
  end
95
97
  end
@@ -112,7 +114,9 @@ describe Taxjar::API::Order do
112
114
  :quantity => 1,
113
115
  :product_identifier => '12-34243-9',
114
116
  :description => 'Fuzzy Widget',
117
+ :product_tax_code => '20010',
115
118
  :unit_price => 15.0,
119
+ :discount => 0.0,
116
120
  :sales_tax => 0.95}]
117
121
  }
118
122
  end
@@ -149,7 +153,9 @@ describe Taxjar::API::Order do
149
153
  expect(order.line_items[0].quantity).to eq(1)
150
154
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
151
155
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
156
+ expect(order.line_items[0].product_tax_code).to eq('20010')
152
157
  expect(order.line_items[0].unit_price).to eq(15.0)
158
+ expect(order.line_items[0].discount).to eq(0.0)
153
159
  expect(order.line_items[0].sales_tax).to eq(0.95)
154
160
  end
155
161
  end
@@ -166,7 +172,8 @@ describe Taxjar::API::Order do
166
172
  :line_items => [{:id => 1,
167
173
  :quantity => 1,
168
174
  :product_identifier => '12-34243-0',
169
- :description => 'Heavy Widget',
175
+ :description => 'Heavy Widget',
176
+ :product_tax_code => '20010',
170
177
  :unit_price => 15.0,
171
178
  :discount => 0.0,
172
179
  :sales_tax => 0.95}]
@@ -205,7 +212,9 @@ describe Taxjar::API::Order do
205
212
  expect(order.line_items[0].quantity).to eq(1)
206
213
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
207
214
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
215
+ expect(order.line_items[0].product_tax_code).to eq('20010')
208
216
  expect(order.line_items[0].unit_price).to eq(15.0)
217
+ expect(order.line_items[0].discount).to eq(0.0)
209
218
  expect(order.line_items[0].sales_tax).to eq(0.95)
210
219
  end
211
220
  end
@@ -249,7 +258,9 @@ describe Taxjar::API::Order do
249
258
  expect(order.line_items[0].quantity).to eq(1)
250
259
  expect(order.line_items[0].product_identifier).to eq('12-34243-9')
251
260
  expect(order.line_items[0].description).to eq('Fuzzy Widget')
261
+ expect(order.line_items[0].product_tax_code).to eq('20010')
252
262
  expect(order.line_items[0].unit_price).to eq(15.0)
263
+ expect(order.line_items[0].discount).to eq(0.0)
253
264
  expect(order.line_items[0].sales_tax).to eq(0.95)
254
265
  end
255
266
  end
@@ -90,6 +90,7 @@ describe Taxjar::API::Refund do
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')
93
+ expect(refund.line_items[0].product_tax_code).to eq('20010')
93
94
  expect(refund.line_items[0].unit_price).to eq(15.0)
94
95
  expect(refund.line_items[0].discount).to eq(0.0)
95
96
  expect(refund.line_items[0].sales_tax).to eq(0.95)
@@ -115,7 +116,9 @@ describe Taxjar::API::Refund do
115
116
  :line_items => [{:quantity => 1,
116
117
  :product_identifier => '12-34243-9',
117
118
  :description => 'Fuzzy Widget',
119
+ :product_tax_code => '20010',
118
120
  :unit_price => 15.0,
121
+ :discount => 0.0,
119
122
  :sales_tax => 0.95}]
120
123
  }
121
124
  end
@@ -153,6 +156,7 @@ describe Taxjar::API::Refund do
153
156
  expect(refund.line_items[0].quantity).to eq(1)
154
157
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
155
158
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
159
+ expect(refund.line_items[0].product_tax_code).to eq('20010')
156
160
  expect(refund.line_items[0].unit_price).to eq(15.0)
157
161
  expect(refund.line_items[0].discount).to eq(0.0)
158
162
  expect(refund.line_items[0].sales_tax).to eq(0.95)
@@ -172,7 +176,9 @@ describe Taxjar::API::Refund do
172
176
  :line_items => [{:quantity => 1,
173
177
  :product_identifier => '12-34243-9',
174
178
  :description => 'Heavy Widget',
179
+ :product_tax_code => '20010',
175
180
  :unit_price => 15.0,
181
+ :discount => 0.0,
176
182
  :sales_tax => 0.95}]
177
183
  }
178
184
  end
@@ -210,6 +216,7 @@ describe Taxjar::API::Refund do
210
216
  expect(refund.line_items[0].quantity).to eq(1)
211
217
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
212
218
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
219
+ expect(refund.line_items[0].product_tax_code).to eq('20010')
213
220
  expect(refund.line_items[0].unit_price).to eq(15.0)
214
221
  expect(refund.line_items[0].discount).to eq(0.0)
215
222
  expect(refund.line_items[0].sales_tax).to eq(0.95)
@@ -256,6 +263,7 @@ describe Taxjar::API::Refund do
256
263
  expect(refund.line_items[0].quantity).to eq(1)
257
264
  expect(refund.line_items[0].product_identifier).to eq('12-34243-9')
258
265
  expect(refund.line_items[0].description).to eq('Fuzzy Widget')
266
+ expect(refund.line_items[0].product_tax_code).to eq('20010')
259
267
  expect(refund.line_items[0].unit_price).to eq(15.0)
260
268
  expect(refund.line_items[0].discount).to eq(0.0)
261
269
  expect(refund.line_items[0].sales_tax).to eq(0.95)
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.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TaxJar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-20 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable