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
-
.base_uri(account_name) ⇒ Object
nodoc.
-
.initialize! ⇒ Object
nodoc.
Class Method Details
.base_uri(account_name) ⇒ Object
nodoc
13 14 15 |
# File 'lib/capsulecrm.rb', line 13 def self.base_uri(account_name) "https://#{account_name}.capsulecrm.com" end |
.initialize! ⇒ Object
nodoc
19 20 21 22 23 24 |
# File 'lib/capsulecrm.rb', line 19 def self.initialize! raise ArgumentError, "CapsuleCRM.account_name not defined" if account_name.nil? raise ArgumentError, "CapsuleCRM.api_token not defined" if api_token.nil? CapsuleCRM::Base.base_uri base_uri(account_name) CapsuleCRM::Base.basic_auth api_token, 'x' end |