Class: Telnyx::Resources::Wireless::DetailRecordsReports

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/wireless/detail_records_reports.rb

Overview

Wireless reporting operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DetailRecordsReports

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

Parameters:



101
102
103
# File 'lib/telnyx/resources/wireless/detail_records_reports.rb', line 101

def initialize(client:)
  @client = client
end

Instance Method Details

#create(end_time: nil, start_time: nil, request_options: {}) ⇒ Telnyx::Models::Wireless::DetailRecordsReportCreateResponse

Asynchronously create a report containing Wireless Detail Records (WDRs) for the SIM cards that consumed wireless data in the given time period.

Parameters:

  • end_time (String)

    ISO 8601 formatted date-time indicating the end time.

  • start_time (String)

    ISO 8601 formatted date-time indicating the start time.

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

Returns:

See Also:



22
23
24
25
26
27
28
29
30
31
# File 'lib/telnyx/resources/wireless/detail_records_reports.rb', line 22

def create(params = {})
  parsed, options = Telnyx::Wireless::DetailRecordsReportCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "wireless/detail_records_reports",
    body: parsed,
    model: Telnyx::Models::Wireless::DetailRecordsReportCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::Wireless::DetailRecordsReportDeleteResponse

Deletes one specific WDR report.

Parameters:

  • id (String)

    Identifies the resource.

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

Returns:

See Also:



89
90
91
92
93
94
95
96
# File 'lib/telnyx/resources/wireless/detail_records_reports.rb', line 89

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["wireless/detail_records_reports/%1$s", id],
    model: Telnyx::Models::Wireless::DetailRecordsReportDeleteResponse,
    options: params[:request_options]
  )
end

#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::Wireless::DetailRecordsReportListResponse

Returns the WDR Reports that match the given parameters.

Parameters:

  • page_number (Integer)

    The page number to load.

  • page_size (Integer)

    The size of the page.

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

Returns:

See Also:



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/telnyx/resources/wireless/detail_records_reports.rb', line 66

def list(params = {})
  parsed, options = Telnyx::Wireless::DetailRecordsReportListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "wireless/detail_records_reports",
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    model: Telnyx::Models::Wireless::DetailRecordsReportListResponse,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Wireless::DetailRecordsReportRetrieveResponse

Returns one specific WDR report

Parameters:

  • id (String)

    Identifies the resource.

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

Returns:

See Also:



44
45
46
47
48
49
50
51
# File 'lib/telnyx/resources/wireless/detail_records_reports.rb', line 44

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["wireless/detail_records_reports/%1$s", id],
    model: Telnyx::Models::Wireless::DetailRecordsReportRetrieveResponse,
    options: params[:request_options]
  )
end