plenty_client 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/README.md +9 -36
  4. data/Rakefile +3 -3
  5. data/lib/plenty_client.rb +8 -5
  6. data/lib/plenty_client/accounting.rb +2 -2
  7. data/lib/plenty_client/authentication.rb +2 -2
  8. data/lib/plenty_client/authorization.rb +2 -2
  9. data/lib/plenty_client/basket.rb +2 -2
  10. data/lib/plenty_client/basket/item.rb +2 -2
  11. data/lib/plenty_client/category.rb +6 -7
  12. data/lib/plenty_client/category/branch.rb +2 -2
  13. data/lib/plenty_client/category/template.rb +3 -3
  14. data/lib/plenty_client/comment.rb +3 -3
  15. data/lib/plenty_client/config.rb +3 -1
  16. data/lib/plenty_client/endpoint.rb +74 -68
  17. data/lib/plenty_client/item.rb +7 -2
  18. data/lib/plenty_client/item/attribute.rb +3 -3
  19. data/lib/plenty_client/item/attribute/name.rb +12 -20
  20. data/lib/plenty_client/item/attribute/value.rb +13 -18
  21. data/lib/plenty_client/item/attribute/value_name.rb +12 -12
  22. data/lib/plenty_client/item/barcode.rb +3 -3
  23. data/lib/plenty_client/item/cross_selling.rb +3 -3
  24. data/lib/plenty_client/item/image.rb +6 -6
  25. data/lib/plenty_client/item/image/availability.rb +10 -10
  26. data/lib/plenty_client/item/image/name.rb +14 -24
  27. data/lib/plenty_client/item/manufacturer.rb +4 -4
  28. data/lib/plenty_client/item/manufacturer/commission.rb +3 -3
  29. data/lib/plenty_client/item/property.rb +3 -3
  30. data/lib/plenty_client/item/property/market_reference.rb +11 -11
  31. data/lib/plenty_client/item/property/name.rb +12 -17
  32. data/lib/plenty_client/item/property_group.rb +3 -3
  33. data/lib/plenty_client/item/property_group_name.rb +8 -10
  34. data/lib/plenty_client/item/sales_price.rb +3 -4
  35. data/lib/plenty_client/item/shipping_profile.rb +6 -6
  36. data/lib/plenty_client/item/unit.rb +3 -4
  37. data/lib/plenty_client/item/unit_name.rb +12 -11
  38. data/lib/plenty_client/item/variation.rb +10 -4
  39. data/lib/plenty_client/item/variation/barcode.rb +3 -3
  40. data/lib/plenty_client/item/variation/bundle.rb +14 -16
  41. data/lib/plenty_client/item/variation/category.rb +8 -10
  42. data/lib/plenty_client/item/variation/client.rb +3 -3
  43. data/lib/plenty_client/item/variation/default_category.rb +3 -3
  44. data/lib/plenty_client/item/variation/description.rb +3 -3
  45. data/lib/plenty_client/item/variation/image.rb +5 -4
  46. data/lib/plenty_client/item/variation/market.rb +3 -3
  47. data/lib/plenty_client/item/variation/market_ident_number.rb +3 -3
  48. data/lib/plenty_client/item/variation/sales_price.rb +13 -17
  49. data/lib/plenty_client/item/variation/sku.rb +12 -15
  50. data/lib/plenty_client/item/variation/stock.rb +3 -3
  51. data/lib/plenty_client/item/variation/supplier.rb +12 -15
  52. data/lib/plenty_client/item/variation/warehouse.rb +6 -5
  53. data/lib/plenty_client/item/variation_property.rb +3 -3
  54. data/lib/plenty_client/item/variation_property_value.rb +10 -14
  55. data/lib/plenty_client/item_set.rb +4 -4
  56. data/lib/plenty_client/item_set/component.rb +15 -22
  57. data/lib/plenty_client/item_set/config.rb +3 -2
  58. data/lib/plenty_client/order.rb +5 -4
  59. data/lib/plenty_client/order/contact_wish.rb +2 -3
  60. data/lib/plenty_client/order/coupon_code.rb +5 -7
  61. data/lib/plenty_client/order/coupon_code/contact.rb +4 -6
  62. data/lib/plenty_client/order/coupon_code/validation.rb +4 -6
  63. data/lib/plenty_client/order/currency.rb +2 -3
  64. data/lib/plenty_client/order/date.rb +3 -4
  65. data/lib/plenty_client/order/item.rb +3 -3
  66. data/lib/plenty_client/order/item/date.rb +2 -2
  67. data/lib/plenty_client/order/item/property.rb +2 -2
  68. data/lib/plenty_client/order/item/serial_number.rb +3 -3
  69. data/lib/plenty_client/order/property.rb +2 -3
  70. data/lib/plenty_client/order/referrer.rb +2 -3
  71. data/lib/plenty_client/order/shipping.rb +2 -3
  72. data/lib/plenty_client/order/shipping/country.rb +2 -2
  73. data/lib/plenty_client/order/shipping/information.rb +3 -3
  74. data/lib/plenty_client/order/shipping/package.rb +4 -4
  75. data/lib/plenty_client/order/shipping/profile.rb +2 -2
  76. data/lib/plenty_client/order/shipping/service_provider.rb +2 -2
  77. data/lib/plenty_client/request.rb +121 -98
  78. data/lib/plenty_client/sales_price/account.rb +2 -3
  79. data/lib/plenty_client/sales_price/country.rb +2 -2
  80. data/lib/plenty_client/sales_price/currency.rb +2 -2
  81. data/lib/plenty_client/sales_price/customer_class.rb +2 -2
  82. data/lib/plenty_client/sales_price/name.rb +4 -4
  83. data/lib/plenty_client/sales_price/online_store.rb +2 -3
  84. data/lib/plenty_client/sales_price/referrer.rb +3 -2
  85. data/lib/plenty_client/version.rb +1 -1
  86. metadata +2 -2
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Client
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_CLIENTS_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -24,7 +24,7 @@ module PlentyClient
24
24
  variation: variation_id), body)
