Class: Telnyx::Resources::Legacy::Reporting::UsageReports::NumberLookup

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

Overview

Number lookup usage reports

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ NumberLookup

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

Parameters:



100
101
102
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/number_lookup.rb', line 100

def initialize(client:)
  @client = client
end

Instance Method Details

#create(aggregation_type: nil, end_date: nil, managed_accounts: nil, start_date: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::NumberLookupCreateResponse

Submit a new telco data usage report

Parameters:

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/number_lookup.rb', line 27

def create(params = {})
  parsed, options = Telnyx::Legacy::Reporting::UsageReports::NumberLookupCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "legacy/reporting/usage_reports/number_lookup",
    headers: {"content-type" => "*/*"},
    body: parsed,
    model: Telnyx::Models::Legacy::Reporting::UsageReports::NumberLookupCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ nil

Delete a specific telco data usage report by its ID

Parameters:

  • id (String)

    Unique identifier of the resource.

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

Returns:

  • (nil)

See Also:



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

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["legacy/reporting/usage_reports/number_lookup/%1$s", id],
    model: NilClass,
    options: params[:request_options]
  )
end

#list(request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::NumberLookupListResponse

Retrieve a paginated list of telco data usage reports



68
69
70
71
72
73
74
75
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/number_lookup.rb', line 68

def list(params = {})
  @client.request(
    method: :get,
    path: "legacy/reporting/usage_reports/number_lookup",
    model: Telnyx::Models::Legacy::Reporting::UsageReports::NumberLookupListResponse,
    options: params[:request_options]
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::NumberLookupRetrieveResponse

Retrieve a specific telco data usage report by its ID

Parameters:

  • id (String)

    Unique identifier of the resource.

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

Returns:

See Also:



50
51
52
53
54
55
56
57
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/number_lookup.rb', line 50

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