Class: Telnyx::Resources::MessagingProfiles
- Inherits:
-
Object
- Object
- Telnyx::Resources::MessagingProfiles
- Defined in:
- lib/telnyx/resources/messaging_profiles.rb,
lib/telnyx/resources/messaging_profiles/actions.rb,
lib/telnyx/resources/messaging_profiles/autoresp_configs.rb
Defined Under Namespace
Classes: Actions, AutorespConfigs
Instance Attribute Summary collapse
- #actions ⇒ Telnyx::Resources::MessagingProfiles::Actions readonly
-
#autoresp_configs ⇒ Telnyx::Resources::MessagingProfiles::AutorespConfigs
readonly
Opt-Out Management.
Instance Method Summary collapse
-
#create(name:, whitelisted_destinations:, ai_assistant_id: nil, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, health_webhook_url: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, number_pool_settings: nil, resource_group_id: nil, smart_encoding: nil, url_shortener_settings: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfileCreateResponse
Some parameter documentations has been truncated, see Models::MessagingProfileCreateParams for more details.
-
#delete(messaging_profile_id, request_options: {}) ⇒ Telnyx::Models::MessagingProfileDeleteResponse
Delete a messaging profile.
-
#initialize(client:) ⇒ MessagingProfiles
constructor
private
A new instance of MessagingProfiles.
-
#list(filter: nil, filter_name_contains: nil, filter_name_eq: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MessagingProfile>
List messaging profiles.
-
#list_alphanumeric_sender_ids(id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AlphanumericSenderID>
List all alphanumeric sender IDs associated with a specific messaging profile.
-
#list_phone_numbers(messaging_profile_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PhoneNumberWithMessagingSettings>
List phone numbers associated with a messaging profile.
-
#list_short_codes(messaging_profile_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ShortCode>
List short codes associated with a messaging profile.
-
#retrieve(messaging_profile_id, request_options: {}) ⇒ Telnyx::Models::MessagingProfileRetrieveResponse
Retrieve a messaging profile.
-
#retrieve_metrics(id, time_frame: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfileRetrieveMetricsResponse
Get detailed metrics for a specific messaging profile, broken down by time interval.
-
#update(messaging_profile_id, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, smart_encoding: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfileUpdateResponse
Some parameter documentations has been truncated, see Models::MessagingProfileUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ MessagingProfiles
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 MessagingProfiles.
319 320 321 322 323 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 319 def initialize(client:) @client = client @autoresp_configs = Telnyx::Resources::MessagingProfiles::AutorespConfigs.new(client: client) @actions = Telnyx::Resources::MessagingProfiles::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::MessagingProfiles::Actions (readonly)
11 12 13 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 11 def actions @actions end |
#autoresp_configs ⇒ Telnyx::Resources::MessagingProfiles::AutorespConfigs (readonly)
Opt-Out Management
8 9 10 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 8 def autoresp_configs @autoresp_configs end |
Instance Method Details
#create(name:, whitelisted_destinations:, ai_assistant_id: nil, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, health_webhook_url: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, number_pool_settings: nil, resource_group_id: nil, smart_encoding: nil, url_shortener_settings: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfileCreateResponse
Some parameter documentations has been truncated, see Models::MessagingProfileCreateParams for more details.
Create a messaging profile
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 61 def create(params) parsed, = Telnyx::MessagingProfileCreateParams.dump_request(params) @client.request( method: :post, path: "messaging_profiles", body: parsed, model: Telnyx::Models::MessagingProfileCreateResponse, options: ) end |
#delete(messaging_profile_id, request_options: {}) ⇒ Telnyx::Models::MessagingProfileDeleteResponse
Delete a messaging profile
197 198 199 200 201 202 203 204 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 197 def delete(messaging_profile_id, params = {}) @client.request( method: :delete, path: ["messaging_profiles/%1$s", messaging_profile_id], model: Telnyx::Models::MessagingProfileDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, filter_name_contains: nil, filter_name_eq: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MessagingProfile>
List messaging profiles
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 168 def list(params = {}) parsed, = Telnyx::MessagingProfileListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "messaging_profiles", query: query.transform_keys( filter_name_contains: "filter[name][contains]", filter_name_eq: "filter[name][eq]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::MessagingProfile, options: ) end |
#list_alphanumeric_sender_ids(id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AlphanumericSenderID>
List all alphanumeric sender IDs associated with a specific messaging profile.
221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 221 def list_alphanumeric_sender_ids(id, params = {}) parsed, = Telnyx::MessagingProfileListAlphanumericSenderIDsParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["messaging_profiles/%1$s/alphanumeric_sender_ids", id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::AlphanumericSenderID, options: ) end |
#list_phone_numbers(messaging_profile_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PhoneNumberWithMessagingSettings>
List phone numbers associated with a messaging profile
249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 249 def list_phone_numbers(messaging_profile_id, params = {}) parsed, = Telnyx::MessagingProfileListPhoneNumbersParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["messaging_profiles/%1$s/phone_numbers", messaging_profile_id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::PhoneNumberWithMessagingSettings, options: ) end |
#list_short_codes(messaging_profile_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ShortCode>
List short codes associated with a messaging profile
277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 277 def list_short_codes(messaging_profile_id, params = {}) parsed, = Telnyx::MessagingProfileListShortCodesParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["messaging_profiles/%1$s/short_codes", messaging_profile_id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::ShortCode, options: ) end |
#retrieve(messaging_profile_id, request_options: {}) ⇒ Telnyx::Models::MessagingProfileRetrieveResponse
Retrieve a messaging profile
83 84 85 86 87 88 89 90 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 83 def retrieve(messaging_profile_id, params = {}) @client.request( method: :get, path: ["messaging_profiles/%1$s", messaging_profile_id], model: Telnyx::Models::MessagingProfileRetrieveResponse, options: params[:request_options] ) end |
#retrieve_metrics(id, time_frame: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfileRetrieveMetricsResponse
Get detailed metrics for a specific messaging profile, broken down by time interval.
304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 304 def retrieve_metrics(id, params = {}) parsed, = Telnyx::MessagingProfileRetrieveMetricsParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["messaging_profiles/%1$s/metrics", id], query: query, model: Telnyx::Models::MessagingProfileRetrieveMetricsResponse, options: ) end |
#update(messaging_profile_id, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, smart_encoding: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfileUpdateResponse
Some parameter documentations has been truncated, see Models::MessagingProfileUpdateParams for more details.
Update a messaging profile
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 138 def update(messaging_profile_id, params = {}) parsed, = Telnyx::MessagingProfileUpdateParams.dump_request(params) @client.request( method: :patch, path: ["messaging_profiles/%1$s", messaging_profile_id], body: parsed, model: Telnyx::Models::MessagingProfileUpdateResponse, options: ) end |