Class: TelesignEnterprise::VerifyClient

Inherits:
Telesign::RestClient
  • Object
show all
Defined in:
lib/telesignenterprise/verify.rb

Overview

The Verify API delivers phone-based verification and two-factor authentication using a time-based, one-time passcode sent via SMS message and Voice call.

Instance Method Summary collapse

Constructor Details

#initialize(customer_id, api_key, rest_endpoint: 'https://rest-ww.telesign.com', timeout: nil) ⇒ VerifyClient

Returns a new instance of VerifyClient.



16
17
18
19
20
21
22
23
24
25
# File 'lib/telesignenterprise/verify.rb', line 16

def initialize(customer_id,
               api_key,
               rest_endpoint: 'https://rest-ww.telesign.com',
               timeout: nil)

  super(customer_id,
        api_key,
        rest_endpoint: rest_endpoint,
        timeout: timeout)
end

Instance Method Details

#completion(reference_id, **params) ⇒ Object

Notifies TeleSign that a verification was successfully delivered to the user in order to help improve the quality of message delivery routes.

See developer.telesign.com/docs/completion-service-for-verify-products for detailed API documentation.



75
76
77
78
79
# File 'lib/telesignenterprise/verify.rb', line 75

def completion(reference_id, **params)

  self.put(VERIFY_COMPLETION_RESOURCE % {:reference_id => reference_id},
           **params)
end

#smart(phone_number, ucid, **params) ⇒ Object

The Smart Verify web service simplifies the process of verifying user identity by integrating several TeleSign web services into a single API call. This eliminates the need for you to make multiple calls to the TeleSign Verify resource.

See developer.telesign.com/docs/rest_api-smart-verify for detailed API documentation.



54
55
56
57
58
59
60
# File 'lib/telesignenterprise/verify.rb', line 54

def smart(phone_number, ucid, **params)

  self.post(VERIFY_SMART_RESOURCE,
            phone_number: phone_number,
            ucid: ucid,
            **params)
end

#sms(phone_number, **params) ⇒ Object

The SMS Verify API delivers phone-based verification and two-factor authentication using a time-based, one-time passcode sent over SMS.

See developer.telesign.com/docs/rest_api-verify-sms for detailed API documentation.



31
32
33
34
35
36
# File 'lib/telesignenterprise/verify.rb', line 31

def sms(phone_number, **params)

  self.post(VERIFY_SMS_RESOURCE,
            phone_number: phone_number,
            **params)
end

#status(reference_id, **params) ⇒ Object

Retrieves the verification result for any verify resource.

See developer.telesign.com/docs/rest_api-verify-transaction-callback for detailed API documentation.



65
66
67
68
69
# File 'lib/telesignenterprise/verify.rb', line 65

def status(reference_id, **params)

  self.get(VERIFY_STATUS_RESOURCE % {:reference_id => reference_id},
           **params)
end

#voice(phone_number, **params) ⇒ Object

The Voice Verify API delivers patented phone-based verification and two-factor authentication using a one-time passcode sent over voice message.

See developer.telesign.com/docs/rest_api-verify-call for detailed API documentation.



42
43
44
45
46
47
# File 'lib/telesignenterprise/verify.rb', line 42

def voice(phone_number, **params)

  self.post(VERIFY_VOICE_RESOURCE,
            phone_number: phone_number,
            **params)
end