Class: Telnyx::Resources::MessagingTollfree::Verification::Requests
- Inherits:
-
Object
- Object
- Telnyx::Resources::MessagingTollfree::Verification::Requests
- Defined in:
- lib/telnyx/resources/messaging_tollfree/verification/requests.rb
Overview
Manage your tollfree verification requests
Instance Method Summary collapse
-
#create(additional_information:, business_addr1:, business_city:, business_contact_email:, business_contact_first_name:, business_contact_last_name:, business_contact_phone:, business_name:, business_state:, business_zip:, corporate_website:, message_volume:, opt_in_workflow:, opt_in_workflow_image_urls:, phone_numbers:, production_message_content:, use_case:, use_case_summary:, age_gated_content: nil, business_addr2: nil, business_registration_country: nil, business_registration_number: nil, business_registration_type: nil, campaign_verify_authorization_token: nil, doing_business_as: nil, entity_type: nil, help_message_response: nil, isv_reseller: nil, opt_in_confirmation_response: nil, opt_in_keywords: nil, privacy_policy_url: nil, terms_and_condition_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestEgress
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ nil
Delete a verification request.
-
#initialize(client:) ⇒ Requests
constructor
private
A new instance of Requests.
-
#list(page:, page_size:, business_name: nil, date_end: nil, date_start: nil, phone_number: nil, status: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultPaginationForMessagingTollfree<Telnyx::Models::MessagingTollfree::Verification::VerificationRequestStatus>
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestStatus
Get a single verification request by its ID.
-
#retrieve_status_history(id, page_number:, page_size:, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryResponse
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryParams for more details.
-
#update(id, additional_information:, business_addr1:, business_city:, business_contact_email:, business_contact_first_name:, business_contact_last_name:, business_contact_phone:, business_name:, business_state:, business_zip:, corporate_website:, message_volume:, opt_in_workflow:, opt_in_workflow_image_urls:, phone_numbers:, production_message_content:, use_case:, use_case_summary:, age_gated_content: nil, business_addr2: nil, business_registration_country: nil, business_registration_number: nil, business_registration_type: nil, campaign_verify_authorization_token: nil, doing_business_as: nil, entity_type: nil, help_message_response: nil, isv_reseller: nil, opt_in_confirmation_response: nil, opt_in_keywords: nil, privacy_policy_url: nil, terms_and_condition_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestEgress
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Requests
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 Requests.
314 315 316 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 314 def initialize(client:) @client = client end |
Instance Method Details
#create(additional_information:, business_addr1:, business_city:, business_contact_email:, business_contact_first_name:, business_contact_last_name:, business_contact_phone:, business_name:, business_state:, business_zip:, corporate_website:, message_volume:, opt_in_workflow:, opt_in_workflow_image_urls:, phone_numbers:, production_message_content:, use_case:, use_case_summary:, age_gated_content: nil, business_addr2: nil, business_registration_country: nil, business_registration_number: nil, business_registration_type: nil, campaign_verify_authorization_token: nil, doing_business_as: nil, entity_type: nil, help_message_response: nil, isv_reseller: nil, opt_in_confirmation_response: nil, opt_in_keywords: nil, privacy_policy_url: nil, terms_and_condition_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestEgress
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestCreateParams for more details.
Submit a new tollfree verification request
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 88 def create(params) parsed, = Telnyx::MessagingTollfree::Verification::RequestCreateParams.dump_request(params) @client.request( method: :post, path: "messaging_tollfree/verification/requests", body: parsed, model: Telnyx::MessagingTollfree::Verification::VerificationRequestEgress, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Delete a verification request
A request may only be deleted when when the request is in the “rejected” state.
-
‘HTTP 200`: request successfully deleted
-
‘HTTP 400`: request exists but can’t be deleted (i.e. not rejected)
-
‘HTTP 404`: request unknown or already deleted
267 268 269 270 271 272 273 274 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 267 def delete(id, params = {}) @client.request( method: :delete, path: ["messaging_tollfree/verification/requests/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#list(page:, page_size:, business_name: nil, date_end: nil, date_start: nil, phone_number: nil, status: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultPaginationForMessagingTollfree<Telnyx::Models::MessagingTollfree::Verification::VerificationRequestStatus>
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestListParams for more details.
Get a list of previously-submitted tollfree verification requests
238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 238 def list(params) parsed, = Telnyx::MessagingTollfree::Verification::RequestListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "messaging_tollfree/verification/requests", query: query, page: Telnyx::Internal::DefaultPaginationForMessagingTollfree, model: Telnyx::MessagingTollfree::Verification::VerificationRequestStatus, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestStatus
Get a single verification request by its ID.
109 110 111 112 113 114 115 116 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 109 def retrieve(id, params = {}) @client.request( method: :get, path: ["messaging_tollfree/verification/requests/%1$s", id], model: Telnyx::MessagingTollfree::Verification::VerificationRequestStatus, options: params[:request_options] ) end |
#retrieve_status_history(id, page_number:, page_size:, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryResponse
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryParams for more details.
Get the history of status changes for a verification request.
Returns a paginated list of historical status changes including the reason for each change and when it occurred.
298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 298 def retrieve_status_history(id, params) parsed, = Telnyx::MessagingTollfree::Verification::RequestRetrieveStatusHistoryParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["messaging_tollfree/verification/requests/%1$s/status_history", id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), model: Telnyx::Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryResponse, options: ) end |
#update(id, additional_information:, business_addr1:, business_city:, business_contact_email:, business_contact_first_name:, business_contact_last_name:, business_contact_phone:, business_name:, business_state:, business_zip:, corporate_website:, message_volume:, opt_in_workflow:, opt_in_workflow_image_urls:, phone_numbers:, production_message_content:, use_case:, use_case_summary:, age_gated_content: nil, business_addr2: nil, business_registration_country: nil, business_registration_number: nil, business_registration_type: nil, campaign_verify_authorization_token: nil, doing_business_as: nil, entity_type: nil, help_message_response: nil, isv_reseller: nil, opt_in_confirmation_response: nil, opt_in_keywords: nil, privacy_policy_url: nil, terms_and_condition_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestEgress
Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestUpdateParams for more details.
Update an existing tollfree verification request. This is particularly useful when there are pending customer actions to be taken.
200 201 202 203 204 205 206 207 208 209 |
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 200 def update(id, params) parsed, = Telnyx::MessagingTollfree::Verification::RequestUpdateParams.dump_request(params) @client.request( method: :patch, path: ["messaging_tollfree/verification/requests/%1$s", id], body: parsed, model: Telnyx::MessagingTollfree::Verification::VerificationRequestEgress, options: ) end |