Class: Telnyx::Resources::Recordings

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/recordings.rb,
lib/telnyx/resources/recordings/actions.rb,
sig/telnyx/resources/recordings.rbs,
sig/telnyx/resources/recordings/actions.rbs

Overview

Call Recordings operations.

Defined Under Namespace

Classes: Actions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Recordings

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 Recordings.

Parameters:



84
85
86
87
# File 'lib/telnyx/resources/recordings.rb', line 84

def initialize(client:)
  @client = client
  @actions = Telnyx::Resources::Recordings::Actions.new(client: client)
end

Instance Attribute Details

#actionsTelnyx::Resources::Recordings::Actions (readonly)

Call Recordings operations.



9
10
11
# File 'lib/telnyx/resources/recordings.rb', line 9

def actions
  @actions
end

Instance Method Details

#delete(recording_id, request_options: {}) ⇒ Telnyx::Models::RecordingResponse

Permanently deletes the specified call recording and returns the deleted recording resource. The media is removed and can no longer be downloaded.

Parameters:

  • recording_id (String)

    Uniquely identifies the recording by id.

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

Returns:

See Also:



72
73
74
75
76
77
78
79
# File 'lib/telnyx/resources/recordings.rb', line 72

def delete(recording_id, params = {})
  @client.request(
    method: :delete,
    path: ["recordings/%1$s", recording_id],
    model: Telnyx::RecordingResponse,
    options: params[:request_options]
  )
end

#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::RecordingResponseData>

Returns a paginated list of your call recordings, with support for filtering to locate specific recordings.

Parameters:

Returns:

See Also:



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/telnyx/resources/recordings.rb', line 47

def list(params = {})
  parsed, options = Telnyx::RecordingListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "recordings",
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::RecordingResponseData,
    options: options
  )
end

#retrieve(recording_id, request_options: {}) ⇒ Telnyx::Models::RecordingResponse

Retrieves the details of an existing call recording.

Parameters:

  • recording_id (String)

    Uniquely identifies the recording by id.

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

Returns:

See Also:



22
23
24
25
26
27
28
29
# File 'lib/telnyx/resources/recordings.rb', line 22

def retrieve(recording_id, params = {})
  @client.request(
    method: :get,
    path: ["recordings/%1$s", recording_id],
    model: Telnyx::RecordingResponse,
    options: params[:request_options]
  )
end