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
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
Retrieve verification.
-
#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
Trigger Flash call verification.
-
#trigger_sms(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Trigger SMS verification.
-
#trigger_whatsapp_verification(phone_number:, verify_profile_id:, custom_code: nil, timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CreateVerificationResponse
Trigger WhatsApp verification.
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.
153 154 155 156 157 |
# File 'lib/telnyx/resources/verifications.rb', line 153 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
Retrieve verification
26 27 28 29 30 31 32 33 |
# File 'lib/telnyx/resources/verifications.rb', line 26 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.
Trigger Call verification
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/telnyx/resources/verifications.rb', line 57 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
Trigger Flash call verification
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/telnyx/resources/verifications.rb', line 83 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
Trigger SMS verification
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/telnyx/resources/verifications.rb', line 111 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
Trigger WhatsApp verification
139 140 141 142 143 144 145 146 147 148 |
# File 'lib/telnyx/resources/verifications.rb', line 139 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 |