beyond_api 0.13.0.pre → 0.14.0.pre

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
  SHA256:
3
- metadata.gz: be322cd30437303093e481de07cd8e3b8809c381d835b778ca03eccf66f7326f
4
- data.tar.gz: 432767a471613ab986f3ca19c5c8c002673711bea0c71ec0c8048fbf4f8cc50e
3
+ metadata.gz: 7a3232a181c9e98adb48dde14f44f3fbf5cbd148716a4aebfaedd8395f67f1c1
4
+ data.tar.gz: 3165b0482c207a611d5b1c1cfe0631a730c7d23774f0551c34c6e29bfb571134
5
5
  SHA512:
6
- metadata.gz: f8a52e79a30aa30c85388b0d0d034fd49e35ce4896eef7ae0b51316aa7a3c1081ef3b9b564b1ec798be8af4af44d04b6bcefc226579b44138a98d1b463e23a65
7
- data.tar.gz: 98be15b4608be4c35f0e9511cde6f824a2dfd97a292c92e62a24f2980750464a62952e4d84852c367df3258a7bc8036434162252e40993b089fa8fa72ca11dec
6
+ metadata.gz: ba4db6852f6ea76b6b27a5def080dd54b1e2a9767a050cbddfb463eb538deac413b22923f065a1b4da37f828866142acc7173a0242a30ebf80b5e530d0606acf
7
+ data.tar.gz: 3f48e09d7f4a934218fefeff168c67a5aaa097dd502fb8080969748dc8ac612ec7f4444596e3b6f73cfc234b37741063103beace5cfa59375eb6b4a689b5e130
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### v0.14.0.pre
2
+
3
+ * deprecations
4
+ * Remove `Products#assign_variation_images_differentiator`
5
+
6
+ * features
7
+ * Add `Products#assign_variation_attribute_as_differentiator`
8
+
1
9
  ### v0.13.0.pre
2
10
 
3
11
  * features
data/Gemfile.lock CHANGED
@@ -1,42 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- beyond_api (0.13.0.pre)
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.2)
11
- concurrent-ruby (1.1.5)
12
- diff-lcs (1.3)
13
- dotenv (2.7.5)
14
- faker (2.4.0)
15
- i18n (~> 1.6.0)
16
- faraday (0.17.3)
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.6.0)
18
+ i18n (1.8.10)
19
19
  concurrent-ruby (~> 1.0)
20
- method_source (0.9.2)
20
+ method_source (1.0.0)
21
21
  multipart-post (2.1.1)
22
- pry (0.12.2)
23
- coderay (~> 1.1.0)
24
- method_source (~> 0.9.0)
22
+ pry (0.14.0)
23
+ coderay (~> 1.1)
24
+ method_source (~> 1.0)
25
25
  rake (10.5.0)
26
- rspec (3.8.0)
27
- rspec-core (~> 3.8.0)
28
- rspec-expectations (~> 3.8.0)
29
- rspec-mocks (~> 3.8.0)
30
- rspec-core (3.8.2)
31
- rspec-support (~> 3.8.0)
32
- rspec-expectations (3.8.4)
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.8.0)
35
- rspec-mocks (3.8.1)
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.8.0)
38
- rspec-support (3.8.2)
39
- yard (0.9.20)
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 +PUT+ request is used to assign a variation images differentiator for a variation product. The differentiator can be one of the variation attributes defined by the merchant, e.g. name, size, or color.
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/30839efc-47f7-4d55-aa13-aac7532982b6/variation-images-differentiator' -i -X PUT \
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 differentiator [String] the differentiator
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("30839efc-47f7-4d55-aa13-aac7532982b6", "size")
271
+ # session.products.assign_variation_images_differentiator("f205294b-17dc-4f75-8b5e-5df72abb96df", "491fedf4-37a9-4bcf-98b8-cff2f82879b7")
275
272
  #
276
- def assign_variation_images_differentiator(product_id, differentiator)
277
- response, status = BeyondApi::Request.put(@session, "/products/#{product_id}/variation-images-differentiator", differentiator: differentiator)
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 :Images, "beyond_api/resources/variations/images"
7
- autoload :Availability, "beyond_api/resources/variations/availability"
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
@@ -1,3 +1,3 @@
1
1
  module BeyondApi
2
- VERSION = "0.13.0.pre".freeze
2
+ VERSION = "0.14.0.pre".freeze
3
3
  end
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.13.0.pre
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: 2020-10-19 00:00:00.000000000 Z
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.1.2
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