Class: Telnyx::Resources::CountryCoverage

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

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:



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Get country coverage

Parameters:

Returns:

See Also:



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

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:



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

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