Class: TelesignEnterprise::TelebureauClient
- Inherits:
-
Telesign::RestClient
- Object
- Telesign::RestClient
- TelesignEnterprise::TelebureauClient
- 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
-
#create_event(phone_number, fraud_type, occurred_at, **params) ⇒ Object
Creates a telebureau event corresponding to supplied data.
-
#delete_event(reference_id, **params) ⇒ Object
Deletes a previously submitted fraud event.
-
#initialize(customer_id, api_key, rest_endpoint: 'https://rest-ww.telesign.com', timeout: nil) ⇒ TelebureauClient
constructor
A new instance of TelebureauClient.
-
#retrieve_event(reference_id, **params) ⇒ Object
Retrieves the fraud event status.
Constructor Details
#initialize(customer_id, api_key, rest_endpoint: 'https://rest-ww.telesign.com', timeout: nil) ⇒ TelebureauClient
Returns a new instance of TelebureauClient.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/telesignenterprise/telebureau.rb', line 14 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 |
Instance Method Details
#create_event(phone_number, fraud_type, occurred_at, **params) ⇒ Object
Creates a telebureau event corresponding to supplied data.
See developer.telesign.com/docs/telebureau-api for detailed API documentation.
28 29 30 31 32 33 34 35 |
# File 'lib/telesignenterprise/telebureau.rb', line 28 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 |
#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 developer.telesign.com/docs/telebureau-api for detailed API documentation.
51 52 53 54 55 |
# File 'lib/telesignenterprise/telebureau.rb', line 51 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 developer.telesign.com/docs/telebureau-api for detailed API documentation.
41 42 43 44 45 |
# File 'lib/telesignenterprise/telebureau.rb', line 41 def retrieve_event(reference_id, **params) self.get(TELEBUREAU_RETRIEVE_RESOURCE % {:reference_id => reference_id}, **params) end |