Class: Telnyx::Resources::Dir::Comments
- Inherits:
-
Object
- Object
- Telnyx::Resources::Dir::Comments
- Defined in:
- lib/telnyx/resources/dir/comments.rb
Overview
Read messages from the Telnyx vetting team and reply with clarifying information.
Instance Method Summary collapse
-
#create(dir_id, content:, parent_comment_id: nil, request_options: {}) ⇒ Telnyx::Models::Dir::CommentCreateResponse
Post a customer comment on a DIR (for example, to respond to reviewer notes).
-
#initialize(client:) ⇒ Comments
constructor
private
A new instance of Comments.
-
#list(dir_id, comment_type: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Dir::CommentListResponse>
Some parameter documentations has been truncated, see Models::Dir::CommentListParams for more details.
Constructor Details
#initialize(client:) ⇒ Comments
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Comments.
75 76 77 |
# File 'lib/telnyx/resources/dir/comments.rb', line 75 def initialize(client:) @client = client end |
Instance Method Details
#create(dir_id, content:, parent_comment_id: nil, request_options: {}) ⇒ Telnyx::Models::Dir::CommentCreateResponse
Post a customer comment on a DIR (for example, to respond to reviewer notes). Send only ‘content` (1–5000 chars) and an optional `parent_comment_id`; the server sets the comment type, visibility, and author automatically. The enterprise is resolved server-side from the DIR id.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/dir/comments.rb', line 27 def create(dir_id, params) parsed, = Telnyx::Dir::CommentCreateParams.dump_request(params) @client.request( method: :post, path: ["dir/%1$s/comments", dir_id], body: parsed, model: Telnyx::Models::Dir::CommentCreateResponse, options: ) end |
#list(dir_id, comment_type: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Dir::CommentListResponse>
Some parameter documentations has been truncated, see Models::Dir::CommentListParams for more details.
List the comments on a DIR. The enterprise is resolved server-side from the DIR id.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/telnyx/resources/dir/comments.rb', line 59 def list(dir_id, params = {}) parsed, = Telnyx::Dir::CommentListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["dir/%1$s/comments", dir_id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::Dir::CommentListResponse, options: ) end |