Module: PlentyClient::Comment
Constant Summary collapse
- FIND_COMMENT =
'/comments/{commentId}'.freeze
- LIST_COMMENTS =
'/comments/{referenceType}/{referenceValue}'.freeze
- CREATE_COMMENT =
'/comments'.freeze
- DELETE_COMMENT =
'/comments/{commentId}'.freeze
Class Method Summary collapse
- .create(body = {}) ⇒ Object
- .destroy(cat_id, body = {}) ⇒ Object
- .find(comment_id, headers = {}, &block) ⇒ Object
- .list(reference_type, reference_value, headers = {}, &block) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(body = {}) ⇒ Object
22 23 24 |
# File 'lib/plenty_client/comment.rb', line 22 def create(body = {}) post(CREATE_CATEGORY, body) end |
.destroy(cat_id, body = {}) ⇒ Object
26 27 28 |
# File 'lib/plenty_client/comment.rb', line 26 def destroy(cat_id, body = {}) delete(build_endpoint(DELETE_CATEGORY, comment: cat_id), body) end |
.find(comment_id, headers = {}, &block) ⇒ Object
18 19 20 |
# File 'lib/plenty_client/comment.rb', line 18 def find(comment_id, headers = {}, &block) get(build_endpoint(FIND_COMMENT, comment: comment_id), headers, &block) end |
.list(reference_type, reference_value, headers = {}, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/plenty_client/comment.rb', line 12 def list(reference_type, reference_value, headers = {}, &block) get(build_endpoint(LIST_COMMENTS, reference_type: reference_type, reference_value: reference_value), headers, &block) end |