class AdvisorsCommandClient::Client

Attributes

Public Class Methods

new(username, api_key, options = {}) click to toggle source
# File lib/advisors_command_client.rb, line 41
def initialize(username, api_key, options = {})
  url = AdvisorsCommandClient.config.api_url || options[:api_url]

  raise MissingAPIUrlError.new('A url for this client has not been configured.') if url.nil?

  @connection = AdvisorsCommandClient::Connection.new(username, api_key, url).build
end

Public Instance Methods

accounts() click to toggle source
# File lib/advisors_command_client.rb, line 53
def accounts
  @accounts ||= Models::AccountCollection.new(connection: @connection)
end
contacts() click to toggle source
# File lib/advisors_command_client.rb, line 49
def contacts
  @contacts ||= Models::ContactCollection.new(connection: @connection)
end