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

Inherits:
Object
  • Object
show all
Defined in:
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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ByPhoneNumber

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

Parameters:



35
36
37
38
# File 'lib/telnyx/resources/verifications/by_phone_number.rb', line 35

def initialize(client:)
  @client = client
  @actions = Telnyx::Resources::Verifications::ByPhoneNumber::Actions.new(client: client)
end

Instance Attribute Details

#actionsTelnyx::Resources::Verifications::ByPhoneNumber::Actions (readonly)

Two factor authentication API



10
11
12
# File 'lib/telnyx/resources/verifications/by_phone_number.rb', line 10

def actions
  @actions
end

Instance Method Details

#list(phone_number, request_options: {}) ⇒ Telnyx::Models::Verifications::ByPhoneNumberListResponse

List verifications by phone number

Parameters:

  • phone_number (String)

    +E164 formatted phone number.

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

Returns:

See Also:



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

def list(phone_number, params = {})
  @client.request(
    method: :get,
    path: ["verifications/by_phone_number/%1$s", phone_number],
    model: Telnyx::Models::Verifications::ByPhoneNumberListResponse,
    options: params[:request_options]
  )
end