25
25
  end
26
26
 
27
- def delete(item_id, variation_id, marketplace_id)
27
+ def destroy(item_id, variation_id, marketplace_id)
28
28
  delete(build_endpoint("#{ITEM_VARIATION_CLIENTS_PATH}#{DELETE_ITEM_VARIATIONS_CLIENTS}",
29
29
  item: item_id,
30
30
  variation: variation_id,
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class DefaultCategory
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_DEFAULT_CATEGORY_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -32,7 +32,7 @@ module PlentyClient
32
32
  variation: variation_id), body)
33
33
  end
34
34
 
35
- def delete(item_id, variation_id, marketplace_id)
35
+ def destroy(item_id, variation_id, marketplace_id)
36
36
  delete(build_endpoint("#{ITEM_VARIATION_DEFAULT_CATEGORY_PATH}#{DELETE_ITEM_VARIATIONS_DEFAULT_CATEGORY}",
37
37
  item: item_id,
38
38
  variation: variation_id,
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Description
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_DESCRIPTION_BASE_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -40,7 +40,7 @@ module PlentyClient
40
40
  lang: lang), body)
41
41
  end
42
42
 
43
- def delete(item_id, variation_id, lang)
43
+ def destroy(item_id, variation_id, lang)
44
44
  delete(build_endpoint("#{ITEM_VARIATION_DESCRIPTION_BASE_PATH}#{DELETE_ITEM_VARIATIONS_DESCRIPTION}",
45
45
  item: item_id,
46
46
  variation: variation_id,
@@ -2,8 +2,9 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Image
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
+
7
8
  ITEM_IMAGE_BASE_PATH = '/items/{itemId}'.freeze
8
9
 
9
10
  LIST_IMAGES_IMAGE_LINKS = '/images/{imageId}/variation_images'.freeze
@@ -11,7 +12,7 @@ module PlentyClient
11
12
  GET_ITEM_IMAGES = '/variation_images'.freeze
12
13
  UPDATE_ITEM_IMAGES = '/variations/{variationId}/variation_images'.freeze
13
14
  DELETE_ITEM_IMAGES = '/variations/{variationId}/variation_images/{imageId}'.freeze
14
-
15
+
15
16
  class << self
16
17
  def list_images_image_links(item_id, image_id, headers = {}, &block)
17
18
  get(build_endpoint("#{ITEM_IMAGE_BASE_PATH}#{LIST_IMAGES_IMAGE_LINKS}",
@@ -36,7 +37,7 @@ module PlentyClient
36
37
  variation: variation_id), body)
37
38
  end
38
39
 
39
- def delete(item_id, variation_id, image_id)
40
+ def destroy(item_id, variation_id, image_id)
40
41
  delete(build_endpoint("#{ITEM_IMAGE_BASE_PATH}#{DELETE_ITEM_IMAGES}",
41
42
  item: item_id,
42
43
  variation: variation_id,
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Market
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_MARKETS_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -24,7 +24,7 @@ module PlentyClient
24
24
  variation: variation_id), body)
25
25
  end
26
26
 
27
- def delete(item_id, variation_id, marketplace_id)
27
+ def destroy(item_id, variation_id, marketplace_id)
28
28
  delete(build_endpoint("#{ITEM_VARIATION_MARKETS_PATH}#{DELETE_ITEM_VARIATIONS_MARKETS}",
29
29
  item: item_id,
30
30
  variation: variation_id,
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class MarketIdentNumber
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_MARKET_IDENT_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -40,7 +40,7 @@ module PlentyClient
40
40
  market_ident_number: market_ident_number_id), body)
41
41
  end
42
42
 
43
- def delete(item_id, variation_id, market_ident_number_id)
43
+ def destroy(item_id, variation_id, market_ident_number_id)
44
44
  delete(build_endpoint("#{ITEM_VARIATION_MARKET_IDENT_PATH}#{DELETE_ITEM_VARIATIONS_MARKET_IDENT}",
45
45
  item: item_id,
46
46
  variation: variation_id,
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class SalesPrice
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_SALES_PRICES_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -16,35 +16,31 @@ module PlentyClient
16
16
  class << self
17
17
  def list(item_id, variation_id, headers = {}, &block)
18
18
  get(build_endpoint("#{ITEM_VARIATION_SALES_PRICES_PATH}#{LIST_ITEM_VARIATIONS_SALES_PRICES}",
19
- item: item_id,
20
- variation: variation_id), headers, &block)
19
+ item: item_id, variation: variation_id),
20
+ headers, &block)
21
21
  end
22
22
 
23
23
  def find(item_id, variation_id, price_id, headers = {}, &block)
24
24
  get(build_endpoint("#{ITEM_VARIATION_SALES_PRICES_PATH}#{GET_ITEM_VARIATIONS_SALES_PRICES}",
25
- item: item_id,
26
- variation: variation_id,
27
- price: price_id), headers, &block)
25
+ item: item_id, variation: variation_id, price: price_id),
26
+ headers, &block)
28
27
  end
