Skip to content

Commit 98e2af8

Browse files
Fix rubocop
1 parent 23a015d commit 98e2af8

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

lib/beyond_api/resources/products.rb

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# frozen_string_literal: true
22

3-
require 'beyond_api/utils'
3+
require "beyond_api/utils"
44

55
module BeyondApi
6-
autoload :ProductAttachments, 'beyond_api/resources/products/attachments'
7-
autoload :ProductAvailability, 'beyond_api/resources/products/availability'
8-
autoload :ProductCrossSells, 'beyond_api/resources/products/cross_sells'
9-
autoload :ProductCustomAttributes, 'beyond_api/resources/products/custom_attributes'
10-
autoload :ProductImages, 'beyond_api/resources/products/images'
11-
autoload :ProductSearches, 'beyond_api/resources/products/searches'
12-
autoload :ProductVariationProperties, 'beyond_api/resources/products/variation_properties'
13-
autoload :ProductVideos, 'beyond_api/resources/products/videos'
6+
autoload :ProductAttachments, "beyond_api/resources/products/attachments"
7+
autoload :ProductAvailability, "beyond_api/resources/products/availability"
8+
autoload :ProductCrossSells, "beyond_api/resources/products/cross_sells"
9+
autoload :ProductCustomAttributes, "beyond_api/resources/products/custom_attributes"
10+
autoload :ProductImages, "beyond_api/resources/products/images"
11+
autoload :ProductSearches, "beyond_api/resources/products/searches"
12+
autoload :ProductVariationProperties, "beyond_api/resources/products/variation_properties"
13+
autoload :ProductVideos, "beyond_api/resources/products/videos"
1414

1515
class Products < Base
1616
include BeyondApi::ProductAttachments
@@ -43,7 +43,7 @@ class Products < Base
4343
# @products = session.products.all(size: 100, page: 0)
4444
#
4545
def all(params = {})
46-
handle_all_request('/products', :products, params)
46+
handle_all_request("/products", :products, params)
4747
end
4848

4949
#
@@ -166,7 +166,7 @@ def all(params = {})
166166
# @product = session.products.create(body)
167167
#
168168
def create(body)
169-
response, status = BeyondApi::Request.post(@session, '/products', body)
169+
response, status = BeyondApi::Request.post(@session, "/products", body)
170170

171171
handle_response(response, status)
172172
end
@@ -271,14 +271,13 @@ def update(product_id, body)
271271
# session.products.assign_variation_images_differentiator("f205294b-17dc-4f75-8b5e-5df72abb96df", "491fedf4-37a9-4bcf-98b8-cff2f82879b7")
272272
#
273273
def assign_variation_attribute_as_differentiator(product_id, variation_attribute_id)
274-
response, status = BeyondApi::Request.post(@session,
275-
"/products/#{product_id}/variation-attributes/#{variation_attribute_id}/make-differentiator")
274+
response, status = BeyondApi::Request.post(@session, "/products/#{product_id}/variation-attributes/#{variation_attribute_id}/make-differentiator")
276275

277276
handle_response(response, status, respond_with_true: true)
278277
end
279278

280-
alias create_variation create
281-
alias find_variation find
282-
alias update_variation update
279+
alias_method :create_variation, :create
280+
alias_method :find_variation, :find
281+
alias_method :update_variation, :update
283282
end
284283
end

0 commit comments

Comments
 (0)