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,
sig/telnyx/resources/messaging_profiles.rbs,
sig/telnyx/resources/messaging_profiles/actions.rbs,
sig/telnyx/resources/messaging_profiles/autoresp_configs.rbs
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
Deletes the specified messaging profile and returns the profile's final configuration.
-
#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::MessagingMessagingProfile>
Lists messaging profiles owned by the authenticated account.
-
#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>
Returns the phone numbers currently associated with the specified messaging profile.
-
#list_short_codes(messaging_profile_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ShortCode>
Returns the short codes currently associated with the specified messaging profile.
-
#retrieve(messaging_profile_id, request_options: {}) ⇒ Telnyx::Models::MessagingProfileRetrieveResponse
Returns the complete configuration of the specified messaging profile, including webhook and sender-selection settings.
-
#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, ai_assistant_id: nil, 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, redaction_enabled: nil, redaction_level: 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.
332 333 334 335 336 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 332 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.
Creates a messaging profile that controls outbound sender selection, webhook delivery, and inbound message handling for associated numbers and short codes.
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 62 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
Deletes the specified messaging profile and returns the profile's final configuration.
208 209 210 211 212 213 214 215 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 208 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::MessagingMessagingProfile>
Lists messaging profiles owned by the authenticated account. Apply the documented filters and pagination parameters to narrow the result set.
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 178 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::MessagingMessagingProfile, 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.
232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 232 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>
Returns the phone numbers currently associated with the specified messaging profile.
261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 261 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>
Returns the short codes currently associated with the specified messaging profile.
290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 290 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
Returns the complete configuration of the specified messaging profile, including webhook and sender-selection settings.
85 86 87 88 89 90 91 92 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 85 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.
317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 317 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, ai_assistant_id: nil, 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, redaction_enabled: nil, redaction_level: 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.
Updates the supplied settings on the specified messaging profile. Settings omitted from the request remain unchanged.
147 148 149 150 151 152 153 154 155 156 |
# File 'lib/telnyx/resources/messaging_profiles.rb', line 147 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 |