spree-api-client 0.0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +9 -0
- data/LICENSE.txt +674 -0
- data/README.md +31 -38
- data/lib/spree_client.rb +3 -0
- data/lib/spree_client.rb~ +71 -0
- data/lib/spree_client/api.rb +1 -0
- data/lib/spree_client/api/v1.rb +52 -0
- data/lib/spree_client/api/v1/products.rb +23 -0
- data/lib/spree_client/api/v1/properties.rb +12 -0
- data/lib/spree_client/api/v1/resources.rb +142 -0
- data/lib/spree_client/api/v1/stock_items.rb +27 -0
- data/lib/spree_client/api/v1/stock_locations.rb +33 -0
- data/lib/spree_client/api/v1/stock_movements.rb +16 -0
- data/lib/spree_client/api/v1/taxonomies.rb +12 -0
- data/lib/spree_client/api/v1/variants.rb +13 -0
- data/lib/spree_client/attributes.rb +26 -0
- data/lib/spree_client/models.rb +5 -0
- data/lib/spree_client/models/product.rb +7 -0
- data/lib/spree_client/models/property.rb +6 -0
- data/lib/spree_client/models/stock_item.rb +7 -0
- data/lib/spree_client/models/stock_location.rb +7 -0
- data/lib/spree_client/models/stock_movement.rb +7 -0
- data/lib/spree_client/models/store.rb +7 -0
- data/lib/spree_client/models/taxonomy.rb +5 -0
- data/lib/spree_client/models/variant.rb +7 -0
- metadata +73 -192
- data/.gitignore +0 -17
- data/.ruby-version +0 -1
- data/.travis.yml +0 -11
- data/CONTRIBUTING.md +0 -8
- data/Gemfile +0 -9
- data/LICENSE +0 -22
- data/Rakefile +0 -7
- data/fixtures/cassette_library/addresss.yml +0 -46
- data/fixtures/cassette_library/countries.yml +0 -52
- data/fixtures/cassette_library/orders.yml +0 -48
- data/fixtures/cassette_library/payments.yml +0 -48
- data/fixtures/cassette_library/products.yml +0 -66
- data/fixtures/cassette_library/properties.yml +0 -48
- data/fixtures/cassette_library/request.yml +0 -46
- data/fixtures/cassette_library/return_authorizations.yml +0 -48
- data/fixtures/cassette_library/shipment_ready.yml +0 -46
- data/fixtures/cassette_library/taxonomies.yml +0 -48
- data/fixtures/cassette_library/taxons.yml +0 -48
- data/fixtures/cassette_library/variants.yml +0 -63
- data/fixtures/cassette_library/zones.yml +0 -49
- data/lib/spree-api-client.rb +0 -49
- data/lib/spree-api-client/addresses.rb +0 -15
- data/lib/spree-api-client/connection.rb +0 -31
- data/lib/spree-api-client/countries.rb +0 -15
- data/lib/spree-api-client/error.rb +0 -47
- data/lib/spree-api-client/line_items.rb +0 -19
- data/lib/spree-api-client/orders.rb +0 -32
- data/lib/spree-api-client/payments.rb +0 -43
- data/lib/spree-api-client/products.rb +0 -31
- data/lib/spree-api-client/properties.rb +0 -31
- data/lib/spree-api-client/request.rb +0 -56
- data/lib/spree-api-client/return_authorizations.rb +0 -31
- data/lib/spree-api-client/shipments.rb +0 -15
- data/lib/spree-api-client/taxonomies.rb +0 -31
- data/lib/spree-api-client/taxons.rb +0 -27
- data/lib/spree-api-client/variants.rb +0 -31
- data/lib/spree-api-client/version.rb +0 -7
- data/lib/spree-api-client/zones.rb +0 -31
- data/spec/addresses_spec.rb +0 -12
- data/spec/client_spec.rb +0 -32
- data/spec/countries_spec.rb +0 -12
- data/spec/orders_spec.rb +0 -12
- data/spec/payments_spec.rb +0 -12
- data/spec/products_spec.rb +0 -12
- data/spec/properties_spec.rb +0 -12
- data/spec/return_authorizations_spec.rb +0 -12
- data/spec/shipments_spec.rb +0 -12
- data/spec/spec_helper.rb +0 -10
- data/spec/support/vcr.rb +0 -9
- data/spec/taxonomies_spec.rb +0 -12
- data/spec/taxons_spec.rb +0 -12
- data/spec/variants_spec.rb +0 -12
- data/spec/zones_spec.rb +0 -12
- data/spree-api-client.gemspec +0 -29
@@ -0,0 +1,16 @@
|
|
1
|
+
module SpreeClient
|
2
|
+
module API
|
3
|
+
class V1
|
4
|
+
# Stock Movements
|
5
|
+
# @see SpreeClient::API:V1::Resources
|
6
|
+
class StockMovements < Resources
|
7
|
+
ENDPOINT = '/api/v1/stock_locations/:stock_location_id/stock_movements'
|
8
|
+
RESOURCE = SpreeClient::Models::StockMovement
|
9
|
+
NAME = 'stock_movement'
|
10
|
+
|
11
|
+
def update(_); end
|
12
|
+
def destroy(_); end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module SpreeClient
|
2
|
+
# @see Spree::PermittedAttributes
|
3
|
+
class Attributes
|
4
|
+
PRODUCT = %i[id name description available_on discontinue_on
|
5
|
+
permalink meta_description meta_keywords price sku
|
6
|
+
deleted_at prototype_id option_values_hash weight
|
7
|
+
height width depth shipping_category_id tax_category_id
|
8
|
+
cost_currency cost_price option_type_ids taxon_ids].freeze
|
9
|
+
|
10
|
+
VARIANT = %i[id name presentation cost_price discontinue_on
|
11
|
+
lock_version position track_inventory product_id
|
12
|
+
product option_values_attributes price weight height
|
13
|
+
width depth sku cost_currency options
|
14
|
+
option_value_ids].freeze
|
15
|
+
|
16
|
+
STOCK_LOCATION = %i[name active address1 address2 city zipcode
|
17
|
+
backorderable_default state_name state_id
|
18
|
+
country_id phone propagate_all_variants].freeze
|
19
|
+
|
20
|
+
STOCK_ITEM = %i[stock_location_id variant stock_location backorderable variant_id].freeze
|
21
|
+
|
22
|
+
STOCK_MOVEMENT = %i[id stock_location_id quantity stock_item
|
23
|
+
stock_item_id originator action].freeze
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Stores are different frontends for the same backend.
|
2
|
+
#
|
3
|
+
# @see {https://guides.spreecommerce.org/user/configuration/configuring_multi_stores.html}
|
4
|
+
Store = Struct.new :id, :name, :url,
|
5
|
+
:seo_title, :meta_description, :meta_keywords,
|
6
|
+
:mail_from_address, :default_currency,
|
7
|
+
:facebook, :twitter, :instagram, keyword_init: true
|
metadata
CHANGED
@@ -1,244 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
9
|
-
autorequire:
|
7
|
+
- f
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: httparty
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 0.18.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 0.18.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
28
|
+
name: fast_blank
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
33
|
+
version: '1'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
40
|
+
version: '1'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
42
|
+
name: pry
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.2'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.2'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: multi_json
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '1.4'
|
70
|
-
type: :runtime
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '1.4'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: webmock
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
type: :development
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: vcr
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ! '>='
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: rake
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- - ! '>='
|
45
|
+
- - ">="
|
116
46
|
- !ruby/object:Gem::Version
|
117
47
|
version: '0'
|
118
48
|
type: :development
|
119
49
|
prerelease: false
|
120
50
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
51
|
requirements:
|
123
|
-
- -
|
52
|
+
- - ">="
|
124
53
|
- !ruby/object:Gem::Version
|
125
54
|
version: '0'
|
126
|
-
|
127
|
-
name: rspec
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
|
-
requirements:
|
131
|
-
- - ! '>='
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '0'
|
134
|
-
type: :development
|
135
|
-
prerelease: false
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ! '>='
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
142
|
-
description: A rubygem for interacting with the Spree API
|
55
|
+
description: This is a work in progress!
|
143
56
|
email:
|
144
|
-
-
|
57
|
+
- f@sutty.nl
|
145
58
|
executables: []
|
146
59
|
extensions: []
|
147
|
-
extra_rdoc_files:
|
60
|
+
extra_rdoc_files:
|
61
|
+
- README.md
|
62
|
+
- CHANGELOG.md
|
63
|
+
- LICENSE.txt
|
148
64
|
files:
|
149
|
-
- .
|
150
|
-
- .
|
151
|
-
- .
|
152
|
-
-
|
153
|
-
-
|
154
|
-
-
|
65
|
+
- CHANGELOG.md
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- lib/spree_client.rb
|
69
|
+
- lib/spree_client.rb~
|
70
|
+
- lib/spree_client/api.rb
|
71
|
+
- lib/spree_client/api/v1.rb
|
72
|
+
- lib/spree_client/api/v1/products.rb
|
73
|
+
- lib/spree_client/api/v1/properties.rb
|
74
|
+
- lib/spree_client/api/v1/resources.rb
|
75
|
+
- lib/spree_client/api/v1/stock_items.rb
|
76
|
+
- lib/spree_client/api/v1/stock_locations.rb
|
77
|
+
- lib/spree_client/api/v1/stock_movements.rb
|
78
|
+
- lib/spree_client/api/v1/taxonomies.rb
|
79
|
+
- lib/spree_client/api/v1/variants.rb
|
80
|
+
- lib/spree_client/attributes.rb
|
81
|
+
- lib/spree_client/models.rb
|
82
|
+
- lib/spree_client/models/product.rb
|
83
|
+
- lib/spree_client/models/property.rb
|
84
|
+
- lib/spree_client/models/stock_item.rb
|
85
|
+
- lib/spree_client/models/stock_location.rb
|
86
|
+
- lib/spree_client/models/stock_movement.rb
|
87
|
+
- lib/spree_client/models/store.rb
|
88
|
+
- lib/spree_client/models/taxonomy.rb
|
89
|
+
- lib/spree_client/models/variant.rb
|
90
|
+
homepage: https://0xacab.org/sutty/spree-api-client
|
91
|
+
licenses:
|
92
|
+
- GPL-3.0
|
93
|
+
metadata:
|
94
|
+
bug_tracker_uri: https://0xacab.org/sutty/spree-api-client/issues
|
95
|
+
homepage_uri: https://0xacab.org/sutty/spree-api-client
|
96
|
+
source_code_uri: https://0xacab.org/sutty/spree-api-client
|
97
|
+
changelog_uri: https://0xacab.org/sutty/spree-api-client/-/blob/master/CHANGELOG.md
|
98
|
+
documentation_uri: https://rubydoc.info/gems/spree-api-client
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options:
|
101
|
+
- "--title"
|
102
|
+
- spree-api-client - Spree Ecommerce API client
|
103
|
+
- "--main"
|
155
104
|
- README.md
|
156
|
-
-
|
157
|
-
-
|
158
|
-
-
|
159
|
-
- fixtures/cassette_library/orders.yml
|
160
|
-
- fixtures/cassette_library/payments.yml
|
161
|
-
- fixtures/cassette_library/products.yml
|
162
|
-
- fixtures/cassette_library/properties.yml
|
163
|
-
- fixtures/cassette_library/request.yml
|
164
|
-
- fixtures/cassette_library/return_authorizations.yml
|
165
|
-
- fixtures/cassette_library/shipment_ready.yml
|
166
|
-
- fixtures/cassette_library/taxonomies.yml
|
167
|
-
- fixtures/cassette_library/taxons.yml
|
168
|
-
- fixtures/cassette_library/variants.yml
|
169
|
-
- fixtures/cassette_library/zones.yml
|
170
|
-
- lib/spree-api-client.rb
|
171
|
-
- lib/spree-api-client/addresses.rb
|
172
|
-
- lib/spree-api-client/connection.rb
|
173
|
-
- lib/spree-api-client/countries.rb
|
174
|
-
- lib/spree-api-client/error.rb
|
175
|
-
- lib/spree-api-client/line_items.rb
|
176
|
-
- lib/spree-api-client/orders.rb
|
177
|
-
- lib/spree-api-client/payments.rb
|
178
|
-
- lib/spree-api-client/products.rb
|
179
|
-
- lib/spree-api-client/properties.rb
|
180
|
-
- lib/spree-api-client/request.rb
|
181
|
-
- lib/spree-api-client/return_authorizations.rb
|
182
|
-
- lib/spree-api-client/shipments.rb
|
183
|
-
- lib/spree-api-client/taxonomies.rb
|
184
|
-
- lib/spree-api-client/taxons.rb
|
185
|
-
- lib/spree-api-client/variants.rb
|
186
|
-
- lib/spree-api-client/version.rb
|
187
|
-
- lib/spree-api-client/zones.rb
|
188
|
-
- spec/addresses_spec.rb
|
189
|
-
- spec/client_spec.rb
|
190
|
-
- spec/countries_spec.rb
|
191
|
-
- spec/orders_spec.rb
|
192
|
-
- spec/payments_spec.rb
|
193
|
-
- spec/products_spec.rb
|
194
|
-
- spec/properties_spec.rb
|
195
|
-
- spec/return_authorizations_spec.rb
|
196
|
-
- spec/shipments_spec.rb
|
197
|
-
- spec/spec_helper.rb
|
198
|
-
- spec/support/vcr.rb
|
199
|
-
- spec/taxonomies_spec.rb
|
200
|
-
- spec/taxons_spec.rb
|
201
|
-
- spec/variants_spec.rb
|
202
|
-
- spec/zones_spec.rb
|
203
|
-
- spree-api-client.gemspec
|
204
|
-
homepage: https://github.com/andrew/spree-api-client
|
205
|
-
licenses: []
|
206
|
-
post_install_message:
|
207
|
-
rdoc_options: []
|
105
|
+
- "--line-numbers"
|
106
|
+
- "--inline-source"
|
107
|
+
- "--quiet"
|
208
108
|
require_paths:
|
209
109
|
- lib
|
210
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
211
|
-
none: false
|
212
111
|
requirements:
|
213
|
-
- -
|
112
|
+
- - ">="
|
214
113
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
114
|
+
version: 2.6.0
|
216
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
116
|
requirements:
|
219
|
-
- -
|
117
|
+
- - ">="
|
220
118
|
- !ruby/object:Gem::Version
|
221
119
|
version: '0'
|
222
120
|
requirements: []
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
test_files:
|
229
|
-
- spec/addresses_spec.rb
|
230
|
-
- spec/client_spec.rb
|
231
|
-
- spec/countries_spec.rb
|
232
|
-
- spec/orders_spec.rb
|
233
|
-
- spec/payments_spec.rb
|
234
|
-
- spec/products_spec.rb
|
235
|
-
- spec/properties_spec.rb
|
236
|
-
- spec/return_authorizations_spec.rb
|
237
|
-
- spec/shipments_spec.rb
|
238
|
-
- spec/spec_helper.rb
|
239
|
-
- spec/support/vcr.rb
|
240
|
-
- spec/taxonomies_spec.rb
|
241
|
-
- spec/taxons_spec.rb
|
242
|
-
- spec/variants_spec.rb
|
243
|
-
- spec/zones_spec.rb
|
244
|
-
has_rdoc:
|
121
|
+
rubygems_version: 3.1.2
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: Spree Ecommerce API client
|
125
|
+
test_files: []
|