capsulecrm-b 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/examples.rb CHANGED
@@ -1,6 +1,13 @@
1
1
  # NOTE: CapsuleCRM::Person and CapsuleCRM::Organisation have virtually identically methods.
2
2
  require 'capsulecrm'
3
3
 
4
+ CapsuleCRM.account_name = "futureworkshops"
5
+ CapsuleCRM.api_token = ENV['CAPSULE_CRM_API_KEY']
6
+ CapsuleCRM.initialize!
7
+
8
+ oppo = CapsuleCRM::Opportunity.find(:all).first
9
+ puts oppo.party.name
10
+
4
11
  # find by id
5
12
  person = CapsuleCRM::Person.find 123
6
13
 
@@ -55,6 +55,9 @@ class CapsuleCRM::Opportunity < CapsuleCRM::Base
55
55
  new(attributes_from_xml_hash(data))
56
56
  end
57
57
 
58
-
58
+ def party
59
+ return nil if party_id.nil?
60
+ @party ||= CapsuleCRM::Party.find(party_id)
61
+ end
59
62
 
60
63
  end
@@ -1,3 +1,3 @@
1
1
  module CapsuleCRM
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capsulecrm-b
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: