telesign 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/telesign.rb +101 -1
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5e4faab130d077bd865c8b11d76e3873a04646b
4
- data.tar.gz: fd647261f558b13ce9908f59bc2afdc2e2ce94e5
3
+ metadata.gz: f4fb4ae5bbb4416898ea2e7c112f2d2b2a6b0034
4
+ data.tar.gz: 6c04091a0147ad4a043fabb157a69bd2c7783ef6
5
5
  SHA512:
6
- metadata.gz: 19d28c08bc21a28bd27f33599e71946545f57b46b8139383fbeafbef20b5b75ae8e254fcdffcf55dcb19c6aac7c145c17efb11fc8029d18743964d1bebc3dd29
7
- data.tar.gz: 8c14d197c6e50361813cf5f087df058df90f4199d9298cfc31c19308783bbdc85b502254353e24b67dcf525d4d7ff07a4fb832209ee466df5af874fa20620e8e
6
+ metadata.gz: 76bd07cd4c2154d66fe0e6ffdf63affdeaca551de2bbddf436681721bcd213126488d5a7e9a0afa74891942a5bcf54db3dd65cbe0521b20377b053a8e97fe343
7
+ data.tar.gz: b98936cbed7db929f4018046e21d8201440af6b179a924cdfeff2993e68a160879fb3c308dd56bbd79b6a024d3aecc5ee614133e631ead4afcc990ce79a9c9bd
@@ -158,6 +158,26 @@ module Telesign
158
158
  timeout)
159
159
  end
160
160
 
161
+ # In addition to the information retrieved by standard, this service provides
162
+ # information on call forwarding for the phone number provided.
163
+ def number_deactivation(phone_number,
164
+ use_case_code,
165
+ extra=nil,
166
+ timeout=nil)
167
+
168
+ params = {:ucid => use_case_code}
169
+
170
+ unless extra.nil?
171
+ params.merge!(extra)
172
+ end
173
+
174
+ execute(Net::HTTP::Get,
175
+ "/v1/phoneid/number_deactivation/#{phone_number}",
176
+ params,
177
+ nil,
178
+ timeout)
179
+ end
180
+
161
181
  end
162
182
 
163
183
  # The Verify class exposes several services for sending users a verification
@@ -270,7 +290,7 @@ module Telesign
270
290
  end
271
291
 
272
292
  execute(Net::HTTP::Post,
273
- "/v1/verify/push",
293
+ "/v2/verify/push",
274
294
  nil,
275
295
  params,
276
296
  timeout)
@@ -301,5 +321,85 @@ module Telesign
301
321
  timeout)
302
322
  end
303
323
  end
324
+
325
+
326
+ # The **Telebureau** class exposes services for creating, retrieving, updating and
327
+ # deleting telebureau fraud events. You can use this mechanism to simply test whether
328
+ # you can reach telebureau services.
329
+ class TeleBureau < Telesign::API::Rest
330
+
331
+ def initialize(customer_id,
332
+ secret_key,
333
+ ssl=true,
334
+ api_host='rest.telesign.com',
335
+ timeout=nil)
336
+
337
+ super(customer_id,
338
+ secret_key,
339
+ ssl,
340
+ api_host,
341
+ timeout)
342
+ end
343
+
344
+ # Creates a telebureau event corresponding to supplied data.
345
+ def create(phone_number,
346
+ fraud_type,
347
+ occurred_at,
348
+ extra=nil,
349
+ timeout=nil)
350
+
351
+ params = {:phone_number => phone_number,
352
+ :fraud_type => fraud_type,
353
+ :occurred_at => occurred_at}
354
+
355
+ unless extra.nil?
356
+ params.merge!(extra)
357
+ end
358
+
359
+ execute(Net::HTTP::Post,
360
+ "/v1/telebureau/event",
361
+ nil,
362
+ params,
363
+ timeout)
364
+ end
365
+
366
+ # Retrieves the fraud event status. You make this call in your web application after
367
+ # completion of create transaction for a telebureau event.
368
+ def retrieve(reference_id,
369
+ extra=nil,
370
+ timeout=nil)
371
+
372
+ params = {}
373
+
374
+ unless extra.nil?
375
+ params.merge!(extra)
376
+ end
377
+
378
+ execute(Net::HTTP::Get,
379
+ "/v1/telebureau/event/#{reference_id}",
380
+ params,
381
+ nil,
382
+ timeout)
383
+ end
384
+
385
+ # Deletes a previously submitted fraud event. You make this call in your web application
386
+ # after completion of the create transaction for a telebureau event.
387
+ def delete(reference_id,
388
+ extra=nil,
389
+ timeout=nil)
390
+
391
+ params = {}
392
+
393
+ unless extra.nil?
394
+ params.merge!(extra)
395
+ end
396
+
397
+ execute(Net::HTTP::Delete,
398
+ "/v1/telebureau/event/#{reference_id}",
399
+ params,
400
+ nil,
401
+ timeout)
402
+ end
403
+ end
304
404
  end
305
405
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telesign
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrad Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2016-11-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: TeleSign Ruby SDK
14
14
  email: jarrad@telesign.com
@@ -19,7 +19,8 @@ files:
19
19
  - lib/telesign.rb
20
20
  - lib/telesign/rest.rb
21
21
  homepage: http://rubygems.org/gems/telesign
22
- licenses: []
22
+ licenses:
23
+ - MIT
23
24
  metadata: {}
24
25
  post_install_message:
25
26
  rdoc_options: []