Module: PlentyClient::Comment
Constant Summary collapse
- FIND_COMMENT =
'/comments/{commentId}'
- LIST_COMMENTS =
'/comments/{referenceType}/{referenceValue}'
- CREATE_COMMENT =
'/comments'
- DELETE_COMMENT =
'/comments/{commentId}'
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
24 25 26 |
# File 'lib/plenty_client/comment.rb', line 24 def create(body = {}) post(CREATE_COMMENT, body) end |
.destroy(cat_id, body = {}) ⇒ Object
28 29 30 |
# File 'lib/plenty_client/comment.rb', line 28 def destroy(cat_id, body = {}) delete(build_endpoint(DELETE_COMMENT, comment: cat_id), body) end |
.find(comment_id, headers = {}, &block) ⇒ Object
20 21 22 |
# File 'lib/plenty_client/comment.rb', line 20 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
14 15 16 17 18 |
# File 'lib/plenty_client/comment.rb', line 14 def list(reference_type, reference_value, headers = {}, &block) get(build_endpoint(LIST_COMMENTS, reference_type: reference_type, reference_value: reference_value), headers, &block) end |