Class: Telnyx::Resources::Recordings

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

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:



82
83
84
85
# File 'lib/telnyx/resources/recordings.rb', line 82

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::RecordingDeleteResponse

Permanently deletes a call recording.

Parameters:

  • recording_id (String)

    Uniquely identifies the recording by id.

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

Returns:

See Also:



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

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

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

Returns a list of your call recordings.

Parameters:

Returns:

See Also:



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

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::RecordingRetrieveResponse

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::Models::RecordingRetrieveResponse,
    options: params[:request_options]
  )
end