29
28
 
30
29
  def create(item_id, variation_id, body = {})
31
30
  post(build_endpoint("#{ITEM_VARIATION_SALES_PRICES_PATH}#{CREATE_ITEM_VARIATIONS_SALES_PRICES}",
32
- item: item_id,
33
- variation: variation_id), body)
31
+ item: item_id, variation: variation_id),
32
+ body)
34
33
  end
35
34
 
36
- def update(item_id, variation_id, price_id. body = {})
35
+ def update(item_id, variation_id, price_id, body = {})
37
36
  put(build_endpoint("#{ITEM_VARIATION_SALES_PRICES_PATH}#{UPDATE_ITEM_VARIATIONS_SALES_PRICES}",
38
- item: item_id,
39
- variation: variation_id,
40
- price: price_id), body)
37
+ item: item_id, variation: variation_id, price: price_id),
38
+ body)
41
39
  end
42
40
 
43
- def delete(item_id, variation_id, price_id)
41
+ def destroy(item_id, variation_id, price_id)
44
42
  delete(build_endpoint("#{ITEM_VARIATION_SALES_PRICES_PATH}#{DELETE_ITEM_VARIATIONS_SALES_PRICES}",
45
- item: item_id,
46
- variation: variation_id,
47
- price: price_id))
43
+ item: item_id, variation: variation_id, price: price_id))
48
44
  end
49
45
  end
50
46
  end
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Sku
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_SKU_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -16,34 +16,31 @@ module PlentyClient
16
16
  class << self
17
17
  def list(item_id, variation_id, headers = {}, &block)
18
18
  get(build_endpoint("#{ITEM_VARIATION_SKU_PATH}#{LIST_ITEM_VARIATIONS_SKU}",
19
- item: item_id,
20
- variation: variation_id), headers, &block)
19
+ item: item_id, variation: variation_id),
20
+ headers, &block)
21
21
  end
22
22
 
23
23
  def find(item_id, variation_id, sku_id, headers = {}, &block)
24
24
  get(build_endpoint("#{ITEM_VARIATION_SKU_PATH}#{GET_ITEM_VARIATIONS_SKU}",
25
- item: item_id,
26
- variation: variation_id,
27
- sku: sku_id), headers, &block)
25
+ item: item_id, variation: variation_id, sku: sku_id),
26
+ headers, &block)
28
27
  end
