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

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

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:



38
39
40
# File 'lib/telnyx/resources/verifications/by_phone_number/actions.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#verify(phone_number, code:, verify_profile_id:, request_options: {}) ⇒ Telnyx::Models::Verifications::ByPhoneNumber::VerifyVerificationCodeResponse

Verify verification code by phone number

Parameters:

  • phone_number (String)

    +E164 formatted phone number.

  • code (String)

    This is the code the user submits for verification.

  • verify_profile_id (String)

    The identifier of the associated Verify profile.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/telnyx/resources/verifications/by_phone_number/actions.rb', line 24

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