cq-spree-api-client 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +11 -0
  6. data/CONTRIBUTING.md +8 -0
  7. data/Gemfile +3 -0
  8. data/LICENSE +22 -0
  9. data/README.md +61 -0
  10. data/Rakefile +7 -0
  11. data/fixtures/cassette_library/Spree_API_Client_Addresses/address/should_load_address.yml +59 -0
  12. data/fixtures/cassette_library/Spree_API_Client_Addresses/update_address/should_update_address.yml +61 -0
  13. data/fixtures/cassette_library/Spree_API_Client_Shipments/shipment_ready/should_set_a_shipment_to_ready.yml +55 -0
  14. data/fixtures/cassette_library/Spree_API_Client_Shipments/shipment_ready/should_set_a_shipment_to_ship.yml +56 -0
  15. data/fixtures/cassette_library/countries.yml +62 -0
  16. data/fixtures/cassette_library/orders.yml +55 -0
  17. data/fixtures/cassette_library/payments.yml +48 -0
  18. data/fixtures/cassette_library/products.yml +241 -0
  19. data/fixtures/cassette_library/properties.yml +56 -0
  20. data/fixtures/cassette_library/request.yml +241 -0
  21. data/fixtures/cassette_library/return_authorizations.yml +48 -0
  22. data/fixtures/cassette_library/stock_items.yml +1950 -0
  23. data/fixtures/cassette_library/taxonomies.yml +62 -0
  24. data/fixtures/cassette_library/taxons.yml +60 -0
  25. data/fixtures/cassette_library/variants.yml +58 -0
  26. data/fixtures/cassette_library/zones.yml +49 -0
  27. data/lib/spree-api-client.rb +65 -0
  28. data/lib/spree-api-client/addresses.rb +20 -0
  29. data/lib/spree-api-client/adjustments.rb +23 -0
  30. data/lib/spree-api-client/checkouts.rb +27 -0
  31. data/lib/spree-api-client/connection.rb +27 -0
  32. data/lib/spree-api-client/countries.rb +15 -0
  33. data/lib/spree-api-client/credit_cards.rb +20 -0
  34. data/lib/spree-api-client/error.rb +47 -0
  35. data/lib/spree-api-client/line_items.rb +19 -0
  36. data/lib/spree-api-client/option_types.rb +31 -0
  37. data/lib/spree-api-client/option_values.rb +31 -0
  38. data/lib/spree-api-client/orders.rb +56 -0
  39. data/lib/spree-api-client/payments.rb +44 -0
  40. data/lib/spree-api-client/products.rb +31 -0
  41. data/lib/spree-api-client/promotions.rb +15 -0
  42. data/lib/spree-api-client/properties.rb +31 -0
  43. data/lib/spree-api-client/request.rb +59 -0
  44. data/lib/spree-api-client/return_authorizations.rb +31 -0
  45. data/lib/spree-api-client/shipments.rb +15 -0
  46. data/lib/spree-api-client/stock_items.rb +31 -0
  47. data/lib/spree-api-client/stock_locations.rb +31 -0
  48. data/lib/spree-api-client/taxonomies.rb +31 -0
  49. data/lib/spree-api-client/taxons.rb +36 -0
  50. data/lib/spree-api-client/users.rb +31 -0
  51. data/lib/spree-api-client/variants.rb +31 -0
  52. data/lib/spree-api-client/version.rb +7 -0
  53. data/lib/spree-api-client/zones.rb +31 -0
  54. data/spec/addresses_spec.rb +21 -0
  55. data/spec/client_spec.rb +32 -0
  56. data/spec/countries_spec.rb +12 -0
  57. data/spec/orders_spec.rb +12 -0
  58. data/spec/payments_spec.rb +12 -0
  59. data/spec/products_spec.rb +12 -0
  60. data/spec/properties_spec.rb +12 -0
  61. data/spec/return_authorizations_spec.rb +12 -0
  62. data/spec/shipments_spec.rb +19 -0
  63. data/spec/spec_helper.rb +80 -0
  64. data/spec/stock_items_spec.rb +12 -0
  65. data/spec/support/vcr.rb +9 -0
  66. data/spec/taxonomies_spec.rb +12 -0
  67. data/spec/taxons_spec.rb +12 -0
  68. data/spec/variants_spec.rb +12 -0
  69. data/spec/zones_spec.rb +12 -0
  70. data/spree-api-client.gemspec +33 -0
  71. metadata +268 -0
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::API::Client::Taxonomies do
4
+ vcr_options = { :cassette_name => "taxonomies" }
5
+ describe 'taxonomies', vcr: vcr_options do
6
+ it 'should load taxonomies' do
7
+ client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
+ taxonomies = client.taxonomies
9
+ taxonomies.should be_a(Array)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::API::Client::Taxons do
4
+ vcr_options = { :cassette_name => "taxons" }
5
+ describe 'taxons', vcr: vcr_options do
6
+ it 'should load taxons' do
7
+ client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
+ taxons = client.taxonomy_taxons(1)
9
+ taxons.should be_a(Array)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::API::Client::Variants do
4
+ vcr_options = { :cassette_name => "variants" }
5
+ describe 'variants', vcr: vcr_options do
6
+ it 'should load variants' do
7
+ client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
+ variants = client.variants(1)
9
+ variants.should be_a(Array)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::API::Client::Zones do
4
+ vcr_options = { :cassette_name => "zones" }
5
+ describe 'zones', vcr: vcr_options do
6
+ it 'should load zones' do
7
+ client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
+ zones = client.zones
9
+ zones.should be_a(Array)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'spree-api-client/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "cq-spree-api-client"
8
+ gem.version = Spree::API::Client::VERSION
9
+ gem.authors = ["Fabian Oudhaarlem"]
10
+ gem.email = ["fabian@oldharlem.nl"]
11
+ gem.description = %q{A rubygem for interacting with the Spree API}
12
+ gem.summary = %q{A rubygem for interacting with the Spree API}
13
+ gem.homepage = "https://github.com/Oldharlem/spree-api-client"
14
+ gem.license = 'MIT'
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_dependency 'hashie', '~> 3.4'
22
+ gem.add_dependency 'faraday', '~> 0.9'
23
+ gem.add_dependency 'faraday_middleware', '~> 0.9'
24
+
25
+ gem.add_dependency 'multi_json', '~> 1.4'
26
+ gem.add_dependency 'httparty'#, '~> 0.9'
27
+
28
+ gem.add_development_dependency 'webmock'
29
+ gem.add_development_dependency 'vcr'
30
+ gem.add_development_dependency 'rake'
31
+ gem.add_development_dependency 'rspec'
32
+ gem.add_development_dependency 'pry'
33
+ end
metadata ADDED
@@ -0,0 +1,268 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cq-spree-api-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
5
+ platform: ruby
6
+ authors:
7
+ - Fabian Oudhaarlem
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-09-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hashie
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.9'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday_middleware
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.9'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.9'
55
+ - !ruby/object:Gem::Dependency
56
+ name: multi_json
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.4'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: httparty
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: vcr
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: A rubygem for interacting with the Spree API
154
+ email:
155
+ - fabian@oldharlem.nl
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - ".rspec"
162
+ - ".ruby-version"
163
+ - ".travis.yml"
164
+ - CONTRIBUTING.md
165
+ - Gemfile
166
+ - LICENSE
167
+ - README.md
168
+ - Rakefile
169
+ - fixtures/cassette_library/Spree_API_Client_Addresses/address/should_load_address.yml
170
+ - fixtures/cassette_library/Spree_API_Client_Addresses/update_address/should_update_address.yml
171
+ - fixtures/cassette_library/Spree_API_Client_Shipments/shipment_ready/should_set_a_shipment_to_ready.yml
172
+ - fixtures/cassette_library/Spree_API_Client_Shipments/shipment_ready/should_set_a_shipment_to_ship.yml
173
+ - fixtures/cassette_library/countries.yml
174
+ - fixtures/cassette_library/orders.yml
175
+ - fixtures/cassette_library/payments.yml
176
+ - fixtures/cassette_library/products.yml
177
+ - fixtures/cassette_library/properties.yml
178
+ - fixtures/cassette_library/request.yml
179
+ - fixtures/cassette_library/return_authorizations.yml
180
+ - fixtures/cassette_library/stock_items.yml
181
+ - fixtures/cassette_library/taxonomies.yml
182
+ - fixtures/cassette_library/taxons.yml
183
+ - fixtures/cassette_library/variants.yml
184
+ - fixtures/cassette_library/zones.yml
185
+ - lib/spree-api-client.rb
186
+ - lib/spree-api-client/addresses.rb
187
+ - lib/spree-api-client/adjustments.rb
188
+ - lib/spree-api-client/checkouts.rb
189
+ - lib/spree-api-client/connection.rb
190
+ - lib/spree-api-client/countries.rb
191
+ - lib/spree-api-client/credit_cards.rb
192
+ - lib/spree-api-client/error.rb
193
+ - lib/spree-api-client/line_items.rb
194
+ - lib/spree-api-client/option_types.rb
195
+ - lib/spree-api-client/option_values.rb
196
+ - lib/spree-api-client/orders.rb
197
+ - lib/spree-api-client/payments.rb
198
+ - lib/spree-api-client/products.rb
199
+ - lib/spree-api-client/promotions.rb
200
+ - lib/spree-api-client/properties.rb
201
+ - lib/spree-api-client/request.rb
202
+ - lib/spree-api-client/return_authorizations.rb
203
+ - lib/spree-api-client/shipments.rb
204
+ - lib/spree-api-client/stock_items.rb
205
+ - lib/spree-api-client/stock_locations.rb
206
+ - lib/spree-api-client/taxonomies.rb
207
+ - lib/spree-api-client/taxons.rb
208
+ - lib/spree-api-client/users.rb
209
+ - lib/spree-api-client/variants.rb
210
+ - lib/spree-api-client/version.rb
211
+ - lib/spree-api-client/zones.rb
212
+ - spec/addresses_spec.rb
213
+ - spec/client_spec.rb
214
+ - spec/countries_spec.rb
215
+ - spec/orders_spec.rb
216
+ - spec/payments_spec.rb
217
+ - spec/products_spec.rb
218
+ - spec/properties_spec.rb
219
+ - spec/return_authorizations_spec.rb
220
+ - spec/shipments_spec.rb
221
+ - spec/spec_helper.rb
222
+ - spec/stock_items_spec.rb
223
+ - spec/support/vcr.rb
224
+ - spec/taxonomies_spec.rb
225
+ - spec/taxons_spec.rb
226
+ - spec/variants_spec.rb
227
+ - spec/zones_spec.rb
228
+ - spree-api-client.gemspec
229
+ homepage: https://github.com/Oldharlem/spree-api-client
230
+ licenses:
231
+ - MIT
232
+ metadata: {}
233
+ post_install_message:
234
+ rdoc_options: []
235
+ require_paths:
236
+ - lib
237
+ required_ruby_version: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - ">="
240
+ - !ruby/object:Gem::Version
241
+ version: '0'
242
+ required_rubygems_version: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
247
+ requirements: []
248
+ rubygems_version: 3.0.2
249
+ signing_key:
250
+ specification_version: 4
251
+ summary: A rubygem for interacting with the Spree API
252
+ test_files:
253
+ - spec/addresses_spec.rb
254
+ - spec/client_spec.rb
255
+ - spec/countries_spec.rb
256
+ - spec/orders_spec.rb
257
+ - spec/payments_spec.rb
258
+ - spec/products_spec.rb
259
+ - spec/properties_spec.rb
260
+ - spec/return_authorizations_spec.rb
261
+ - spec/shipments_spec.rb
262
+ - spec/spec_helper.rb
263
+ - spec/stock_items_spec.rb
264
+ - spec/support/vcr.rb
265
+ - spec/taxonomies_spec.rb
266
+ - spec/taxons_spec.rb
267
+ - spec/variants_spec.rb
268
+ - spec/zones_spec.rb