29
28
 
30
29
  def create(item_id, variation_id, body = {})
31
30
  post(build_endpoint("#{ITEM_VARIATION_SKU_PATH}#{CREATE_ITEM_VARIATIONS_SKU}",
32
- item: item_id,
33
- variation: variation_id), body)
31
+ item: item_id, variation: variation_id),
32
+ body)
34
33
  end
35
34
 
36
35
  def update(item_id, variation_id, sku_id, body = {})
37
36
  put(build_endpoint("#{ITEM_VARIATION_SKU_PATH}#{CREATE_ITEM_VARIATIONS_SKU}",
38
- item: item_id,
39
- variation: variation_id), body)
37
+ item: item_id, variation: variation_id, sku: sku_id),
38
+ body)
40
39
  end
41
40
 
42
- def delete(item_id, variation_id, sku_id)
41
+ def destroy(item_id, variation_id, sku_id)
43
42
  delete(build_endpoint("#{ITEM_VARIATION_SKU_PATH}#{DELETE_ITEM_VARIATIONS_SKU}",
44
- item: item_id,
45
- variation: variation_id,
46
- sku: sku_id))
43
+ item: item_id, variation: variation_id, sku: sku_id))
47
44
  end
48
45
  end
49
46
  end
@@ -2,10 +2,10 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Stock
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
- ITEM_VARIATION_STOCK_PATH = '/items/{itemId}/variations/{variationId}'.freeze
8
+ ITEM_VARIATION_STOCK_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
10
10
  LIST_ITEM_VARIATIONS_STOCK = '/stock'.freeze
11
11
  LIST_ITEM_VARIATIONS_STOCK_STORAGE_LOCATIONS = '/stock/storageLocations'.freeze
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Supplier
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_SUPPLIER_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -16,34 +16,31 @@ module PlentyClient
16
16
  class << self
17
17
  def list(item_id, variation_id, headers = {}, &block)
18
18
  get(build_endpoint("#{ITEM_VARIATION_SUPPLIER_PATH}#{LIST_ITEM_VARIATIONS_SUPPLIER}",
19
- item: item_id,
20
- variation: variation_id), headers, &block)
19
+ item: item_id, variation: variation_id),
20
+ headers, &block)
21
21
  end
22
22
 
23
23
  def find(item_id, variation_id, supplier_id, headers = {}, &block)
24
24
  get(build_endpoint("#{ITEM_VARIATION_SUPPLIER_PATH}#{GET_ITEM_VARIATIONS_SUPPLIER}",
25
- item: item_id,
26
- variation: variation_id,
27
- supplier: supplier_id), headers, &block)
25
+ item: item_id, variation: variation_id, supplier: supplier_id),
26
+ headers, &block)
28
27
  end
29
28
 
30
29
  def create(item_id, variation_id, body = {})
31
30
  post(build_endpoint("#{ITEM_VARIATION_SUPPLIER_PATH}#{CREATE_ITEM_VARIATIONS_SUPPLIER}",
32
- item: item_id,
33
- variation: variation_id), body)
31
+ item: item_id, variation: variation_id),
32
+ body)
34
33
  end
35
34
 
36
35
  def update(item_id, variation_id, supplier_id, body = {})
37
36
  put(build_endpoint("#{ITEM_VARIATION_SUPPLIER_PATH}#{CREATE_ITEM_VARIATIONS_SUPPLIER}",
38
- item: item_id,
39
- variation: variation_id), body)
37
+ item: item_id, variation: variation_id, supplier: supplier_id),
38
+ body)
40
39
  end
41
40
 
42
- def delete(item_id, variation_id, supplier_id)
41
+ def destroy(item_id, variation_id, supplier_id)
43
42
  delete(build_endpoint("#{ITEM_VARIATION_SUPPLIER_PATH}#{DELETE_ITEM_VARIATIONS_SUPPLIER}",
44
- item: item_id,
45
- variation: variation_id,
46
- supplier: supplier_id))
43
+ item: item_id, variation: variation_id, supplier: supplier_id))
47
44
  end
48
45
  end
49
46
  end
@@ -2,8 +2,8 @@ module PlentyClient
2
2
  module Item
3
3
  module Variation
4
4
  class Warehouse
5
- extend PlentyClient::Endpoint
6
- extend PlentyClient::Request
5
+ include PlentyClient::Endpoint
6
+ include PlentyClient::Request
7
7
 
8
8
  ITEM_VARIATION_WAREHOUSE_PATH = '/items/{itemId}/variations/{variationId}'.freeze
