Class: Telnyx::Resources::MobileVoiceConnections
- Inherits:
-
Object
- Object
- Telnyx::Resources::MobileVoiceConnections
- Defined in:
- lib/telnyx/resources/mobile_voice_connections.rb
Overview
Mobile voice connection operations
Instance Method Summary collapse
-
#create(active: nil, connection_name: nil, inbound: nil, outbound: nil, tags: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionCreateResponse
Create a Mobile Voice Connection.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionDeleteResponse
Delete a Mobile Voice Connection.
-
#initialize(client:) ⇒ MobileVoiceConnections
constructor
private
A new instance of MobileVoiceConnections.
-
#list(filter_connection_name_contains: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MobileVoiceConnection>
Some parameter documentations has been truncated, see Models::MobileVoiceConnectionListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionRetrieveResponse
Retrieve a Mobile Voice Connection.
-
#update(id, active: nil, connection_name: nil, inbound: nil, outbound: nil, tags: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionUpdateResponse
Update a Mobile Voice Connection.
Constructor Details
#initialize(client:) ⇒ MobileVoiceConnections
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 MobileVoiceConnections.
156 157 158 |
# File 'lib/telnyx/resources/mobile_voice_connections.rb', line 156 def initialize(client:) @client = client end |
Instance Method Details
#create(active: nil, connection_name: nil, inbound: nil, outbound: nil, tags: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionCreateResponse
Create a Mobile Voice Connection
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/mobile_voice_connections.rb', line 25 def create(params = {}) parsed, = Telnyx::MobileVoiceConnectionCreateParams.dump_request(params) @client.request( method: :post, path: "v2/mobile_voice_connections", body: parsed, model: Telnyx::Models::MobileVoiceConnectionCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionDeleteResponse
Delete a Mobile Voice Connection
144 145 146 147 148 149 150 151 |
# File 'lib/telnyx/resources/mobile_voice_connections.rb', line 144 def delete(id, params = {}) @client.request( method: :delete, path: ["v2/mobile_voice_connections/%1$s", id], model: Telnyx::Models::MobileVoiceConnectionDeleteResponse, options: params[:request_options] ) end |
#list(filter_connection_name_contains: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MobileVoiceConnection>
Some parameter documentations has been truncated, see Models::MobileVoiceConnectionListParams for more details.
List Mobile Voice Connections
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/telnyx/resources/mobile_voice_connections.rb', line 116 def list(params = {}) parsed, = Telnyx::MobileVoiceConnectionListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v2/mobile_voice_connections", query: query.transform_keys( filter_connection_name_contains: "filter[connection_name][contains]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::MobileVoiceConnection, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionRetrieveResponse
Retrieve a Mobile Voice Connection
47 48 49 50 51 52 53 54 |
# File 'lib/telnyx/resources/mobile_voice_connections.rb', line 47 def retrieve(id, params = {}) @client.request( method: :get, path: ["v2/mobile_voice_connections/%1$s", id], model: Telnyx::Models::MobileVoiceConnectionRetrieveResponse, options: params[:request_options] ) end |
#update(id, active: nil, connection_name: nil, inbound: nil, outbound: nil, tags: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::MobileVoiceConnectionUpdateResponse
Update a Mobile Voice Connection
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/telnyx/resources/mobile_voice_connections.rb', line 85 def update(id, params = {}) parsed, = Telnyx::MobileVoiceConnectionUpdateParams.dump_request(params) @client.request( method: :patch, path: ["v2/mobile_voice_connections/%1$s", id], body: parsed, model: Telnyx::Models::MobileVoiceConnectionUpdateResponse, options: ) end |