Class: Telnyx::Resources::Legacy::Reporting::BatchDetailRecords::Messaging

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

Overview

Messaging batch detail records

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Messaging

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

Parameters:



118
119
120
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/messaging.rb', line 118

def initialize(client:)
  @client = client
end

Instance Method Details

#create(end_time:, start_time:, connections: nil, directions: nil, filters: nil, include_message_body: nil, managed_accounts: nil, profiles: nil, record_types: nil, report_name: nil, select_all_managed_accounts: nil, timezone: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::MessagingCreateResponse

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

Creates a new MDR detailed report request with the specified filters

Parameters:

  • end_time (Time)

    End time in ISO format. Note: If end time includes the last 4 hours, some MDRs m

  • start_time (Time)

    Start time in ISO format

  • connections (Array<Integer>)

    List of connections to filter by

  • directions (Array<Integer>)

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

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

    List of filters to apply

  • include_message_body (Boolean)

    Whether to include message body in the report

  • managed_accounts (Array<String>)

    List of managed accounts to include

  • profiles (Array<String>)

    List of messaging profile IDs to filter by

  • 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

  • timezone (String)

    Timezone for the report

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

Returns:

See Also:



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

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

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

Deletes a specific MDR detailed report request by ID



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

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

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

Retrieves all MDR detailed report requests for the authenticated user



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

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

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

Retrieves a specific MDR detailed report request by ID



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

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