Class: Telnyx::Resources::Legacy::Reporting::BatchDetailRecords::Voice

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb

Overview

Voice batch detail records

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Voice

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

Parameters:



137
138
139
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb', line 137

def initialize(client:)
  @client = client
end

Instance Method Details

#create(end_time:, start_time:, call_types: nil, connections: nil, fields: nil, filters: nil, include_all_metadata: nil, managed_accounts: nil, record_types: nil, report_name: nil, select_all_managed_accounts: nil, source: nil, timezone: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceCreateResponse

Some parameter documentations has been truncated, see Models::Legacy::Reporting::BatchDetailRecords::VoiceCreateParams for more details.

Creates a new CDR report request with the specified filters

Parameters:

  • end_time (Time)

    End time in ISO format

  • start_time (Time)

    Start time in ISO format

  • call_types (Array<Integer>)

    List of call types to filter by (Inbound = 1, Outbound = 2)

  • connections (Array<Integer>)

    List of connections to filter by

  • fields (Array<String>)

    Set of fields to include in the report

  • filters (Array<Telnyx::Models::Legacy::Reporting::Filter>)

    List of filters to apply

  • include_all_metadata (Boolean)

    Whether to include all metadata

  • managed_accounts (Array<String>)

    List of managed accounts to include

  • record_types (Array<Integer>)

    List of record types to filter by (Complete = 1, Incomplete = 2, Errors = 3)

  • report_name (String)

    Name of the report

  • select_all_managed_accounts (Boolean)

    Whether to select all managed accounts

  • source (String)

    Source of the report. Valid values: calls (default), call-control, fax-api, webr

  • timezone (String)

    Timezone for the report

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

Returns:

See Also:



49
50
51
52
53
54
55
56
57
58
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb', line 49

def create(params)
  parsed, options = Telnyx::Legacy::Reporting::BatchDetailRecords::VoiceCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "legacy/reporting/batch_detail_records/voice",
    body: parsed,
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceDeleteResponse

Deletes a specific CDR report request by ID



107
108
109
110
111
112
113
114
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb', line 107

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["legacy/reporting/batch_detail_records/voice/%1$s", id],
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceDeleteResponse,
    options: params[:request_options]
  )
end

#list(request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceListResponse

Retrieves all CDR report requests for the authenticated user



88
89
90
91
92
93
94
95
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb', line 88

def list(params = {})
  @client.request(
    method: :get,
    path: "legacy/reporting/batch_detail_records/voice",
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceListResponse,
    options: params[:request_options]
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceRetrieveResponse

Retrieves a specific CDR report request by ID



70
71
72
73
74
75
76
77
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb', line 70

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["legacy/reporting/batch_detail_records/voice/%1$s", id],
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceRetrieveResponse,
    options: params[:request_options]
  )
end

#retrieve_fields(request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceRetrieveFieldsResponse

Retrieves all available fields that can be used in CDR reports



125
126
127
128
129
130
131
132
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/voice.rb', line 125

def retrieve_fields(params = {})
  @client.request(
    method: :get,
    path: "legacy/reporting/batch_detail_records/voice/fields",
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::VoiceRetrieveFieldsResponse,
    options: params[:request_options]
  )
end