Class: BriteAPI::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/brite-api/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key, options = {}) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


4
5
6
7
8
# File 'lib/brite-api/client.rb', line 4

def initialize(api_key, options = {})
  raise ArgumentError, "Missing BriteVerify API key" if api_key.nil? || api_key == ''
  @api_key = api_key
  @options = options
end

Instance Method Details

#contact_create(data = {}) ⇒ Object Also known as: create, contact



12
13
14
# File 'lib/brite-api/client.rb', line 12

def contact_create(data = {})
  BriteAPI::Contact.new(@api_key, @options, data)
end

#contactsObject



16
17
18
# File 'lib/brite-api/client.rb', line 16

def contacts
  self
end