telesignenterprise-2.2.2/0000755000175000017500000000000014355244445014500 5ustar vinayvinaytelesignenterprise-2.2.2/telesignenterprise.gemspec0000644000175000017500000000427714355244445021772 0ustar vinayvinay######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: telesignenterprise 2.2.2 ruby lib Gem::Specification.new do |s| s.name = "telesignenterprise".freeze s.version = "2.2.2" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["TeleSign".freeze] s.date = "2017-05-02" s.description = "TeleSign Enterprise Ruby SDK".freeze s.email = "support@telesign.com".freeze s.files = ["lib/telesignenterprise.rb".freeze, "lib/telesignenterprise/appverify.rb".freeze, "lib/telesignenterprise/messaging.rb".freeze, "lib/telesignenterprise/phoneid.rb".freeze, "lib/telesignenterprise/score.rb".freeze, "lib/telesignenterprise/telebureau.rb".freeze, "lib/telesignenterprise/verify.rb".freeze, "lib/telesignenterprise/voice.rb".freeze] s.homepage = "http://rubygems.org/gems/telesign".freeze s.licenses = ["MIT".freeze] s.rubygems_version = "3.3.15".freeze s.summary = "TeleSign Enterprise Ruby SDK".freeze if s.respond_to? :specification_version then s.specification_version = 4 end if s.respond_to? :add_runtime_dependency then s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_runtime_dependency(%q.freeze, ["~> 2.2.3"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) else s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, ["~> 2.2.3"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) end end telesignenterprise-2.2.2/lib/0000755000175000017500000000000014355244445015246 5ustar vinayvinaytelesignenterprise-2.2.2/lib/telesignenterprise.rb0000644000175000017500000000040514355244445021505 0ustar vinayvinayrequire 'telesignenterprise/phoneid' require 'telesignenterprise/telebureau' require 'telesignenterprise/verify' require 'telesignenterprise/score' require 'telesignenterprise/messaging' require 'telesignenterprise/voice' require 'telesignenterprise/appverify' telesignenterprise-2.2.2/lib/telesignenterprise/0000755000175000017500000000000014355244445021161 5ustar vinayvinaytelesignenterprise-2.2.2/lib/telesignenterprise/messaging.rb0000644000175000017500000000112214355244445023457 0ustar vinayvinayrequire 'telesign' module TelesignEnterprise # TeleSign's Messaging API allows you to easily send SMS messages. You can send alerts, reminders, and notifications, # or you can send verification messages containing one-time passcodes (OTP). class MessagingClient < Telesign::MessagingClient 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 end endtelesignenterprise-2.2.2/lib/telesignenterprise/telebureau.rb0000644000175000017500000000421214355244445023642 0ustar vinayvinayrequire 'telesign/rest' TELEBUREAU_CREATE_RESOURCE = '/v1/telebureau/event' TELEBUREAU_RETRIEVE_RESOURCE = '/v1/telebureau/event/%{reference_id}' TELEBUREAU_DELETE_RESOURCE = '/v1/telebureau/event/%{reference_id}' module TelesignEnterprise # TeleBureau is a service is based on TeleSign's watchlist, which is a proprietary database containing verified phone # numbers of users known to have committed online fraud. TeleSign crowd-sources this information from its customers. # Participation is voluntary, but you have to contribute in order to benefit. class TelebureauClient < Telesign::RestClient 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 # Creates a telebureau event corresponding to supplied data. # # See https://developer.telesign.com/docs/telebureau-api for detailed API documentation. def create_event(phone_number, fraud_type, occurred_at, **params) self.post(TELEBUREAU_CREATE_RESOURCE, phone_number: phone_number, fraud_type: fraud_type, occured_at: occurred_at, **params) end # Retrieves the fraud event status. You make this call in your web application after completion of create # transaction for a telebureau event. # # See https://developer.telesign.com/docs/telebureau-api for detailed API documentation. def retrieve_event(reference_id, **params) self.get(TELEBUREAU_RETRIEVE_RESOURCE % {:reference_id => reference_id}, **params) end # Deletes a previously submitted fraud event. You make this call in your web application after completion of the # create transaction for a telebureau event. # # See https://developer.telesign.com/docs/telebureau-api for detailed API documentation. def delete_event(reference_id, **params) self.delete(TELEBUREAU_DELETE_RESOURCE % {:reference_id => reference_id}, **params) end end end telesignenterprise-2.2.2/lib/telesignenterprise/score.rb0000644000175000017500000000071014355244445022617 0ustar vinayvinayrequire 'telesign' module TelesignEnterprise # Score provides risk information about a specified phone number. class ScoreClient < Telesign::ScoreClient 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 end endtelesignenterprise-2.2.2/lib/telesignenterprise/verify.rb0000644000175000017500000000703614355244445023020 0ustar vinayvinayrequire 'telesign/rest' VERIFY_SMS_RESOURCE = '/v1/verify/sms' VERIFY_VOICE_RESOURCE = '/v1/verify/call' VERIFY_SMART_RESOURCE = '/v1/verify/smart' VERIFY_PUSH_RESOURCE = '/v2/verify/push' VERIFY_STATUS_RESOURCE = '/v1/verify/%{reference_id}' VERIFY_COMPLETION_RESOURCE = '/v1/verify/completion/%{reference_id}' module TelesignEnterprise # The Verify API delivers phone-based verification and two-factor authentication using a time-based, one-time passcode # sent via SMS message, Voice call or Push Notification. class VerifyClient < Telesign::RestClient 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 # The SMS Verify API delivers phone-based verification and two-factor authentication using a time-based, # one-time passcode sent over SMS. # # See https://developer.telesign.com/docs/rest_api-verify-sms for detailed API documentation. def sms(phone_number, **params) self.post(VERIFY_SMS_RESOURCE, phone_number: phone_number, **params) end # The Voice Verify API delivers patented phone-based verification and two-factor authentication using a one-time # passcode sent over voice message. # # See https://developer.telesign.com/docs/rest_api-verify-call for detailed API documentation. def voice(phone_number, **params) self.post(VERIFY_VOICE_RESOURCE, phone_number: phone_number, **params) end # 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 https://developer.telesign.com/docs/rest_api-smart-verify for detailed API documentation. def smart(phone_number, ucid, **params) self.post(VERIFY_SMART_RESOURCE, phone_number: phone_number, ucid: ucid, **params) end # The Push Verify web service allows you to provide on-device transaction authorization for your end users. It # works by delivering authorization requests to your end users via push notification, and then by receiving their # permission responses via their mobile device's wireless Internet connection. # # See https://developer.telesign.com/docs/rest_api-verify-push for detailed API documentation. def push(phone_number, ucid, **params) self.post(VERIFY_PUSH_RESOURCE, phone_number: phone_number, ucid: ucid, **params) end # Retrieves the verification result for any verify resource. # # See https://developer.telesign.com/docs/rest_api-verify-transaction-callback for detailed API documentation. def status(reference_id, **params) self.get(VERIFY_STATUS_RESOURCE % {:reference_id => reference_id}, **params) end # Notifies TeleSign that a verification was successfully delivered to the user in order to help improve the # quality of message delivery routes. # # See https://developer.telesign.com/docs/completion-service-for-verify-products for detailed API documentation. def completion(reference_id, **params) self.put(VERIFY_COMPLETION_RESOURCE % {:reference_id => reference_id}, **params) end end end telesignenterprise-2.2.2/lib/telesignenterprise/phoneid.rb0000644000175000017500000000664014355244445023142 0ustar vinayvinayrequire 'telesign/phoneid' PHONEID_STANDARD_RESOURCE = '/v1/phoneid/standard/%{phone_number}' PHONEID_SCORE_RESOURCE = '/v1/phoneid/score/%{phone_number}' PHONEID_CONTACT_RESOURCE = '/v1/phoneid/contact/%{phone_number}' PHONEID_LIVE_RESOURCE = '/v1/phoneid/live/%{phone_number}' PHONEID_NUMBER_DEACTIVATION_RESOURCE = '/v1/phoneid/number_deactivation/%{phone_number}' module TelesignEnterprise # A set of APIs that deliver deep phone number data attributes that help optimize the end user # verification process and evaluate risk. # # TeleSign PhoneID provides a wide range of risk assessment indicators on the number to help confirm user identity, # delivering real-time decision making throughout the number lifecycle and ensuring only legitimate users are # creating accounts and accessing your applications. class PhoneIdClient < Telesign::PhoneIdClient 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 # The PhoneID Standard API that provides phone type and telecom carrier information to identify which phone # numbers can receive SMS messages and/or a potential fraud risk. # # See https://developer.telesign.com/docs/rest_phoneid-standard for detailed API documentation. def standard(phone_number, **params) self.get(PHONEID_STANDARD_RESOURCE % {:phone_number => phone_number}, **params) end # Score is an API that delivers reputation scoring based on phone number intelligence, traffic patterns, machine # learning, and a global data consortium. # # See https://developer.telesign.com/docs/rest_api-phoneid-score for detailed API documentation. def score(phone_number, ucid, **params) self.get(PHONEID_SCORE_RESOURCE % {:phone_number => phone_number}, ucid: ucid, **params) end # The PhoneID Contact API delivers contact information related to the subscriber's phone number to provide another # set of indicators for established risk engines. # # See https://developer.telesign.com/docs/rest_api-phoneid-contact for detailed API documentation. def contact(phone_number, ucid, **params) self.get(PHONEID_CONTACT_RESOURCE % {:phone_number => phone_number}, ucid: ucid, **params) end # The PhoneID Live API delivers insights such as whether a phone is active or disconnected, a device is reachable # or unreachable and its roaming status. # # See https://developer.telesign.com/docs/rest_api-phoneid-live for detailed API documentation. def live(phone_number, ucid, **params) self.get(PHONEID_LIVE_RESOURCE % {:phone_number => phone_number}, ucid: ucid, **params) end # The PhoneID Number Deactivation API determines whether a phone number has been deactivated and when, based on # carriers' phone number data and TeleSign's proprietary analysis. # # See https://developer.telesign.com/docs/rest_api-phoneid-number-deactivation for detailed API documentation. def number_deactivation(phone_number, ucid, **params) self.get(PHONEID_NUMBER_DEACTIVATION_RESOURCE % {:phone_number => phone_number}, ucid: ucid, **params) end end end telesignenterprise-2.2.2/lib/telesignenterprise/appverify.rb0000644000175000017500000000103714355244445023514 0ustar vinayvinayrequire 'telesign' module TelesignEnterprise # App Verify is a secure, lightweight SDK that integrates a frictionless user verification process into existing # native mobile applications. class AppVerifyClient < Telesign::AppVerifyClient 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 end endtelesignenterprise-2.2.2/lib/telesignenterprise/voice.rb0000644000175000017500000000112514355244445022612 0ustar vinayvinayrequire 'telesign' module TelesignEnterprise # TeleSign's Voice API allows you to easily send voice messages. You can send alerts, reminders, and notifications, # or you can send verification messages containing time-based, one-time passcodes (TOTP). class VoiceClient < Telesign::VoiceClient 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 end end