Class: PlentyClient::Item::Variation::Description
- Inherits:
-
Object
- Object
- PlentyClient::Item::Variation::Description
show all
- Extended by:
- Endpoint, Request
- Defined in:
- lib/plenty_client/item/variation/description.rb
Constant Summary
collapse
- ITEM_VARIATION_DESCRIPTION_BASE_PATH =
'/items/{itemId}/variations/{variationId}'.freeze
- LIST_ITEM_VARIATION_DESCRIPTIONS =
'/descriptions'.freeze
- GET_ITEM_VARIATIONS_DESCRIPTION =
'/descriptions/{lang}'.freeze
- CREATE_ITEM_VARIATIONS_DESCRIPTION =
'/descriptions'.freeze
- UPDATE_ITEM_VARIATIONS_DESCRIPTION =
'/descriptions/{lang}'.freeze
- DELETE_ITEM_VARIATIONS_DESCRIPTION =
'/descriptions/{lang}'.freeze
Class Method Summary
collapse
-
.create(item_id, variation_id, body = {}) ⇒ Object
-
.delete(item_id, variation_id, lang) ⇒ Object
-
.find(item_id, variation_id, lang, headers = {}) ⇒ Object
-
.list(item_id, variation_id, headers = {}, &block) ⇒ Object
-
.update(item_id, variation_id, lang, body = {}) ⇒ Object
Methods included from Endpoint
build_endpoint, routes
Methods included from Request
delete, get, patch, post, put, request
Class Method Details
.create(item_id, variation_id, body = {}) ⇒ Object
30
31
32
33
34
|
# File 'lib/plenty_client/item/variation/description.rb', line 30
def create(item_id, variation_id, body = {})
post(build_endpoint("#{ITEM_VARIATION_DESCRIPTION_BASE_PATH}#{CREATE_ITEM_VARIATIONS_DESCRIPTION}",
item: item_id,
variation: variation_id), body)
end
|
.delete(item_id, variation_id, lang) ⇒ Object
43
44
45
46
47
48
|
# File 'lib/plenty_client/item/variation/description.rb', line 43
def delete(item_id, variation_id, lang)
delete(build_endpoint("#{ITEM_VARIATION_DESCRIPTION_BASE_PATH}#{DELETE_ITEM_VARIATIONS_DESCRIPTION}",
item: item_id,
variation: variation_id,
lang: lang))
end
|
.find(item_id, variation_id, lang, headers = {}) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/plenty_client/item/variation/description.rb', line 23
def find(item_id, variation_id, lang, = {})
get(build_endpoint("#{ITEM_VARIATION_DESCRIPTION_BASE_PATH}#{GET_ITEM_VARIATIONS_DESCRIPTION}",
item: item_id,
variation: variation_id,
lang: lang), , &block)
end
|
.list(item_id, variation_id, headers = {}, &block) ⇒ Object
17
18
19
20
21
|
# File 'lib/plenty_client/item/variation/description.rb', line 17
def list(item_id, variation_id, = {}, &block)
get(build_endpoint("#{ITEM_VARIATION_DESCRIPTION_BASE_PATH}#{LIST_ITEM_VARIATION_DESCRIPTIONS}",
item: item_id,
variation: variation_id), , &block)
end
|
.update(item_id, variation_id, lang, body = {}) ⇒ Object
36
37
38
39
40
41
|
# File 'lib/plenty_client/item/variation/description.rb', line 36
def update(item_id, variation_id, lang, body = {})
put(build_endpoint("#{ITEM_VARIATION_DESCRIPTION_BASE_PATH}#{UPDATE_ITEM_VARIATIONS_DESCRIPTION}",
item: item_id,
variation: variation_id,
lang: lang), body)
end
|