9
9
 
@@ -35,11 +35,12 @@ module PlentyClient
35
35
 
36
36
  def update(item_id, variation_id, warehouse_id, body = {})
37
37
  put(build_endpoint("#{ITEM_VARIATION_WAREHOUSE_PATH}#{CREATE_ITEM_VARIATIONS_WAREHOUSE}",
38
- item: item_id,
39
- variation: variation_id), body)
38
+ item: item_id,
39
+ variation: variation_id,
40
+ warehouse: warehouse_id), body)
40
41
  end
41
42
 
42
- def delete(item_id, variation_id, warehouse_id)
43
+ def destroy(item_id, variation_id, warehouse_id)
43
44
  delete(build_endpoint("#{ITEM_VARIATION_WAREHOUSE_PATH}#{DELETE_ITEM_VARIATIONS_WAREHOUSE}",
44
45
  item: item_id,
45
46
  variation: variation_id,
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module Item
3
3
  class VariationProperty
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  LIST_ALL_VARIATION_PROPERTIES = '/items/{itemId}/variation_properties'.freeze
8
8
  GET_VARIATION_PROPERTY = '/items/{itemId}/variation_properties/{variationId}'.freeze
@@ -27,7 +27,7 @@ module PlentyClient
27
27
  put(build_endpoint(UPDATE_VARIATION_PROPERTY, item: item_id, variation: variation_id), headers)
28
28
  end
29
29
 
30
- def delete(item_id, variation_id)
30
+ def destroy(item_id, variation_id)
31
31
  delete(build_endpoint(DELETE_VARIATION_PROPERTY, item: item_id, variation: variation_id))
32
32
  end
33
33
  end
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module Item
3
3
  class VariationPropertyValue
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  VARIATION_PROPERTY_VALUE_BASE_PATH = '/items/{itemId}/variation_properties/{variationId}'.freeze
8
8
 
@@ -15,14 +15,13 @@ module PlentyClient
15
15
  class << self
16
16
  def list(headers = {}, &block)
17
17
  get(build_endpoint("#{VARIATION_PROPERTY_VALUE_BASE_PATH}#{LIST_ALL_VARIATION_PROPERTY_VALUES}"),
18
- headers, &block)
18
+ headers, &block)
19
19
  end
20
20
 
21
21
  def find(item_id, variation_id, property_id, headers = {}, &block)
22
- get(build_endpoint("#{VARIATION_PROPERTY_VALUE_BASE_PATH}#{GET_VARIATION_PROPERTY}"),
23
- item: item_id,
24
- variation: variation_id,
25
- property: property_id), headers, &block)
22
+ get(build_endpoint("#{VARIATION_PROPERTY_VALUE_BASE_PATH}#{GET_VARIATION_PROPERTY}",
23
+ item: item_id, variation: variation_id, property: property_id),
24
+ headers, &block)
26
25
  end
27
26
 
28
27
  def create(body = {})
@@ -31,16 +30,13 @@ module PlentyClient
31
30
 
32
31
  def update(item_id, variation_id, property_id, body = {})
33
32
  put(build_endpoint("#{VARIATION_PROPERTY_VALUE_BASE_PATH}#{UPDATE_VARIATION_PROPERTY_VALUES}",
34
- item: item_id,
35
- variation: variation_id,
36
- property: property_id), body)
33
+ item: item_id, variation: variation_id, property: property_id),
34
+ body)
37
35
  end
38
36
 
39
- def delete(item_id, variation_id, property_id)
37
+ def destroy(item_id, variation_id, property_id)
40
38
  delete(build_endpoint("#{VARIATION_PROPERTY_VALUE_BASE_PATH}#{DELETE_VARIATION_PROPERTY_VALUES}",
41
- item: item_id,
42
- variation: variation_id,
43
- property: property_id))
39
+ item: item_id, variation: variation_id, property: property_id))
44
40
  end
45
41
  end
46
42
  end
@@ -1,7 +1,7 @@
1
1
  module PlentyClient
2
2
  module ItemSet
3
- extend PlentyClient::Endpoint
4
- extend PlentyClient::Request
3
+ include PlentyClient::Endpoint
4
+ include PlentyClient::Request
5
5
 
6
6
  LIST_ITEM_SETS = '/item_sets'.freeze
7
7
  GET_ITEM_SET = '/item_sets/{itemSetId}'.freeze
