beyond_api 0.13.0.pre → 0.14.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +25 -25
- data/lib/beyond_api/resources/products.rb +7 -10
- data/lib/beyond_api/resources/variations.rb +2 -2
- data/lib/beyond_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a3232a181c9e98adb48dde14f44f3fbf5cbd148716a4aebfaedd8395f67f1c1
|
4
|
+
data.tar.gz: 3165b0482c207a611d5b1c1cfe0631a730c7d23774f0551c34c6e29bfb571134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba4db6852f6ea76b6b27a5def080dd54b1e2a9767a050cbddfb463eb538deac413b22923f065a1b4da37f828866142acc7173a0242a30ebf80b5e530d0606acf
|
7
|
+
data.tar.gz: 3f48e09d7f4a934218fefeff168c67a5aaa097dd502fb8080969748dc8ac612ec7f4444596e3b6f73cfc234b37741063103beace5cfa59375eb6b4a689b5e130
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,42 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
beyond_api (0.
|
4
|
+
beyond_api (0.14.0.pre)
|
5
5
|
faraday (~> 0.15)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
coderay (1.1.
|
11
|
-
concurrent-ruby (1.1.
|
12
|
-
diff-lcs (1.
|
13
|
-
dotenv (2.7.
|
14
|
-
faker (2.
|
15
|
-
i18n (
|
16
|
-
faraday (0.17.
|
10
|
+
coderay (1.1.3)
|
11
|
+
concurrent-ruby (1.1.8)
|
12
|
+
diff-lcs (1.4.4)
|
13
|
+
dotenv (2.7.6)
|
14
|
+
faker (2.17.0)
|
15
|
+
i18n (>= 1.6, < 2)
|
16
|
+
faraday (0.17.4)
|
17
17
|
multipart-post (>= 1.2, < 3)
|
18
|
-
i18n (1.
|
18
|
+
i18n (1.8.10)
|
19
19
|
concurrent-ruby (~> 1.0)
|
20
|
-
method_source (0.
|
20
|
+
method_source (1.0.0)
|
21
21
|
multipart-post (2.1.1)
|
22
|
-
pry (0.
|
23
|
-
coderay (~> 1.1
|
24
|
-
method_source (~>
|
22
|
+
pry (0.14.0)
|
23
|
+
coderay (~> 1.1)
|
24
|
+
method_source (~> 1.0)
|
25
25
|
rake (10.5.0)
|
26
|
-
rspec (3.
|
27
|
-
rspec-core (~> 3.
|
28
|
-
rspec-expectations (~> 3.
|
29
|
-
rspec-mocks (~> 3.
|
30
|
-
rspec-core (3.
|
31
|
-
rspec-support (~> 3.
|
32
|
-
rspec-expectations (3.
|
26
|
+
rspec (3.10.0)
|
27
|
+
rspec-core (~> 3.10.0)
|
28
|
+
rspec-expectations (~> 3.10.0)
|
29
|
+
rspec-mocks (~> 3.10.0)
|
30
|
+
rspec-core (3.10.1)
|
31
|
+
rspec-support (~> 3.10.0)
|
32
|
+
rspec-expectations (3.10.1)
|
33
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
-
rspec-support (~> 3.
|
35
|
-
rspec-mocks (3.
|
34
|
+
rspec-support (~> 3.10.0)
|
35
|
+
rspec-mocks (3.10.2)
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-support (3.
|
39
|
-
yard (0.9.
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-support (3.10.2)
|
39
|
+
yard (0.9.26)
|
40
40
|
|
41
41
|
PLATFORMS
|
42
42
|
ruby
|
@@ -253,28 +253,25 @@ module BeyondApi
|
|
253
253
|
end
|
254
254
|
|
255
255
|
#
|
256
|
-
# A +
|
256
|
+
# A +POST+ request is used to assign a variation attribute as the variation images differentiator for a variation product.
|
257
257
|
#
|
258
258
|
# @beyond_api.scopes +prod:u+
|
259
259
|
#
|
260
|
-
# $ curl 'https://api-shop.beyondshop.cloud/api/products/
|
260
|
+
# $ curl 'https://api-shop.beyondshop.cloud/api/products/f205294b-17dc-4f75-8b5e-5df72abb96df/variation-attributes/491fedf4-37a9-4bcf-98b8-cff2f82879b7/make-differentiator' -i -X POST \
|
261
261
|
# -H 'Content-Type: application/hal+json' \
|
262
262
|
# -H 'Accept: application/hal+json' \
|
263
|
-
# -H 'Authorization: Bearer <Access token>'
|
264
|
-
# -d '{
|
265
|
-
# "differentiator" : "size"
|
266
|
-
# }'
|
263
|
+
# -H 'Authorization: Bearer <Access token>'
|
267
264
|
#
|
268
265
|
# @param product_id [String] the product UUID
|
269
|
-
# @param
|
266
|
+
# @param variation_attribute_id [String] the variation attribute UUID
|
270
267
|
#
|
271
268
|
# @return [true]
|
272
269
|
#
|
273
270
|
# @example
|
274
|
-
# session.products.assign_variation_images_differentiator("
|
271
|
+
# session.products.assign_variation_images_differentiator("f205294b-17dc-4f75-8b5e-5df72abb96df", "491fedf4-37a9-4bcf-98b8-cff2f82879b7")
|
275
272
|
#
|
276
|
-
def
|
277
|
-
response, status = BeyondApi::Request.
|
273
|
+
def assign_variation_attribute_as_differentiator(product_id, variation_attribute_id)
|
274
|
+
response, status = BeyondApi::Request.post(@session, "/products/#{product_id}/variation-attributes/#{variation_attribute_id}/make-differentiator")
|
278
275
|
|
279
276
|
handle_response(response, status, respond_with_true: true)
|
280
277
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
require "beyond_api/utils"
|
4
4
|
|
5
5
|
module BeyondApi
|
6
|
-
autoload :
|
7
|
-
autoload :
|
6
|
+
autoload :VariationImages, "beyond_api/resources/variations/images"
|
7
|
+
autoload :VariationAvailability, "beyond_api/resources/variations/availability"
|
8
8
|
|
9
9
|
class Variations < Base
|
10
10
|
include BeyondApi::VariationImages
|
data/lib/beyond_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-04-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: 1.3.1
|
199
199
|
requirements: []
|
200
|
-
rubygems_version: 3.
|
200
|
+
rubygems_version: 3.0.3
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Ruby client to access the Beyond API
|