Class: Telnyx::Resources::OutboundVoiceProfiles
- Inherits:
-
Object
- Object
- Telnyx::Resources::OutboundVoiceProfiles
- Defined in:
- lib/telnyx/resources/outbound_voice_profiles.rb
Overview
Outbound voice profiles operations
Instance Method Summary collapse
-
#create(name:, billing_group_id: nil, call_recording: nil, calling_window: nil, concurrent_call_limit: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, max_destination_rate: nil, service_plan: nil, tags: nil, traffic_type: nil, usage_payment_method: nil, whitelisted_destinations: nil, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileCreateResponse
Some parameter documentations has been truncated, see Models::OutboundVoiceProfileCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileDeleteResponse
Deletes an existing outbound voice profile.
-
#initialize(client:) ⇒ OutboundVoiceProfiles
constructor
private
A new instance of OutboundVoiceProfiles.
-
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::OutboundVoiceProfile>
Some parameter documentations has been truncated, see Models::OutboundVoiceProfileListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileRetrieveResponse
Retrieves the details of an existing outbound voice profile.
-
#update(id, name:, billing_group_id: nil, call_recording: nil, calling_window: nil, concurrent_call_limit: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, max_destination_rate: nil, service_plan: nil, tags: nil, traffic_type: nil, usage_payment_method: nil, whitelisted_destinations: nil, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileUpdateResponse
Some parameter documentations has been truncated, see Models::OutboundVoiceProfileUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ OutboundVoiceProfiles
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 OutboundVoiceProfiles.
188 189 190 |
# File 'lib/telnyx/resources/outbound_voice_profiles.rb', line 188 def initialize(client:) @client = client end |
Instance Method Details
#create(name:, billing_group_id: nil, call_recording: nil, calling_window: nil, concurrent_call_limit: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, max_destination_rate: nil, service_plan: nil, tags: nil, traffic_type: nil, usage_payment_method: nil, whitelisted_destinations: nil, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileCreateResponse
Some parameter documentations has been truncated, see Models::OutboundVoiceProfileCreateParams for more details.
Create an outbound voice profile.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/outbound_voice_profiles.rb', line 47 def create(params) parsed, = Telnyx::OutboundVoiceProfileCreateParams.dump_request(params) @client.request( method: :post, path: "outbound_voice_profiles", body: parsed, model: Telnyx::Models::OutboundVoiceProfileCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileDeleteResponse
Deletes an existing outbound voice profile.
176 177 178 179 180 181 182 183 |
# File 'lib/telnyx/resources/outbound_voice_profiles.rb', line 176 def delete(id, params = {}) @client.request( method: :delete, path: ["outbound_voice_profiles/%1$s", id], model: Telnyx::Models::OutboundVoiceProfileDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::OutboundVoiceProfile>
Some parameter documentations has been truncated, see Models::OutboundVoiceProfileListParams for more details.
Get all outbound voice profiles belonging to the user that match the given filters.
152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/telnyx/resources/outbound_voice_profiles.rb', line 152 def list(params = {}) parsed, = Telnyx::OutboundVoiceProfileListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "outbound_voice_profiles", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::OutboundVoiceProfile, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileRetrieveResponse
Retrieves the details of an existing outbound voice profile.
69 70 71 72 73 74 75 76 |
# File 'lib/telnyx/resources/outbound_voice_profiles.rb', line 69 def retrieve(id, params = {}) @client.request( method: :get, path: ["outbound_voice_profiles/%1$s", id], model: Telnyx::Models::OutboundVoiceProfileRetrieveResponse, options: params[:request_options] ) end |
#update(id, name:, billing_group_id: nil, call_recording: nil, calling_window: nil, concurrent_call_limit: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, max_destination_rate: nil, service_plan: nil, tags: nil, traffic_type: nil, usage_payment_method: nil, whitelisted_destinations: nil, request_options: {}) ⇒ Telnyx::Models::OutboundVoiceProfileUpdateResponse
Some parameter documentations has been truncated, see Models::OutboundVoiceProfileUpdateParams for more details.
Updates an existing outbound voice profile.
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/telnyx/resources/outbound_voice_profiles.rb', line 120 def update(id, params) parsed, = Telnyx::OutboundVoiceProfileUpdateParams.dump_request(params) @client.request( method: :patch, path: ["outbound_voice_profiles/%1$s", id], body: parsed, model: Telnyx::Models::OutboundVoiceProfileUpdateResponse, options: ) end |