Class: Telnyx::Resources::AvailablePhoneNumbers
- Inherits:
-
Object
- Object
- Telnyx::Resources::AvailablePhoneNumbers
- Defined in:
- lib/telnyx/resources/available_phone_numbers.rb
Overview
Number search
Instance Method Summary collapse
-
#initialize(client:) ⇒ AvailablePhoneNumbers
constructor
private
A new instance of AvailablePhoneNumbers.
-
#list(filter: nil, request_options: {}) ⇒ Telnyx::Models::AvailablePhoneNumberListResponse
Some parameter documentations has been truncated, see Models::AvailablePhoneNumberListParams for more details.
Constructor Details
#initialize(client:) ⇒ AvailablePhoneNumbers
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 AvailablePhoneNumbers.
36 37 38 |
# File 'lib/telnyx/resources/available_phone_numbers.rb', line 36 def initialize(client:) @client = client end |
Instance Method Details
#list(filter: nil, request_options: {}) ⇒ Telnyx::Models::AvailablePhoneNumberListResponse
Some parameter documentations has been truncated, see Models::AvailablePhoneNumberListParams for more details.
List available phone numbers
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/telnyx/resources/available_phone_numbers.rb', line 21 def list(params = {}) parsed, = Telnyx::AvailablePhoneNumberListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "available_phone_numbers", query: query, model: Telnyx::Models::AvailablePhoneNumberListResponse, options: ) end |