README.md in onfido-0.8.2 vs README.md in onfido-0.8.3
- old
+ new
@@ -10,11 +10,11 @@
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'onfido', '~> 0.8.2'
+gem 'onfido', '~> 0.8.3'
```
## Configuration
There are 5 configuration options:
@@ -110,10 +110,11 @@
api.report.resume('check_id', 'report_id')
api.report.cancel('check_id', 'report_id')
```
#### Report Type Groups
+
Report type groups provide a convenient way to group and organize different types of reports.
The Onfido API only provides support for finding and listing them.
```ruby
api.report_type_group.find('report_type_group_id')
@@ -139,17 +140,26 @@
api.webhook.create(params) # => Creates a webhook endpoint
api.webhook.find('webhook_id') # => Finds a single webhook endpoint
api.webhook.all # => Returns all webhook endpoints
```
+#### SDK Tokens
+
+Onfido allows you to generate JSON Web Tokens via the API in order to authenticate
+with Onfido's [JavaScript SDK](https://github.com/onfido/onfido-sdk-ui).
+
+```ruby
+api.sdk_token.create(applicant_id: 'applicant_id', referrer: 'referrer')
+```
+
### Pagination
All resources that support an `all` method also support pagination. By default,
the first 20 records are fetched.
### Error Handling
-There are three classes of errors raised by the library, all of which subclass `Onfido::Error`:
+There are three classes of errors raised by the library, all of which subclass `Onfido::OnfidoError`:
- `Onfido::ServerError` is raised whenever Onfido returns a `5xx` response
- `Onfido::RequestError` is raised whenever Onfido returns any other kind of error
- `Onfido::ConnectionError` is raised whenever a network error occurs (e.g., a timeout)
All three error classes provide the `response_code`, `response_body`, `json_body`, `type` and `fields` of the error (although for `Onfido::ServerError` and `Onfido::ConnectionError` the last three are likely to be `nil`).