telesignenterprise 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 84ebab8b70f95eaecfe9cf0e17b8320aab52e53b
4
+ data.tar.gz: 0aec257beb29fd28e9d4f45e46ec3bc082efa9fb
5
+ SHA512:
6
+ metadata.gz: 87ddacee0f5a9d339d048f9823f86f24e8ee1d411d82c2a25e6d32541bcaa05f3c1229b663ffd518310f5c713ba32ff2bbf9693b30ec21314dccc541d5af143d
7
+ data.tar.gz: 9f36c4c9a1ad8d15abe232778657f64f3356031f492abd1caa4b06cd787f90b12375acf596e4ee4db7b9c833999afbaa82ffd891817290b7f5d17f32cf5bb9e8
@@ -0,0 +1,7 @@
1
+ require 'telesignenterprise/phoneid'
2
+ require 'telesignenterprise/telebureau'
3
+ require 'telesignenterprise/verify'
4
+ require 'telesignenterprise/score'
5
+ require 'telesignenterprise/messaging'
6
+ require 'telesignenterprise/voice'
7
+ require 'telesignenterprise/appverify'
@@ -0,0 +1,21 @@
1
+ require 'telesign'
2
+
3
+ module TelesignEnterprise
4
+
5
+ # App Verify is a secure, lightweight SDK that integrates a frictionless user verification process into existing
6
+ # native mobile applications.
7
+ class AppVerifyClient < Telesign::AppVerifyClient
8
+
9
+ def initialize(customer_id,
10
+ api_key,
11
+ rest_endpoint: 'https://rest-ww.telesign.com',
12
+ timeout: nil)
13
+
14
+ super(customer_id,
15
+ api_key,
16
+ rest_endpoint: rest_endpoint,
17
+ timeout: timeout)
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,20 @@
1
+ require 'telesign'
2
+
3
+ module TelesignEnterprise
4
+
5
+ # TeleSign's Messaging API allows you to easily send SMS messages. You can send alerts, reminders, and notifications,
6
+ # or you can send verification messages containing one-time passcodes (OTP).
7
+ class MessagingClient < Telesign::MessagingClient
8
+
9
+ def initialize(customer_id,
10
+ api_key,
11
+ rest_endpoint: 'https://rest-ww.telesign.com',
12
+ timeout: nil)
13
+
14
+ super(customer_id,
15
+ api_key,
16
+ rest_endpoint: rest_endpoint,
17
+ timeout: timeout)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,85 @@
1
+ require 'telesign/phoneid'
2
+
3
+ PHONEID_STANDARD_RESOURCE = '/v1/phoneid/standard/%{phone_number}'
4
+ PHONEID_SCORE_RESOURCE = '/v1/phoneid/score/%{phone_number}'
5
+ PHONEID_CONTACT_RESOURCE = '/v1/phoneid/contact/%{phone_number}'
6
+ PHONEID_LIVE_RESOURCE = '/v1/phoneid/live/%{phone_number}'
7
+ PHONEID_NUMBER_DEACTIVATION_RESOURCE = '/v1/phoneid/number_deactivation/%{phone_number}'
8
+
9
+ module TelesignEnterprise
10
+
11
+ # A set of APIs that deliver deep phone number data attributes that help optimize the end user
12
+ # verification process and evaluate risk.
13
+ #
14
+ # TeleSign PhoneID provides a wide range of risk assessment indicators on the number to help confirm user identity,
15
+ # delivering real-time decision making throughout the number lifecycle and ensuring only legitimate users are
16
+ # creating accounts and accessing your applications.
17
+ class PhoneIdClient < Telesign::PhoneIdClient
18
+
19
+ def initialize(customer_id,
20
+ api_key,
21
+ rest_endpoint: 'https://rest-ww.telesign.com',
22
+ timeout: nil)
23
+
24
+ super(customer_id,
25
+ api_key,
26
+ rest_endpoint: rest_endpoint,
27
+ timeout: timeout)
28
+ end
29
+
30
+ # The PhoneID Standard API that provides phone type and telecom carrier information to identify which phone
31
+ # numbers can receive SMS messages and/or a potential fraud risk.
32
+ #
33
+ # See https://developer.telesign.com/docs/rest_phoneid-standard for detailed API documentation.
34
+ def standard(phone_number, **params)
35
+
36
+ self.get(PHONEID_STANDARD_RESOURCE % {:phone_number => phone_number},
37
+ **params)
38
+ end
39
+
40
+ # Score is an API that delivers reputation scoring based on phone number intelligence, traffic patterns, machine
41
+ # learning, and a global data consortium.
42
+ #
43
+ # See https://developer.telesign.com/docs/rest_api-phoneid-score for detailed API documentation.
44
+ def score(phone_number, ucid, **params)
45
+
46
+ self.get(PHONEID_SCORE_RESOURCE % {:phone_number => phone_number},
47
+ ucid: ucid,
48
+ **params)
49
+ end
50
+
51
+ # The PhoneID Contact API delivers contact information related to the subscriber's phone number to provide another
52
+ # set of indicators for established risk engines.
53
+ #
54
+ # See https://developer.telesign.com/docs/rest_api-phoneid-contact for detailed API documentation.
55
+ def contact(phone_number, ucid, **params)
56
+
57
+ self.get(PHONEID_CONTACT_RESOURCE % {:phone_number => phone_number},
58
+ ucid: ucid,
59
+ **params)
60
+ end
61
+
62
+ # The PhoneID Live API delivers insights such as whether a phone is active or disconnected, a device is reachable
63
+ # or unreachable and its roaming status.
64
+ #
65
+ # See https://developer.telesign.com/docs/rest_api-phoneid-live for detailed API documentation.
66
+ def live(phone_number, ucid, **params)
67
+
68
+ self.get(PHONEID_LIVE_RESOURCE % {:phone_number => phone_number},
69
+ ucid: ucid,
70
+ **params)
71
+ end
72
+
73
+ # The PhoneID Number Deactivation API determines whether a phone number has been deactivated and when, based on
74
+ # carriers' phone number data and TeleSign's proprietary analysis.
75
+ #
76
+ # See https://developer.telesign.com/docs/rest_api-phoneid-number-deactivation for detailed API documentation.
77
+ def number_deactivation(phone_number, ucid, **params)
78
+
79
+ self.get(PHONEID_NUMBER_DEACTIVATION_RESOURCE % {:phone_number => phone_number},
80
+ ucid: ucid,
81
+ **params)
82
+ end
83
+
84
+ end
85
+ end
@@ -0,0 +1,20 @@
1
+ require 'telesign'
2
+
3
+ module TelesignEnterprise
4
+
5
+ # Score provides risk information about a specified phone number.
6
+ class ScoreClient < Telesign::ScoreClient
7
+
8
+ def initialize(customer_id,
9
+ api_key,
10
+ rest_endpoint: 'https://rest-ww.telesign.com',
11
+ timeout: nil)
12
+
13
+ super(customer_id,
14
+ api_key,
15
+ rest_endpoint: rest_endpoint,
16
+ timeout: timeout)
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,57 @@
1
+ require 'telesign/rest'
2
+
3
+ TELEBUREAU_CREATE_RESOURCE = '/v1/telebureau/event'
4
+ TELEBUREAU_RETRIEVE_RESOURCE = '/v1/telebureau/event/%{reference_id}'
5
+ TELEBUREAU_DELETE_RESOURCE = '/v1/telebureau/event/%{reference_id}'
6
+
7
+ module TelesignEnterprise
8
+
9
+ # TeleBureau is a service is based on TeleSign's watchlist, which is a proprietary database containing verified phone
10
+ # numbers of users known to have committed online fraud. TeleSign crowd-sources this information from its customers.
11
+ # Participation is voluntary, but you have to contribute in order to benefit.
12
+ class TelebureauClient < Telesign::RestClient
13
+
14
+ def initialize(customer_id,
15
+ api_key,
16
+ rest_endpoint: 'https://rest-ww.telesign.com',
17
+ timeout: nil)
18
+
19
+ super(customer_id,
20
+ api_key,
21
+ rest_endpoint: rest_endpoint,
22
+ timeout: timeout)
23
+ end
24
+
25
+ # Creates a telebureau event corresponding to supplied data.
26
+ #
27
+ # See https://developer.telesign.com/docs/telebureau-api for detailed API documentation.
28
+ def create_event(phone_number, fraud_type, occurred_at, **params)
29
+
30
+ self.post(TELEBUREAU_CREATE_RESOURCE,
31
+ phone_number: phone_number,
32
+ fraud_type: fraud_type,
33
+ occured_at: occurred_at,
34
+ **params)
35
+ end
36
+
37
+ # Retrieves the fraud event status. You make this call in your web application after completion of create
38
+ # transaction for a telebureau event.
39
+ #
40
+ # See https://developer.telesign.com/docs/telebureau-api for detailed API documentation.
41
+ def retrieve_event(reference_id, **params)
42
+
43
+ self.get(TELEBUREAU_RETRIEVE_RESOURCE % {:reference_id => reference_id},
44
+ **params)
45
+ end
46
+
47
+ # Deletes a previously submitted fraud event. You make this call in your web application after completion of the
48
+ # create transaction for a telebureau event.
49
+ #
50
+ # See https://developer.telesign.com/docs/telebureau-api for detailed API documentation.
51
+ def delete_event(reference_id, **params)
52
+
53
+ self.delete(TELEBUREAU_DELETE_RESOURCE % {:reference_id => reference_id},
54
+ **params)
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,95 @@
1
+ require 'telesign/rest'
2
+
3
+ VERIFY_SMS_RESOURCE = '/v1/verify/sms'
4
+ VERIFY_VOICE_RESOURCE = '/v1/verify/call'
5
+ VERIFY_SMART_RESOURCE = '/v1/verify/smart'
6
+ VERIFY_PUSH_RESOURCE = '/v2/verify/push'
7
+ VERIFY_STATUS_RESOURCE = '/v1/verify/%{reference_id}'
8
+ VERIFY_COMPLETION_RESOURCE = '/v1/verify/completion/%{reference_id}'
9
+
10
+ module TelesignEnterprise
11
+
12
+ # The Verify API delivers phone-based verification and two-factor authentication using a time-based, one-time passcode
13
+ # sent via SMS message, Voice call or Push Notification.
14
+ class VerifyClient < Telesign::RestClient
15
+
16
+ def initialize(customer_id,
17
+ api_key,
18
+ rest_endpoint: 'https://rest-ww.telesign.com',
19
+ timeout: nil)
20
+
21
+ super(customer_id,
22
+ api_key,
23
+ rest_endpoint: rest_endpoint,
24
+ timeout: timeout)
25
+ end
26
+
27
+ # The SMS Verify API delivers phone-based verification and two-factor authentication using a time-based,
28
+ # one-time passcode sent over SMS.
29
+ #
30
+ # See https://developer.telesign.com/docs/rest_api-verify-sms for detailed API documentation.
31
+ def sms(phone_number, **params)
32
+
33
+ self.post(VERIFY_SMS_RESOURCE,
34
+ phone_number: phone_number,
35
+ **params)
36
+ end
37
+
38
+ # The Voice Verify API delivers patented phone-based verification and two-factor authentication using a one-time
39
+ # passcode sent over voice message.
40
+ #
41
+ # See https://developer.telesign.com/docs/rest_api-verify-call for detailed API documentation.
42
+ def voice(phone_number, **params)
43
+
44
+ self.post(VERIFY_VOICE_RESOURCE,
45
+ phone_number: phone_number,
46
+ **params)
47
+ end
48
+
49
+ # The Smart Verify web service simplifies the process of verifying user identity by integrating several TeleSign
50
+ # web services into a single API call. This eliminates the need for you to make multiple calls to the TeleSign
51
+ # Verify resource.
52
+ #
53
+ # See https://developer.telesign.com/docs/rest_api-smart-verify for detailed API documentation.
54
+ def smart(phone_number, ucid, **params)
55
+
56
+ self.post(VERIFY_SMART_RESOURCE,
57
+ phone_number: phone_number,
58
+ ucid: ucid,
59
+ **params)
60
+ end
61
+
62
+ # The Push Verify web service allows you to provide on-device transaction authorization for your end users. It
63
+ # works by delivering authorization requests to your end users via push notification, and then by receiving their
64
+ # permission responses via their mobile device's wireless Internet connection.
65
+ #
66
+ # See https://developer.telesign.com/docs/rest_api-verify-push for detailed API documentation.
67
+ def push(phone_number, ucid, **params)
68
+
69
+ self.post(VERIFY_PUSH_RESOURCE,
70
+ phone_number: phone_number,
71
+ ucid: ucid,
72
+ **params)
73
+ end
74
+
75
+ # Retrieves the verification result for any verify resource.
76
+ #
77
+ # See https://developer.telesign.com/docs/rest_api-verify-transaction-callback for detailed API documentation.
78
+ def status(reference_id, **params)
79
+
80
+ self.get(VERIFY_STATUS_RESOURCE % {:reference_id => reference_id},
81
+ **params)
82
+ end
83
+
84
+ # Notifies TeleSign that a verification was successfully delivered to the user in order to help improve the
85
+ # quality of message delivery routes.
86
+ #
87
+ # See https://developer.telesign.com/docs/completion-service-for-verify-products for detailed API documentation.
88
+ def completion(reference_id, **params)
89
+
90
+ self.put(VERIFY_COMPLETION_RESOURCE % {:reference_id => reference_id},
91
+ **params)
92
+ end
93
+
94
+ end
95
+ end
@@ -0,0 +1,20 @@
1
+ require 'telesign'
2
+
3
+ module TelesignEnterprise
4
+
5
+ # TeleSign's Voice API allows you to easily send voice messages. You can send alerts, reminders, and notifications,
6
+ # or you can send verification messages containing time-based, one-time passcodes (TOTP).
7
+ class VoiceClient < Telesign::VoiceClient
8
+
9
+ def initialize(customer_id,
10
+ api_key,
11
+ rest_endpoint: 'https://rest-ww.telesign.com',
12
+ timeout: nil)
13
+
14
+ super(customer_id,
15
+ api_key,
16
+ rest_endpoint: rest_endpoint,
17
+ timeout: timeout)
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: telesignenterprise
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.1
5
+ platform: ruby
6
+ authors:
7
+ - TeleSign
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: telesign
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.2.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.2.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: uuid
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mocha
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: codecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: test-unit
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: TeleSign Enterprise Ruby SDK
126
+ email: support@telesign.com
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files: []
130
+ files:
131
+ - lib/telesignenterprise.rb
132
+ - lib/telesignenterprise/appverify.rb
133
+ - lib/telesignenterprise/messaging.rb
134
+ - lib/telesignenterprise/phoneid.rb
135
+ - lib/telesignenterprise/score.rb
136
+ - lib/telesignenterprise/telebureau.rb
137
+ - lib/telesignenterprise/verify.rb
138
+ - lib/telesignenterprise/voice.rb
139
+ homepage: http://rubygems.org/gems/telesign
140
+ licenses:
141
+ - MIT
142
+ metadata: {}
143
+ post_install_message:
144
+ rdoc_options: []
145
+ require_paths:
146
+ - lib
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ requirements: []
158
+ rubyforge_project:
159
+ rubygems_version: 2.6.14.4
160
+ signing_key:
161
+ specification_version: 4
162
+ summary: TeleSign Enterprise Ruby SDK
163
+ test_files: []