Class: Telnyx::Resources::PortabilityChecks

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/portability_checks.rb

Overview

Determining portability of phone numbers

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ PortabilityChecks

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

Parameters:



32
33
34
# File 'lib/telnyx/resources/portability_checks.rb', line 32

def initialize(client:)
  @client = client
end

Instance Method Details

#run(phone_numbers: nil, request_options: {}) ⇒ Telnyx::Models::PortabilityCheckRunResponse

Runs a portability check, returning the results immediately.

Parameters:

  • phone_numbers (Array<String>)

    The list of +E.164 formatted phone numbers to check for portability

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

Returns:

See Also:



18
19
20
21
22
23
24
25
26
27
# File 'lib/telnyx/resources/portability_checks.rb', line 18

def run(params = {})
  parsed, options = Telnyx::PortabilityCheckRunParams.dump_request(params)
  @client.request(
    method: :post,
    path: "portability_checks",
    body: parsed,
    model: Telnyx::Models::PortabilityCheckRunResponse,
    options: options
  )
end