Skip to content

Commit

Permalink
Use request token instead installation id on README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaswilliamgomes committed Aug 14, 2024
1 parent 7f035e1 commit 27facc3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ For sandbox credentials, refer to the [API testing guide]().

### Registering a Signup

This method registers a new signup for the given installation and address, returning a signup assessment, containing the risk assessment and supporting evidence:
This method registers a new signup for the given request token and address, returning a signup assessment, containing the risk assessment and supporting evidence:

```ruby
address = Incognia::Address.new(line: "West 34th Street, New York City, NY 10001")
installation_id = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
request_token = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."

assessment = api.register_signup(
installation_id: installation_id,
request_token: request_token,
address: address
)

Expand All @@ -68,11 +68,11 @@ It also supports optional parameters, for example:

```ruby
address = Incognia::Address.new(line: "West 34th Street, New York City, NY 10001")
installation_id = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
request_token = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
external_id = "7b02736a-7718-4b83-8982-f68fb6f501fa"

assessment = api.register_signup(
installation_id: installation_id,
request_token: request_token,
address: address,
external_id: external_id
)
Expand All @@ -82,14 +82,14 @@ assessment = api.register_signup(

### Registering a Login

This method registers a new login for the given installation and account, returning a login assessment, containing the risk assessment and supporting evidence:
This method registers a new login for the given request token and account, returning a login assessment, containing the risk assessment and supporting evidence:

```ruby
installation_id = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
request_token = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
account_id = 'account-identifier-123'

assessment = api.register_login(
installation_id: installation_id,
request_token: request_token,
account_id: account_id,
)

Expand All @@ -100,12 +100,12 @@ assessment = api.register_login(
It also supports optional parameters, for example:

```ruby
installation_id = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
request_token = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
account_id = 'account-identifier-123'
external_id = 'some-external-identifier'

assessment = api.register_login(
installation_id: installation_id,
request_token: request_token,
account_id: account_id,
external_id: external_id,
eval: false # can be used to register a new login without evaluating it
Expand All @@ -116,12 +116,12 @@ assessment = api.register_login(

### Registering Payment

This method registers a new payment for the given installation and account, returning a `hash`,
This method registers a new payment for the given request token and account, returning a `hash`,
containing the risk assessment and supporting evidence.

```ruby
assessment = api.register_payment(
installation_id: 'installation-id',
request_token: 'request-token',
account_id: 'account-id'
)

Expand Down Expand Up @@ -181,7 +181,7 @@ payment_methods = [
]

assessment = api.register_payment(
installation_id: 'installation-id',
request_token: 'request-token',
account_id: 'account-id',
external_id: 'external-id',
addresses: addresses,
Expand All @@ -202,14 +202,14 @@ The `expires_at` argument should be a _Time_, _DateTime_ or an date in **RFC 333


```ruby
installation_id = 'installation-id'
request_token = 'request-token'
account_id = 'account-id'
occurred_at = DateTime.parse('2024-07-22T15:20:00Z')

success = api.register_feedback(
event: Incognia::Constants::FeedbackEvent::ACCOUNT_TAKEOVER,
occurred_at: occurred_at,
installation_id: installation_id,
request_token: request_token,
account_id: account_id
)

Expand All @@ -222,7 +222,7 @@ For custom fraud, set the value of `event` with the corresponding code:
success = api.register_feedback(
event: 'custom_fraud_name',
occurred_at: occurred_at,
installation_id: installation_id,
request_token: request_token,
account_id: account_id
)

Expand Down

0 comments on commit 27facc3

Please sign in to comment.