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

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

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:



99
100
101
# File 'lib/telnyx/resources/wireless/detail_records_reports.rb', line 99

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:



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

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:



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

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:



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

def list(params = {})
  parsed, options = Telnyx::Wireless::DetailRecordsReportListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "wireless/detail_records_reports",
    query: parsed.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:



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

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