Class: TelesignEnterprise::TelebureauClient

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

Overview

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.

Instance Method Summary collapse

Constructor Details

#initialize(customer_id, api_key, rest_endpoint: 'https://rest-ww.telesign.com', timeout: nil, source: 'ruby_telesign_enterprise', sdk_version_origin: TelesignEnterprise::SDK_VERSION, sdk_version_dependency: Gem.loaded_specs['telesign'].version) ⇒ TelebureauClient

Returns a new instance of TelebureauClient.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/telesignenterprise/telebureau.rb', line 14

def initialize(customer_id,
               api_key,
               rest_endpoint: 'https://rest-ww.telesign.com',
               timeout: nil,
               source: 'ruby_telesign_enterprise',
               sdk_version_origin: TelesignEnterprise::SDK_VERSION,
               sdk_version_dependency: Gem.loaded_specs['telesign'].version)

  super(customer_id,
        api_key,
        rest_endpoint: rest_endpoint,
        timeout: timeout,
        source: source,
        sdk_version_origin: sdk_version_origin,
        sdk_version_dependency: sdk_version_dependency)
end

Instance Method Details

#delete_event(reference_id, **params) ⇒ Object

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.



45
46
47
48
49
# File 'lib/telesignenterprise/telebureau.rb', line 45

def delete_event(reference_id, **params)

  self.delete(TELEBUREAU_DELETE_RESOURCE % {:reference_id => reference_id},
              **params)
end

#retrieve_event(reference_id, **params) ⇒ Object

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.



35
36
37
38
39
# File 'lib/telesignenterprise/telebureau.rb', line 35

def retrieve_event(reference_id, **params)

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