Class: Telnyx::Resources::MessagingProfiles::AutorespConfigs
- Inherits:
-
Object
- Object
- Telnyx::Resources::MessagingProfiles::AutorespConfigs
- Defined in:
- lib/telnyx/resources/messaging_profiles/autoresp_configs.rb,
sig/telnyx/resources/messaging_profiles/autoresp_configs.rbs
Overview
Opt-Out Management
Instance Method Summary collapse
-
#create(profile_id, country_code:, keywords:, op:, resp_text: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutoRespConfigResponse
Creates an auto-response rule on the specified messaging profile.
-
#delete(autoresp_cfg_id, profile_id:, request_options: {}) ⇒ String
Deletes the specified auto-response rule from the messaging profile.
-
#initialize(client:) ⇒ AutorespConfigs
constructor
private
A new instance of AutorespConfigs.
-
#list(profile_id, country_code: nil, created_at: nil, updated_at: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutorespConfigListResponse
Some parameter documentations has been truncated, see Models::MessagingProfiles::AutorespConfigListParams for more details.
-
#retrieve(autoresp_cfg_id, profile_id:, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutoRespConfigResponse
Returns the matching criteria and response content for the specified auto-response rule.
-
#update(autoresp_cfg_id, profile_id:, country_code:, keywords:, op:, resp_text: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutoRespConfigResponse
Replaces the configuration of the specified auto-response rule.
Constructor Details
#initialize(client:) ⇒ AutorespConfigs
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 AutorespConfigs.
165 166 167 |
# File 'lib/telnyx/resources/messaging_profiles/autoresp_configs.rb', line 165 def initialize(client:) @client = client end |
Instance Method Details
#create(profile_id, country_code:, keywords:, op:, resp_text: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutoRespConfigResponse
Creates an auto-response rule on the specified messaging profile. Matching inbound messages trigger the configured response.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/telnyx/resources/messaging_profiles/autoresp_configs.rb', line 28 def create(profile_id, params) parsed, = Telnyx::MessagingProfiles::AutorespConfigCreateParams.dump_request(params) @client.request( method: :post, path: ["messaging_profiles/%1$s/autoresp_configs", profile_id], body: parsed, model: Telnyx::MessagingProfiles::AutoRespConfigResponse, options: ) end |
#delete(autoresp_cfg_id, profile_id:, request_options: {}) ⇒ String
Deletes the specified auto-response rule from the messaging profile.
148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/telnyx/resources/messaging_profiles/autoresp_configs.rb', line 148 def delete(autoresp_cfg_id, params) parsed, = Telnyx::MessagingProfiles::AutorespConfigDeleteParams.dump_request(params) profile_id = parsed.delete(:profile_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["messaging_profiles/%1$s/autoresp_configs/%2$s", profile_id, autoresp_cfg_id], model: String, options: ) end |
#list(profile_id, country_code: nil, created_at: nil, updated_at: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutorespConfigListResponse
Some parameter documentations has been truncated, see Models::MessagingProfiles::AutorespConfigListParams for more details.
Returns the auto-response rules configured for the specified messaging profile.
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/telnyx/resources/messaging_profiles/autoresp_configs.rb', line 123 def list(profile_id, params = {}) parsed, = Telnyx::MessagingProfiles::AutorespConfigListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["messaging_profiles/%1$s/autoresp_configs", profile_id], query: query, model: Telnyx::Models::MessagingProfiles::AutorespConfigListResponse, options: ) end |
#retrieve(autoresp_cfg_id, profile_id:, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutoRespConfigResponse
Returns the matching criteria and response content for the specified auto-response rule.
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/telnyx/resources/messaging_profiles/autoresp_configs.rb', line 53 def retrieve(autoresp_cfg_id, params) parsed, = Telnyx::MessagingProfiles::AutorespConfigRetrieveParams.dump_request(params) profile_id = parsed.delete(:profile_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["messaging_profiles/%1$s/autoresp_configs/%2$s", profile_id, autoresp_cfg_id], model: Telnyx::MessagingProfiles::AutoRespConfigResponse, options: ) end |
#update(autoresp_cfg_id, profile_id:, country_code:, keywords:, op:, resp_text: nil, request_options: {}) ⇒ Telnyx::Models::MessagingProfiles::AutoRespConfigResponse
Replaces the configuration of the specified auto-response rule.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/telnyx/resources/messaging_profiles/autoresp_configs.rb', line 88 def update(autoresp_cfg_id, params) parsed, = Telnyx::MessagingProfiles::AutorespConfigUpdateParams.dump_request(params) profile_id = parsed.delete(:profile_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: ["messaging_profiles/%1$s/autoresp_configs/%2$s", profile_id, autoresp_cfg_id], body: parsed, model: Telnyx::MessagingProfiles::AutoRespConfigResponse, options: ) end |