Class: Telnyx::Resources::Portouts::Comments

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/portouts/comments.rb

Overview

Number portout operations

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

  • id (String)

    Portout id

  • body (String)

    Comment to post on this portout request

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



21
22
23
24
25
26
27
28
29
30
# File 'lib/telnyx/resources/portouts/comments.rb', line 21

def create(id, params = {})
  parsed, options = Telnyx::Portouts::CommentCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["portouts/%1$s/comments", id],
    body: parsed,
    model: Telnyx::Models::Portouts::CommentCreateResponse,
    options: options
  )
end

#list(id, request_options: {}) ⇒ Telnyx::Models::Portouts::CommentListResponse

Returns a list of comments for a portout request.

Parameters:

Returns:

See Also:



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