Module: CapsuleCRM

Defined in:
lib/capsulecrm.rb,
lib/capsulecrm/base.rb,
lib/capsulecrm/version.rb

Defined Under Namespace

Modules: History Classes: Address, Base, Child, ChildCollection, Collection, Contact, CustomField, Email, HistoryItem, Opportunity, Organisation, Party, Person, Phone, RecordNotFound, RecordNotRecognised, Tag, Website

Constant Summary collapse

VERSION =
"0.0.10"

Class Method Summary collapse

Class Method Details

.base_uri(account_name) ⇒ Object

nodoc



13
14
15
# File 'lib/capsulecrm.rb', line 13

def self.base_uri()
  "https://#{}.capsulecrm.com"
end

.initialize!Object

nodoc

Raises:

  • (ArgumentError)


19
20
21
22
23
24
# File 'lib/capsulecrm.rb', line 19

def self.initialize!
  raise ArgumentError, "CapsuleCRM.account_name not defined" if .nil?
  raise ArgumentError, "CapsuleCRM.api_token not defined" if api_token.nil?
  CapsuleCRM::Base.base_uri base_uri()
  CapsuleCRM::Base.basic_auth api_token, 'x'
end