Class: Telnyx::Resources::CountryCoverage

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/country_coverage.rb,
sig/telnyx/resources/country_coverage.rbs

Overview

Country Coverage

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CountryCoverage

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

Parameters:



50
51
52
# File 'lib/telnyx/resources/country_coverage.rb', line 50

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(request_options: {}) ⇒ Telnyx::Models::CountryCoverageRetrieveResponse

Returns Telnyx service coverage information for every country, including which number types and features are available in each.

Parameters:

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/telnyx/resources/country_coverage.rb', line 17

def retrieve(params = {})
  @client.request(
    method: :get,
    path: "country_coverage",
    model: Telnyx::Models::CountryCoverageRetrieveResponse,
    options: params[:request_options]
  )
end

#retrieve_country(country_code, request_options: {}) ⇒ Telnyx::Models::CountryCoverageRetrieveCountryResponse

Returns Telnyx service coverage information for the specified country, including available number types and features.

Parameters:

  • country_code (String)

    Country ISO code.

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

Returns:

See Also:



38
39
40
41
42
43
44
45
# File 'lib/telnyx/resources/country_coverage.rb', line 38

def retrieve_country(country_code, params = {})
  @client.request(
    method: :get,
    path: ["country_coverage/countries/%1$s", country_code],
    model: Telnyx::Models::CountryCoverageRetrieveCountryResponse,
    options: params[:request_options]
  )
end