Class: PlentyClient::Item::Variation::SalesPrice
- Inherits:
-
Object
- Object
- PlentyClient::Item::Variation::SalesPrice
- Defined in:
- lib/plenty_client/item/variation/sales_price.rb
Constant Summary collapse
- BASE_PATH =
'/items/{itemId}/variations/{variationId}'
- PLURAL_PATH =
BASE_PATH + '/variation_sales_prices'
- SINGULAR_PATH =
PLURAL_PATH + '/{priceId}'
- BULK_PATH =
'/items/variations/variation_sales_prices'
Class Method Summary collapse
- .bulk_update(body = {}) ⇒ Object
- .create(item_id, variation_id, body = {}) ⇒ Object
- .destroy(item_id, variation_id, price_id) ⇒ Object
- .find(item_id, variation_id, price_id, headers = {}, &block) ⇒ Object
- .list(item_id, variation_id, headers = {}, &block) ⇒ Object
- .update(item_id, variation_id, price_id, body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.bulk_update(body = {}) ⇒ Object
38 39 40 |
# File 'lib/plenty_client/item/variation/sales_price.rb', line 38 def bulk_update(body = {}) put(BULK_PATH, body) end |
.create(item_id, variation_id, body = {}) ⇒ Object
26 27 28 |
# File 'lib/plenty_client/item/variation/sales_price.rb', line 26 def create(item_id, variation_id, body = {}) post(build_endpoint(PLURAL_PATH, item: item_id, variation: variation_id), body) end |
.destroy(item_id, variation_id, price_id) ⇒ Object
34 35 36 |
# File 'lib/plenty_client/item/variation/sales_price.rb', line 34 def destroy(item_id, variation_id, price_id) delete(build_endpoint(SINGULAR_PATH, item: item_id, variation: variation_id, price: price_id)) end |
.find(item_id, variation_id, price_id, headers = {}, &block) ⇒ Object
21 22 23 24 |
# File 'lib/plenty_client/item/variation/sales_price.rb', line 21 def find(item_id, variation_id, price_id, headers = {}, &block) get(build_endpoint(SINGULAR_PATH, item: item_id, variation: variation_id, price: price_id), headers, &block) end |
.list(item_id, variation_id, headers = {}, &block) ⇒ Object
16 17 18 19 |
# File 'lib/plenty_client/item/variation/sales_price.rb', line 16 def list(item_id, variation_id, headers = {}, &block) get(build_endpoint(PLURAL_PATH, item: item_id, variation: variation_id), headers, &block) end |
.update(item_id, variation_id, price_id, body = {}) ⇒ Object
30 31 32 |
# File 'lib/plenty_client/item/variation/sales_price.rb', line 30 def update(item_id, variation_id, price_id, body = {}) put(build_endpoint(SINGULAR_PATH, item: item_id, variation: variation_id, price: price_id), body) end |