taxjar-ruby 1.0.0 → 1.0.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: 2a129c647b66e1054f0438dcd65485090e28b533
4
- data.tar.gz: d5a63ab29627fb0c98deab4e59007712f934d726
3
+ metadata.gz: 87a190a9235c2a2700a2982818d3140c53523d44
4
+ data.tar.gz: 33714a826f407017f66354dd8ee292f1c326842d
5
5
  SHA512:
6
- metadata.gz: 9e2f7ec935c28f4262da4555e1419d399ddf720d5a39f0f12dc370b3f78e0b3f452396ab555e0f5a69476c909af7b98154bd29d61a48b21c6f89e858c5e7b744
7
- data.tar.gz: 5a13e3b0650ecc020f1d028d37aca79dd89af0ae16bad544ac9e3e12a01cbc578d1dbb90b3e6143d59732c3be44a964cc9afbdc108164b80352cecc122d83f58
6
+ metadata.gz: 370543da7f55ea7307e52ed156cb50eb67c6457d6672df96b4564c41e9d5778c17bc4bb8bcca20a0f3ad21bb8a13bbce683b6bd3bca48d773a92b11055376c6d
7
+ data.tar.gz: d68ec3c6c5a678fd61ebe39354d06d2d7e0d68b80147531a039d0ac2a229ba948d62f4eef172cff2acdc7e10b741dc12bf84a77f7995bf103d61368b979287b6
data/README.md CHANGED
@@ -1,168 +1,183 @@
1
- # The Taxjar Ruby Gem
2
- [![Taxjar](http://www.taxjar.com/img/TJ_logo_color_office_png.png)](http://developers.taxjar.com)
1
+ # TaxJar Ruby Gem
3
2
 
4
- A Ruby interface to the Taxjar API. TaxJar makes sales tax filing easier for online sellers and merchants.
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
+
5
+ A Ruby interface to the TaxJar API. TaxJar makes sales tax filing easier for online sellers and merchants.
5
6
  See local jurisdictional tax reports, get payment reminders, and more. You can use our API to access TaxJar API endpoints,
6
7
  which can get information on sales tax rates, categories or upload transactions.
7
8
 
8
- * This wrapper supports 100% of the [Taxjar API Version 2](http://developers.taxjar.com/api/#introduction)
9
+ * This wrapper supports 100% of the [TaxJar API Version 2](http://developers.taxjar.com/api/#introduction)
9
10
  * Data returned from API calls are mapped into Ruby objects
10
11
 
11
-
12
12
  ## Gem Dependencies
13
+
13
14
  Installing this gem also installs the following gems:
14
15
 
15
- * [http](https://github.com/httprb/http.rb) http.rb: a fast Ruby HTTP client with a chainable API and full streaming support
16
- * [addressable](https://github.com/sporkmonger/addressable) Addressable is a 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.
17
- * [memoizable](https://github.com/dkubb/memoizable) Memoize method return values
16
+ * [http](https://github.com/httprb/http.rb) Fast Ruby HTTP client with a chainable API and full streaming support.
17
+ * [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.
18
+ * [memoizable](https://github.com/dkubb/memoizable) Memoize method return values.
18
19
 
19
20
  ## Installation
20
21
 
21
22
  Add this line to your application's Gemfile:
23
+
22
24
  ```ruby
23
- gem 'taxjar-ruby', require: 'taxjar'
25
+ gem 'taxjar-ruby', require: 'taxjar'
24
26
  ```
27
+
25
28
  And then execute:
29
+
26
30
  ```shell
27
- $ bundle install
31
+ $ bundle install
28
32
  ```
33
+
29
34
  Or install it yourself as:
35
+
30
36
  ```shell
31
- $ gem install taxjar-ruby
37
+ $ gem install taxjar-ruby
32
38
  ```
33
- ## Quick Start Guide
34
39
 
35
- First, [get an api key from Taxar][https://app.taxjar.com/api_sign_up/plus/].
40
+ ## Quick Start Guide
36
41
 
37
- Then copy and paste in your API keys:
42
+ First, [get an API key from TaxJar](https://app.taxjar.com/api_sign_up/plus/). Copy and paste in your API key:
38
43
 
39
44
  ```ruby
40
- client = Taxjar::Client.new(api_key: "YOUR KEY")
45
+ client = Taxjar::Client.new(api_key: 'YOUR KEY')
41
46
  ```
42
47
 
43
-
44
- You are ready to use Taxjar.
48
+ You are now ready to use TaxJar!
45
49
 
46
50
  ## Usage
47
51
 
48
52
  ### List all tax categories
49
53
  ```ruby
50
54
  categories = client.categories
51
-
52
55
  ```
56
+
53
57
  ### List tax rates for a location (by zip/postal code)
58
+
54
59
  ```ruby
55
60
  rates = client.rates_for_location('10001')
56
61
  ```
57
62
 
58
63
  ### Calculate Sales tax for an order
64
+
59
65
  ```ruby
60
- order = client.tax_for_order({
61
- :to_country => 'US',
62
- :to_zip => '90002',
63
- :to_city => 'Los Angeles',
64
- :from_country => 'US',
65
- :from_zip => '92093',
66
- :from_city => 'San Diego',
67
- :amount => 16.50,
68
- :shipping => 1.5,
69
- :line_items => [{:quantity => 1,
70
- :product_identifier => '12-34243-9',
71
- :unit_price => 15.0,
72
- :product_tax_code => 31000}]
73
- })
66
+ order = client.tax_for_order({
67
+ :to_country => 'US',
68
+ :to_zip => '90002',
69
+ :to_city => 'Los Angeles',
70
+ :to_state => 'CA',
71
+ :from_country => 'US',
72
+ :from_zip => '92093',
73
+ :from_city => 'San Diego',
74
+ :amount => 16.50,
75
+ :shipping => 1.5,
76
+ :line_items => [{:quantity => 1,
77
+ :product_identifier => '12-34243-9',
78
+ :unit_price => 15.0,
79
+ :product_tax_code => 31000}]
80
+ })
74
81
  ```
75
82
 
76
83
  ### Create order transaction
84
+
77
85
  ```ruby
78
- order = client.create_order({
79
- :transaction_id => '123',
80
- :transaction_date => '2015/05/14',
81
- :to_country => 'US',
82
- :to_zip => '90002',
83
- :to_city => 'Los Angeles',
84
- :to_street => '123 Palm Grove Ln',
85
- :amount => 17.45,
86
- :shipping => 1.5,
87
- :sales_tax => 0.95,
88
- :line_items => [{:quantity => 1,
89
- :product_identifier => '12-34243-9',
90
- :descriptiion => 'Fuzzy Widget',
91
- :unit_price => 15.0,
92
- :sales_tax => 0.95}]
93
- })
86
+ order = client.create_order({
87
+ :transaction_id => '123',
88
+ :transaction_date => '2015/05/14',
89
+ :to_country => 'US',
90
+ :to_zip => '90002',
91
+ :to_state => 'CA',
92
+ :to_city => 'Los Angeles',
93
+ :to_street => '123 Palm Grove Ln',
94
+ :amount => 17.45,
95
+ :shipping => 1.5,
96
+ :sales_tax => 0.95,
97
+ :line_items => [{:quantity => 1,
98
+ :product_identifier => '12-34243-9',
99
+ :description => 'Fuzzy Widget',
100
+ :unit_price => 15.0,
101
+ :sales_tax => 0.95}]
102
+ })
94
103
  ```
95
104
 
96
105
  ### Update order transaction
106
+
97
107
  ```ruby
98
- order = client.update_order({
99
- :transaction_id => '123',
100
- :amount => 17.95,
101
- :shipping => 2.0,
102
- :line_items => [{:quantity => 1,
103
- :product_identifier => '12-34243-0',
104
- :descriptiion => 'Heavy Widget',
105
- :unit_price => 15.0,
106
- :discount => 0.0,
107
- :sales_tax => 0.95}]
108
- })
108
+ order = client.update_order({
109
+ :transaction_id => '123',
110
+ :amount => 17.95,
111
+ :shipping => 2.0,
112
+ :line_items => [{:quantity => 1,
113
+ :product_identifier => '12-34243-0',
114
+ :description => 'Heavy Widget',
115
+ :unit_price => 15.0,
116
+ :discount => 0.0,
117
+ :sales_tax => 0.95}]
118
+ })
109
119
  ```
110
120
 
111
121
  ### Create refund transaction
122
+
112
123
  ```ruby
113
- refund = client.create_refund({
114
- :transaction_id => '321',
115
- :transaction_date => '2015/05/14',
116
- :transaction_reference_id => '123',
117
- :to_country => 'US',
118
- :to_zip => '90002',
119
- :to_state => 'CA',
120
- :to_city => 'Los Angeles',
121
- :to_street => '123 Palm Grove Ln',
122
- :amount => 17.45,
123
- :shipping => 1.5,
124
- :sales_tax => 0.95,
125
- :line_items => [{:quantity => 1,
126
- :product_identifier => '12-34243-9',
127
- :descriptiion => 'Fuzzy Widget',
128
- :unit_price => 15.0,
129
- :sales_tax => 0.95}]
130
- })
124
+ refund = client.create_refund({
125
+ :transaction_id => '321',
126
+ :transaction_date => '2015/05/14',
127
+ :transaction_reference_id => '123',
128
+ :to_country => 'US',
129
+ :to_zip => '90002',
130
+ :to_state => 'CA',
131
+ :to_city => 'Los Angeles',
132
+ :to_street => '123 Palm Grove Ln',
133
+ :amount => 17.45,
134
+ :shipping => 1.5,
135
+ :sales_tax => 0.95,
136
+ :line_items => [{:quantity => 1,
137
+ :product_identifier => '12-34243-9',
138
+ :description => 'Fuzzy Widget',
139
+ :unit_price => 15.0,
140
+ :sales_tax => 0.95}]
141
+ })
131
142
  ```
132
143
 
133
144
  ### Update refund transaction
145
+
134
146
  ```ruby
135
- refund = client.update_refund{
136
- :transaction_id => '321',
137
- :amount => 17.95,
138
- :shipping => 2.0,
139
- :sales_tax => 0.95,
140
- :line_items => [{:quantity => 1,
141
- :product_identifier => '12-34243-9',
142
- :descriptiion => 'Heavy Widget',
143
- :unit_price => 15.0,
144
- :sales_tax => 0.95}]
145
- })
147
+ refund = client.update_refund{
148
+ :transaction_id => '321',
149
+ :amount => 17.95,
150
+ :shipping => 2.0,
151
+ :sales_tax => 0.95,
152
+ :line_items => [{:quantity => 1,
153
+ :product_identifier => '12-34243-9',
154
+ :description => 'Heavy Widget',
155
+ :unit_price => 15.0,
156
+ :sales_tax => 0.95}]
157
+ })
146
158
  ```
159
+
147
160
  ## Tests
148
- An Rspec test suite is available to ensure API functionality:
149
161
 
150
- 1. $ git clone git://github.com/taxjar/taxjar-ruby.git
151
- 2. $ bundle install (installs rspec and other supporting gems, see
152
- [GEMFILE](https://github.com/taxjar/taxjar-ruby/blob/master/Gemfile)
153
- for complete listing)
154
- 3. $ rspec
162
+ An RSpec test suite is available to ensure API functionality:
163
+
164
+ ```shell
165
+ $ git clone git://github.com/taxjar/taxjar-ruby.git
166
+ $ bundle install
167
+ $ rspec
168
+ ```
155
169
 
156
170
  ## More Information
157
- More information can be found on the [Taxjar developer site](https://developers.taxjar.com).
171
+
172
+ More information can be found on the [TaxJar developer site](http://developers.taxjar.com).
158
173
 
159
174
  ## License
160
- Taxjar is released under the [MIT
161
- License](https://github.com/taxjar/taxjar-ruby/blob/master/LICENSE.txt).
175
+
176
+ TaxJar is released under the [MIT License](https://github.com/taxjar/taxjar-ruby/blob/master/LICENSE.txt).
162
177
 
163
178
  ## Support
164
- Bug reports and feature requests should be filed on the [github issue
165
- tracking page](https://github.com/taxjar/taxjar-ruby/issues).
179
+
180
+ Bug reports and feature requests should be filed on the [GitHub issue tracking page](https://github.com/taxjar/taxjar-ruby/issues).
166
181
 
167
182
  ## Contributing
168
183
 
@@ -170,4 +185,4 @@ tracking page](https://github.com/taxjar/taxjar-ruby/issues).
170
185
  2. Create your feature branch (`git checkout -b my-new-feature`)
171
186
  3. Commit your changes (`git commit -am 'Add some feature'`)
172
187
  4. Push to the branch (`git push origin my-new-feature`)
173
- 5. Create new Pull Request
188
+ 5. Create new pull request
@@ -5,7 +5,7 @@ module Taxjar
5
5
  attr_reader :order_total_amount, :amount_to_collect, :has_nexus,
6
6
  :freight_taxable, :tax_source
7
7
 
8
- object_attr_reader Taxjar::Breakdown, :brekdown
8
+ object_attr_reader Taxjar::Breakdown, :breakdown
9
9
 
10
10
  end
11
11
  end
@@ -11,7 +11,7 @@ module Taxjar
11
11
  end
12
12
 
13
13
  def patch
14
- 0
14
+ 1
15
15
  end
16
16
 
17
17
  def pre
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.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TaxJar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-06 00:00:00.000000000 Z
11
+ date: 2015-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable