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
Defined Under Namespace
Classes: Actions, ByPhoneNumber
Instance Attribute Summary collapse
- #actions ⇒ Telnyx::Resources::Verifications::Actions readonly
- #by_phone_number ⇒ Telnyx::Resources::Verifications::ByPhoneNumber readonly
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.
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.
122 123 124 125 126 |
# File 'lib/telnyx/resources/verifications.rb', line 122 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)
10 11 12 |
# File 'lib/telnyx/resources/verifications.rb', line 10 def actions @actions end |
#by_phone_number ⇒ Telnyx::Resources::Verifications::ByPhoneNumber (readonly)
7 8 9 |
# File 'lib/telnyx/resources/verifications.rb', line 7 def by_phone_number @by_phone_number end |
Instance Method Details
#retrieve(verification_id, request_options: {}) ⇒ Telnyx::Models::VerificationRetrieveResponse
Retrieve verification
23 24 25 26 27 28 29 30 |
# File 'lib/telnyx/resources/verifications.rb', line 23 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
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/telnyx/resources/verifications.rb', line 54 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
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/telnyx/resources/verifications.rb', line 80 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
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/telnyx/resources/verifications.rb', line 108 def trigger_sms(params) parsed, = Telnyx::VerificationTriggerSMSParams.dump_request(params) @client.request( method: :post, path: "verifications/sms", body: parsed, model: Telnyx::CreateVerificationResponse, options: ) end |