0.0
The project is in a healthy, maintained state
Access the Persona REST API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.0.1
 Project Readme

persona-ruby

Persona is a service which is used to collect, verify, understand and orchestrate customer identities. This API is designed to allow Ruby developers to interact with the Persona API programmatically.

For reference, the Persona API documentation can be found here:

https://docs.withpersona.com/docs

Install

Add to your Gemfile:

gem 'persona-ruby'

Then bundle install.

Usage

API Client

The Persona API client uses an access token to authenticate API requests.

To obtain an access code you must visit the Persona Dashboard (https://app.withpersona.com/dashboard/api-keys).

Then you can create a Persona API client.

client = Persona::Client.new(
    access_token: 'access_token', # Access token from authorization flow
)

API Endpoints

For use of each endpoint please consult the Persona API reference.

List Inquiries

API docs

Example: client.inquiry_list()

Get Inquiry

API docs

Example: client.inquiry_get('abcd1234')

Create Inquiry

API docs

Example: client.inquiry_create(data = {"attribute1": "abc", "attribute2": "vcdf"})

Update Inquiry Update

API docs

Example: client.inquiry_update('abcd1234', data = {"attribute1": "abc", "attribute2": "vcdf"})

Delete Inquiry

API docs

Example: client.inquiry_update('abcd1234')

Errors

Any error code returned by the Persona API will result in one of the following expections

Code Exception
400 Persona::BadRequest
401 Persona::Unauthorized
403 Persona::Forbidden
404 Persona::NotFound
429 Persona::TooManyRequests
400...499 Persona::ClientError
500 Persona::InternalServerError
502 Persona::BadGateway
503 Persona::ServiceUnavailable
500...599 Persona::ServerError