Class: Telnyx::Resources::CountryCoverage

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

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:



47
48
49
# File 'lib/telnyx/resources/country_coverage.rb', line 47

def initialize(client:)
  @client = client
end

Instance Method Details

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

Get country coverage

Parameters:

Returns:

See Also:



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

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

Get coverage for a specific country

Parameters:

  • country_code (String)

    Country ISO code.

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

Returns:

See Also:



35
36
37
38
39
40
41
42
# File 'lib/telnyx/resources/country_coverage.rb', line 35

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