Class: Authy::PhoneVerification

Inherits:
API
  • Object
show all
Defined in:
lib/authy/phone_verification.rb

Constant Summary

Constants inherited from API

API::MAX_TOKEN_SIZE, API::MIN_TOKEN_SIZE

Class Method Summary collapse

Methods inherited from API

delete_user, register_user, request_phone_call, request_qr_code, request_sms, user_status, verify

Methods included from URL

included

Class Method Details

.check(params) ⇒ Object

options:

:country_code Numeric calling country code of the country.
:phone_number The persons phone number.
:verification_code The verification code entered by the user.


19
20
21
# File 'lib/authy/phone_verification.rb', line 19

def self.check(params)
  get_request("protected/json/phones/verification/check", params)
end

.start(params) ⇒ Object

options:

:via (sms|call)
:country_code Numeric calling country code of the country.
:phone_number The persons phone number.
:custom_code Pass along any generated custom code.
:custom_message Custom Message.


9
10
11
12
13
# File 'lib/authy/phone_verification.rb', line 9

def self.start(params)
  params[:via] = "sms" unless %w(sms, call).include?(params[:via])

  post_request("protected/json/phones/verification/start", params)
end