Class: Telnyx::Resources::Verifications
- Inherits:
-
Object
- Object
- Telnyx::Resources::Verifications
- Defined in:
- lib/telnyx/resources/verifications.rb,
lib/telnyx/resources/verifications/actions.rb,
lib/telnyx/resources/verifications/by_phone_number.rb,
lib/telnyx/resources/verifications/by_phone_number/actions.rb,
sig/telnyx/resources/verifications.rbs,
sig/telnyx/resources/verifications/actions.rbs,
sig/telnyx/resources/verifications/by_phone_number.rbs,
sig/telnyx/resources/verifications/by_phone_number/actions.rbs
Overview
Two factor authentication API
Defined Under Namespace
Classes: Actions, ByPhoneNumber
Instance Attribute Summary collapse
-
#actions ⇒ Telnyx::Resources::Verifications::Actions
readonly
Two factor authentication API.
-
#by_phone_number ⇒ Telnyx::Resources::Verifications::ByPhoneNumber
readonly
Two factor authentication API.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Verifications
constructor
private
A new instance of Verifications.
-
#retrieve(verification_id, request_options: {}) ⇒ Telnyx::Models::VerificationRetrieveResponse
Returns the verification identified by ID, including its channel, phone number, Verify profile, timeout, and current status.
-
#trigger_call(phone_number:, verify_profile_id:, custom_code: nil, extension: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Some parameter documentations has been truncated, see Models::VerificationTriggerCallParams for more details.
-
#trigger_flashcall(phone_number:, verify_profile_id:, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Starts a verification for the specified phone number and places a brief call with the code embedded in the caller ID.
-
#trigger_sms(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Starts a verification for the specified phone number and sends its code by SMS using the selected Verify profile.
-
#trigger_whatsapp_verification(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Starts a verification for the specified phone number and sends its code over WhatsApp using the selected Verify profile.
Constructor Details
#initialize(client:) ⇒ Verifications
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 Verifications.
161 162 163 164 165 |
# File 'lib/telnyx/resources/verifications.rb', line 161 def initialize(client:) @client = client @by_phone_number = Telnyx::Resources::Verifications::ByPhoneNumber.new(client: client) @actions = Telnyx::Resources::Verifications::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::Verifications::Actions (readonly)
Two factor authentication API
13 14 15 |
# File 'lib/telnyx/resources/verifications.rb', line 13 def actions @actions end |
#by_phone_number ⇒ Telnyx::Resources::Verifications::ByPhoneNumber (readonly)
Two factor authentication API
9 10 11 |
# File 'lib/telnyx/resources/verifications.rb', line 9 def by_phone_number @by_phone_number end |
Instance Method Details
#retrieve(verification_id, request_options: {}) ⇒ Telnyx::Models::VerificationRetrieveResponse
Returns the verification identified by ID, including its channel, phone number, Verify profile, timeout, and current status.
27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/verifications.rb', line 27 def retrieve(verification_id, params = {}) @client.request( method: :get, path: ["verifications/%1$s", verification_id], model: Telnyx::Models::VerificationRetrieveResponse, options: params[:request_options] ) end |
#trigger_call(phone_number:, verify_profile_id:, custom_code: nil, extension: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Some parameter documentations has been truncated, see Models::VerificationTriggerCallParams for more details.
Starts a verification for the specified phone number and delivers its code in a voice call using the selected Verify profile. Returns the pending verification record.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/telnyx/resources/verifications.rb', line 60 def trigger_call(params) parsed, = Telnyx::VerificationTriggerCallParams.dump_request(params) @client.request( method: :post, path: "verifications/call", body: parsed, model: Telnyx::CreateVerificationResponse, options: ) end |
#trigger_flashcall(phone_number:, verify_profile_id:, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Starts a verification for the specified phone number and places a brief call with the code embedded in the caller ID. Returns the pending verification record.
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/telnyx/resources/verifications.rb', line 88 def trigger_flashcall(params) parsed, = Telnyx::VerificationTriggerFlashcallParams.dump_request(params) @client.request( method: :post, path: "verifications/flashcall", body: parsed, model: Telnyx::CreateVerificationResponse, options: ) end |
#trigger_sms(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Starts a verification for the specified phone number and sends its code by SMS using the selected Verify profile. Returns the pending verification record.
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/telnyx/resources/verifications.rb', line 117 def trigger_sms(params) parsed, = Telnyx::VerificationTriggerSMSParams.dump_request(params) @client.request( method: :post, path: "verifications/sms", body: parsed, model: Telnyx::CreateVerificationResponse, options: ) end |
#trigger_whatsapp_verification(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Starts a verification for the specified phone number and sends its code over WhatsApp using the selected Verify profile. Returns the pending verification record.
147 148 149 150 151 152 153 154 155 156 |
# File 'lib/telnyx/resources/verifications.rb', line 147 def trigger_whatsapp_verification(params) parsed, = Telnyx::VerificationTriggerWhatsappVerificationParams.dump_request(params) @client.request( method: :post, path: "verifications/whatsapp", body: parsed, model: Telnyx::CreateVerificationResponse, options: ) end |