Class: PreludeSDK::Resources::Intel::KYC

Inherits:
Object
  • Object
show all
Defined in:
lib/prelude_sdk/resources/intel/kyc.rb,
sig/prelude_sdk/resources/intel/kyc.rbs

Overview

Retrieve detailed information about a phone number including carrier data, line type, and portability status.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ KYC

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

Parameters:



56
57
58
# File 'lib/prelude_sdk/resources/intel/kyc.rb', line 56

def initialize(client:)
  @client = client
end

Instance Method Details

#match(phone, address: nil, birthdate: nil, country: nil, email: nil, family_name: nil, given_name: nil, locality: nil, postal_code: nil, region: nil, request_options: {}) ⇒ PreludeSDK::Models::Intel::KYCMatchResponse

Verify identity attributes against the subscriber record held by the end-user's mobile operator. Send a phone number along with the attributes to check; Prelude resolves the operator internally and returns a per-attribute match. Currently available for France only (Orange, SFR, Bouygues) and must be enabled for your account.

Parameters:

  • phone (String) —

    An E.164 formatted phone number whose subscriber identity to match against.

  • address (String) —

    The street address.

  • birthdate (Date) —

    The date of birth in ISO 8601 (YYYY-MM-DD) format. Compared exactly.

  • country (String) —

    The ISO 3166-1 alpha-2 country code. Compared exactly.

  • email (String) —

    The email address.

  • family_name (String) —

    The end-user's family (last) name.

  • given_name (String) —

    The end-user's given (first) name.

  • locality (String) —

    The locality (city).

  • postal_code (String) —

    The postal code. Compared exactly.

  • region (String) —

    The region, state, or province.

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

Returns:

See Also:



42
43
44
45
46
47
48
49
50
51
# File 'lib/prelude_sdk/resources/intel/kyc.rb', line 42

def match(phone, params = {})
  parsed, options = PreludeSDK::Intel::KYCMatchParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v2/intel/kyc/match/%1$s", phone],
    body: parsed,
    model: PreludeSDK::Models::Intel::KYCMatchResponse,
    options: options
  )
end