Class: Telnyx::Resources::Portouts::Comments
- Inherits:
-
Object
- Object
- Telnyx::Resources::Portouts::Comments
- Defined in:
- lib/telnyx/resources/portouts/comments.rb
Overview
Number portout operations
Instance Method Summary collapse
-
#create(id, body: nil, request_options: {}) ⇒ Telnyx::Models::Portouts::CommentCreateResponse
Creates a comment on a portout request.
-
#initialize(client:) ⇒ Comments
constructor
private
A new instance of Comments.
-
#list(id, request_options: {}) ⇒ Telnyx::Models::Portouts::CommentListResponse
Returns a list of comments for a portout request.
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.
55 56 57 |
# File 'lib/telnyx/resources/portouts/comments.rb', line 55 def initialize(client:) @client = client end |
Instance Method Details
#create(id, body: nil, request_options: {}) ⇒ Telnyx::Models::Portouts::CommentCreateResponse
Creates a comment on a portout request.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/telnyx/resources/portouts/comments.rb', line 21 def create(id, params = {}) parsed, = Telnyx::Portouts::CommentCreateParams.dump_request(params) @client.request( method: :post, path: ["portouts/%1$s/comments", id], body: parsed, model: Telnyx::Models::Portouts::CommentCreateResponse, options: ) end |
#list(id, request_options: {}) ⇒ Telnyx::Models::Portouts::CommentListResponse
Returns a list of comments for a portout request.
43 44 45 46 47 48 49 50 |
# File 'lib/telnyx/resources/portouts/comments.rb', line 43 def list(id, params = {}) @client.request( method: :get, path: ["portouts/%1$s/comments", id], model: Telnyx::Models::Portouts::CommentListResponse, options: params[:request_options] ) end |