@@ -32,11 +32,11 @@ module PlentyClient
32
32
  put(build_endpoint(UPDATE_ITEM_SETS), body)
33
33
  end
34
34
 
35
- def delete(item_set_id, body = {})
35
+ def destroy(item_set_id, body = {})
36
36
  put(build_endpoint(DELETE_ITEM_SET, item_set: item_set_id), body)
37
37
  end
38
38
 
39
- def delete_sets(body = {})
39
+ def destroy_sets(body = {})
40
40
  put(build_endpoint(DELETE_ITEM_SETS), body)
41
41
  end
42
42
  end
@@ -1,52 +1,45 @@
1
1
  module PlentyClient
2
2
  module ItemSet
3
3
  class Component
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
+
6
7
  LIST_ITEM_SET_COMPONENT = '/item_sets/{itemSetId}/components/{componentId}'.freeze
7
8
  LIST_ITEM_SETS_COMPONENT = '/item_sets/{itemSetId}/components'.freeze
8
9
  CREATE_ITEM_SET_COMPONENTS = '/item_sets/{itemSetId}/components'.freeze
9
10
  UPDATE_ITEM_SET_COMPONENT = '/item_sets/{itemSetId}/components/{componentId}'.freeze
10
11
  UPDATE_ITEM_SETS_COMPONENTS = '/item_sets/{itemSetId}/components'.freeze
11
- DELETE_ITEM_SET_COMPONENT = '/item_sets/{itemSetId}/components/{componentId}'.freeze
12
- DELETE_ITEM_SETS_COMPONENTS = '/item_sets/{itemSetId}/components'.freeze
12
+ DELETE_ITEM_SET_COMPONENT = '/item_sets/{itemSetId}/components/{componentId}'.freeze
13
+ DELETE_ITEM_SETS_COMPONENTS = '/item_sets/{itemSetId}/components'.freeze
13
14
 
14
15
  class << self
15
16
  def list_item_set_component(item_set_id, component_id, headers = {}, &block)
16
- get(build_endpoint(LIST_ITEM_SET_COMPONENT,
17
- item_set: item_set_id,
18
- component: component_id), headers, &block)
17
+ get(build_endpoint(LIST_ITEM_SET_COMPONENT, item_set: item_set_id, component: component_id),
18
+ headers, &block)
19
19
  end
20
20
 
21
21
  def list_item_sets_components(item_set_id, headers = {}, &block)
22
- get(build_endpoint(LIST_ITEM_SETS_COMPONENT,
23
- item_set: item_set_id), headers, &block)
24
-
22
+ get(build_endpoint(LIST_ITEM_SETS_COMPONENT, item_set: item_set_id), headers, &block)
23
+ end
25
24
 
26
25
  def create(item_set_id, body = {})
27
26
  post(build_endpoint(CREATE_ITEM_SET_COMPONENTS, item_set: item_set_id), body)
28
27
  end
29
28
 
30
29
  def update_item_set_component(item_set_id, component_id, body = {})
31
- put(build_endpoint(UPDATE_ITEM_SET_COMPONENT,
32
- item_set: item_set_id,
33
- component: component_id), body)
30
+ put(build_endpoint(UPDATE_ITEM_SET_COMPONENT, item_set: item_set_id, component: component_id), body)
34
31
  end
35
32
 
36
33
  def update_item_sets_components(item_set_id, body = {})
37
- put(build_endpoint(UPDATE_ITEM_SETS_COMPONENTS,
38
- item_set: item_set_id), body)
34
+ put(build_endpoint(UPDATE_ITEM_SETS_COMPONENTS, item_set: item_set_id), body)
39
35
  end
40
36
 
41
- def delete_item_set_component(item_set_id, component_id, body = {})
42
- delete(build_endpoint(DELETE_ITEM_SET_COMPONENT,
43
- item_set: item_set_id,
44
- component: component_id), body)
37
+ def destroy_item_set_component(item_set_id, component_id, body = {})
38
+ delete(build_endpoint(DELETE_ITEM_SET_COMPONENT, item_set: item_set_id, component: component_id), body)
45
39
  end
46
40
 
47
- def delete_item_sets_components(item_set_id, body = {})
48
- delete(build_endpoint(DELETE_ITEM_SETS_COMPONENTS,
49
- item_set: item_set_id), body)
41
+ def destroy_item_sets_components(item_set_id, body = {})
42
+ delete(build_endpoint(DELETE_ITEM_SETS_COMPONENTS, item_set: item_set_id), body)
50
43
  end
51
44
  end
52
45
  end