Class: Telnyx::Resources::Verifications::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/verifications/actions.rb,
sig/telnyx/resources/verifications/actions.rbs

Overview

Two factor authentication API

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Actions

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 Actions.

Parameters:



42
43
44
# File 'lib/telnyx/resources/verifications/actions.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#verify(verification_id, code: nil, status: nil, request_options: {}) ⇒ Telnyx::Models::Verifications::ByPhoneNumber::VerifyVerificationCodeResponse

Some parameter documentations has been truncated, see Models::Verifications::ActionVerifyParams for more details.

Checks the supplied code, or the supplied status for a custom-code verification, against the verification identified by ID. The response indicates whether the verification was accepted or rejected.

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/telnyx/resources/verifications/actions.rb', line 28

def verify(verification_id, params = {})
  parsed, options = Telnyx::Verifications::ActionVerifyParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["verifications/%1$s/actions/verify", verification_id],
    body: parsed,
    model: Telnyx::Verifications::ByPhoneNumber::VerifyVerificationCodeResponse,
    options: options
  )
end