Class: BriteAPI::Client
- Inherits:
-
Object
- Object
- BriteAPI::Client
- Defined in:
- lib/brite-api/client.rb
Instance Method Summary collapse
- #contact_create(data = {}) ⇒ Object (also: #create, #contact)
- #contacts ⇒ Object
-
#initialize(api_key, options = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key, options = {}) ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 |
# File 'lib/brite-api/client.rb', line 4 def initialize(api_key, = {}) raise ArgumentError, "Missing BriteVerify API key" if api_key.nil? || api_key == '' @api_key = api_key @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 |
#contacts ⇒ Object
16 17 18 |
# File 'lib/brite-api/client.rb', line 16 def contacts self end |