infopark_crm_connector 0.9.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.yardopts +8 -0
  2. data/CHANGELOG.markdown +94 -0
  3. data/LICENSE +2 -0
  4. data/README.markdown +110 -0
  5. data/lib/crm_connector.rb +11 -15
  6. data/lib/crm_connector/account.rb +31 -2
  7. data/lib/crm_connector/activity.rb +61 -3
  8. data/lib/crm_connector/configuration.rb +2 -4
  9. data/lib/crm_connector/contact.rb +123 -3
  10. data/lib/crm_connector/core/continuation_support.rb +2 -1
  11. data/lib/crm_connector/core/enumerator.rb +20 -11
  12. data/lib/crm_connector/core/known_attributes.rb +3 -1
  13. data/lib/crm_connector/core/resource.rb +108 -16
  14. data/lib/crm_connector/core/search_support.rb +3 -1
  15. data/lib/crm_connector/custom_type.rb +20 -3
  16. data/lib/crm_connector/{default.rb → errors.rb} +1 -1
  17. data/lib/crm_connector/errors/authentication_failed.rb +10 -0
  18. data/lib/crm_connector/errors/base.rb +8 -0
  19. data/lib/crm_connector/event.rb +37 -2
  20. data/lib/crm_connector/event_contact.rb +38 -2
  21. data/lib/crm_connector/mailing.rb +35 -2
  22. data/lib/crm_connector/role.rb +7 -2
  23. data/lib/crm_connector/system.rb +14 -8
  24. metadata +22 -53
  25. data/CHANGELOG.rdoc +0 -87
  26. data/README.rdoc +0 -59
  27. data/lib/crm_connector/base.rb +0 -4
  28. data/lib/crm_connector/core/base.rb +0 -111
  29. data/lib/crm_connector/debugging.rb +0 -21
  30. data/lib/crm_connector/default/account.rb +0 -30
  31. data/lib/crm_connector/default/activity.rb +0 -54
  32. data/lib/crm_connector/default/contact.rb +0 -112
  33. data/lib/crm_connector/default/custom_type.rb +0 -24
  34. data/lib/crm_connector/default/event.rb +0 -23
  35. data/lib/crm_connector/default/event_contact.rb +0 -57
  36. data/lib/crm_connector/default/mailing.rb +0 -33
  37. data/lib/crm_connector/default/resource.rb +0 -10
  38. data/lib/crm_connector/default/role.rb +0 -9
  39. data/lib/crm_connector/inheriting_resource.rb +0 -30
  40. data/lib/crm_connector/resource.rb +0 -15
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ --tag webcrm_rest_url:"WebCRM Rest Url"
2
+ --tag webcrm_todo:"WebCRM To Do"
3
+ --hide-tag webcrm_todo
4
+ --hide-void-return
5
+ --no-private
6
+ -
7
+ LICENSE
8
+ CHANGELOG.markdown
@@ -0,0 +1,94 @@
1
+ ## Version 1.0.0 - 2012-09-14
2
+ * Enabled support for `event.custom_attributes`
3
+ * Removed deprecated functions `EventContact.find_by` and `EventContact.find_by_event_id_and_contact_id`. Please user `EventContact.search` instead.
4
+ * Removed `configuration.debug`.
5
+ * Renamed `Infopark::Crm::AuthenticationFailed` to `Infopark::Crm::Errors::AuthenticationFailed`.
6
+ * Merged `Infopark::Crm::Core::Base` and `Infopark::Crm::Resource` into `Infopark::Crm::Core:Resource`.
7
+
8
+ ## Version 0.9.2 - 2012-03-19
9
+ * Security improvement for `Contact.authenticate`, `Contact.password_set` and `contact.password_request`
10
+
11
+ ## Version 0.9.1 - 2012-02-28
12
+ * Removed `Diary`. Please use `Activity` instead.
13
+ * Added `Mailing`
14
+ * Added `appointment_*` and `task_*` fields to `Activity`
15
+ * Added `role_names` field to `Contact`
16
+ * Added `tags` field to `Activity`, `Account` and `Contact`
17
+
18
+ ## Version 0.9 - 2012-01-27
19
+ Initial Release of Infopark CRM Connector
20
+
21
+ ### Changes from OMC Connector to CRM Connector
22
+ * Namespace changed from `OmcConector::` to `Infopark::Crm::`
23
+ * Attribute names may have changed. For new attributes please refer to [Web Services API documentation](http://kb.infopark.de/crm-api).
24
+ * Works only with Infopark WebCRM.
25
+
26
+ #### Changed configuration
27
+ * `live_server_groups_callback` - replaces `contact_roles_callback`
28
+
29
+ #### New classes
30
+ * `CustomType`
31
+ * `Role`
32
+ * `System`
33
+
34
+ #### New methods
35
+ * `Account.search`
36
+ * `Activity.search`
37
+ * `Contact.search`
38
+ * `Event.search`
39
+ * `EventContact.search`
40
+ * `contact.live_server_groups` - replaces `contact.roles`
41
+
42
+ #### Removed classes
43
+ * `AccountCollection`
44
+ * `InquiryKind` - use `CustomType`
45
+ * `InquiryLink`
46
+ * `Inquiry` - use `Activity`
47
+ * `Location` - use `contact` and `account` properties
48
+ * `Mailing`
49
+ * `RegistrationInquiry`
50
+ * `Session`
51
+
52
+
53
+ #### Removed methods
54
+ * `account.contacts` - use `Contact.search(:params => {:acount_id => acount_id})`
55
+ * `Account.find_by_name` - use `Account.search`
56
+ * `account.inquiries` - use `Activity.search(:params => {:account_id => account_id})`
57
+ * `account.locations`
58
+ * `contact.account_activities` - use `Activity.search(:query => {:account_id => account_id})`
59
+ * `contact.activities` - use `Activity.search(:params => {:contact_id => contact_id})`
60
+ * `contact.create_activity`
61
+ * `contact.create_diary`
62
+ * `contact.create_location_with_account_association`
63
+ * `contact.create_location`
64
+ * `contact.create_registration_request`
65
+ * `contact.event_participation`
66
+ * `contact.find_activity`
67
+ * `Contact.find_by_email` - use `Contact.search(:params => {:email => email})`
68
+ * `Contact.find_by_login` - use `Contact.search(:params => {:login => login})`
69
+ * `Contact.languages`
70
+ * `contact.location`
71
+ * `Contact.lookup_uptions`
72
+ * `contact.move_location`
73
+ * `contact.roles` - use `contact.live_server_groups`
74
+ * `contact.serialized_attributes` - use `contact.attributes`
75
+ * `contact.subscriptions`
76
+ * `Contact.titles`
77
+ * `contact.update_location`
78
+ * `contact.update_subscriptions`
79
+ * `contact.validate_login` - use `Contact.search(:params => {:login => login})`
80
+ * `event.attend(!)`
81
+ * `event.contacts` - use `EventContact.search(:event_id => event_id)`
82
+ * `Event.find_by_name`
83
+ * `event.inquire(!)`
84
+ * `event.refuse(!)`
85
+ * `event.register(!)`
86
+ * `event_contact.attend` - use `event_contact.status = 'attended'`
87
+ * `event_contact.inquire` - use `event_contact.status = 'unregistered'`
88
+ * `event_contact.refuse` - use `event_contact.status = 'refused'`
89
+ * `event_contact.register` - use `event_contact.status = 'registered'`
90
+ * `event_contact.update_details`
91
+ * `inquiry.create_diary`
92
+ * `inquiry.create_link`
93
+ * `inquiry.diaries`
94
+ * `inquiry.links`
data/LICENSE CHANGED
@@ -1 +1,3 @@
1
1
  Copyright (c) 2009 - 2012 Infopark AG (http://www.infopark.com)
2
+
3
+ This software can be used and modified under the LGPLv3. Please refer to http://www.gnu.org/licenses/lgpl-3.0.html for the license text.
data/README.markdown ADDED
@@ -0,0 +1,110 @@
1
+ <img alt="Infopark WebCRM Connector" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAC8CAMAAACni+FPAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAwBQTFRF/+Rcp6aj6enp58VdxEFKrZZO6TpHFxcXZmZmtTxFU1NTukBJ5ubmntf8WKLs/91bbxQZ+jhG//yN+Pj4//96mpqZdXZ1yy45xcXC/md0xTlD4eHg9vb2H23gKysrK1aV+9NW/UhWhoaGR0dH3d3d/+hd2NjY9PPz//Rjs7Oy/ltp/8jVxKlVXV1dw7y88vLyYmJi/+xfw8K+1tXV//6o8ctS//5tvb25Mmau7+/v/7jGs6io7u7u0NDQ/nSBBgYGzs7Np4+RwOz+WFhYgRQbIiIiycnE7OzspzQ8/9lYy6k9yMLCUW+c3z1J4sBb0dHN9NZki2lr0szN3b1avLO0kIpvbW1tMl+huaBSODg4ujU+ycnJqbTF27pVu7u2nIhL/4eTiSgt07NS//lminpJ/6m41dXRpRQb/tZXkEpP3d3ZrjlB2trWzUBKw6ZO2rVCzc3I1j9KNYz0bY3A/T9N9MtK39/e2vv/opRnL1qaYVc6KVKPuVorzsnJ0TpFLkNpoaGgd2pB3TlFeVBTaTA8zK9V///U+Sk4Tltu2yAr0bRZyXY2ty43txggJ02I8UVRHTlk//6958BIuJo9/5mm3jRA3dTV7P//m25x7T9Lqio0/1Fe/vRx+9RQ//BgIF+9d7z2tdPai6C+sLCvU2N/i4+W05FD/9HfqUJK///o//X/vyUuhTZCzzVA/+Bbv8TJ989U8dF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VSA4OW9R6SOgymg91HxkfzU+HBYh+nTyJY1IuRBCiscwCoiDSToP6NU1yoEfxrSAPx8aDnIdaD6OH4CPy49L8dHCABII8taIJuZV8WvIhlhJhjowgKQIlEDqQHQwPo4fjI9gP4cel+en4AIkEiWEMupBbRYjm1AQi4EX5HCSEEmGpXnQcTg5CB7HDvUeix4CP5qfDA2SGEGNIDmUqRQJIDfkNovzIH9hBmE/BEchJFLNmCo9AT52BHo1PxwVIJEjOpiFCjCG7wBDOiRSMrEXLcXQ4PSb4EPPR/NwtAMkIeQwIcYYkiOKpl6S1qsTERDN4+H4F89H43IUAqQi5BIRMGWIQSSRRmhKNokWjogzwYHp84KP5uQsAUhBSsiEMkUCRnXIQb6JE46ooUQZ2CDzm9Gh87hKADAhJoYwyJEIkcNQ22UV2FHgs6NH43EUAqQhBG3KJDFGIFIogFz65kcER4GHWQ+nR+NzdABkQQj6EL6ioQmTAqG2CD8Ps8NkaFuaj8bkLATJhSDh9w5SjNqAkFWa7ENDR8HyLADJjiF8RRsZI5qgViY8T2XEZn05X4t0NkBlCHlbftQpGt0QPad35gEfT820AyJwhgSLaSBNUZyK1jPB4l+kT6Or71gBkTZEM0q3Laqe66r59APmC6JZB8rUjXW3fXoBapcgHTW15mK6xfwaA2kzRLUlX1j8XQN8oRLqi/jkB+oc50hWkAdLSAGlpaYC0NEBaGiAtDZCWlgZISwOkpQHS0gBpaYC0tDRAWhogLQ2QlgZIS0sDpHW79P8FGABxayM7vTb0IAAAAABJRU5ErkJggg==" />
2
+
3
+
4
+ Infopark WebCRM Connector is the official Ruby SDK for [Infopark WebCRM](http://www.infopark.de/webcrm). It basically wraps the [WebCRM web services API](http://kb.infopark.de/crm-api) using [Active Resource](http://rubydoc.info/gems/activeresource/3.2.8/frames). Currently, Active Resource 3.0, 3.1 and 3.2 in combination with Ruby 1.8.7 and 1.9.x are tested and supported.
5
+
6
+ # Installation
7
+
8
+ Add `infopark_crm_connector` to your `gemfile`:
9
+
10
+ gem 'infopark_crm_connector'
11
+
12
+ Install the gem with [Bundler](http://gembundler.com/):
13
+
14
+ bundle install
15
+
16
+ # Configuration
17
+
18
+ require 'infopark_crm_connector'
19
+
20
+ Infopark::Crm.configure do |configuration|
21
+ configuration.url = "https://webcrm.server/url"
22
+ configuration.login = "webcrm_user"
23
+ configuration.api_key = "api_key_of_webcrm_user"
24
+ end
25
+
26
+ # See, if it is working
27
+ Infopark::Crm::Contact.first.last_name
28
+
29
+ See {Infopark::Crm.configure} for a complete list of configuration keys.
30
+
31
+ # Example Usage
32
+
33
+ This Ruby SDK provides the WebCRM's domain models {Infopark::Crm::Account Account}, {Infopark::Crm::Activity Activity}, {Infopark::Crm::Contact Contact}, {Infopark::Crm::Event Event}, {Infopark::Crm::Mailing Mailing}, among others. All domain models are subclasses of {Infopark::Crm::Core::Resource} which itself inherits from {ActiveResource::Base} and provides methods such as `find(id)`, `create(hash)`, `update(hash)`, `search(params)` and others.
34
+
35
+ ## Contact
36
+ # Retrieve the contact identified by the login 'root'
37
+ contact = Infopark::Crm::Contact.search(:params => {:login => 'root'}).first
38
+
39
+ # Change this contact's mail address
40
+ contact.update_attribute(:email, 'root@example.com')
41
+
42
+ # Send a new password request mail to the contact's address
43
+ contact.password_request
44
+
45
+ ## Activity
46
+
47
+ # Create a new activity kind
48
+ Infopark::Crm::CustomType.create(:name => 'support case', :kind => 'Activity',
49
+ :states => ['created'])
50
+
51
+ # Create a new activity
52
+ activity = Infopark::Crm::Activity.new(:kind => 'support case')
53
+
54
+ # Set properties of this activity
55
+ activity.title = 'Sprechen Sie Deutsch?'
56
+
57
+ # Switch to a different request locale
58
+ Infopark::Crm.configure {|c| c.locale = 'de'}
59
+
60
+ # Post the activity (which is going to fail)
61
+ activity.save
62
+ # => false
63
+
64
+ # Get to know what's missing
65
+ activity.errors.to_hash
66
+ # => {:state=>["ist kein gültiger Wert"]}
67
+
68
+ # Contributing
69
+
70
+ The source code is freely available at (https://github.com/infopark/crm_connector). Pull requests are welcome.
71
+
72
+ ## Get started
73
+
74
+ git clone git@github.com:infopark/crm_connector.git
75
+ cd crm_connector/
76
+ bundle
77
+
78
+ ## Run tests
79
+
80
+ Configure `test/config.json` with an empty WebCRM tenant (see `test/config_template.json`)
81
+
82
+ Run tests with the current version of Active Resource:
83
+
84
+ bundle exec rake test
85
+
86
+
87
+ Run tests with all supported versions of Active Resource:
88
+
89
+ bundle exec rake appraisal:install
90
+ bundle exec rake appraisal
91
+
92
+ ## Build and install gem
93
+
94
+ bundle exec rake gem #build
95
+ bundle exec rake install #build and install
96
+
97
+ ## Documentation
98
+
99
+ bundle exec rake yard
100
+ open doc/index.html
101
+
102
+ # Changelog
103
+
104
+ {include:file:CHANGELOG.markdown}
105
+
106
+ # License
107
+
108
+ Copyright (c) 2009 - 2012 Infopark AG (http://www.infopark.com)
109
+
110
+ This software can be used and modified under the LGPLv3. Please refer to http://www.gnu.org/licenses/lgpl-3.0.html for the license text.
data/lib/crm_connector.rb CHANGED
@@ -2,6 +2,7 @@ require 'active_resource'
2
2
  require 'active_support/core_ext/string/conversions'
3
3
 
4
4
  module Infopark; module Crm
5
+ # @private
5
6
  def self.setup_autoload(mod, mod_source)
6
7
  dir = File.expand_path(".", mod_source)[0..-4] # - ".rb"
7
8
  pattern = "#{dir}/*.rb"
@@ -13,24 +14,20 @@ module Infopark; module Crm
13
14
  end
14
15
 
15
16
  setup_autoload(self, __FILE__)
16
-
17
- # exceptions (defined elsewhere)
18
- autoload :AuthenticationFailed, File.expand_path('../crm_connector/core/base', __FILE__)
19
-
20
17
  end; end
21
18
 
22
19
  module Infopark; module Crm
23
20
 
24
- # Configures the web service connection
21
+ # Configures the web services connection
25
22
  #
26
- # View {README}[link:README_rdoc.html] for a usage example.
23
+ # View {file:README.markdown README} for a usage example.
27
24
  #
28
25
  # Supported configuration keys are:
29
- # [url] the web service server url (schema, host, port, path (up to, but not including /api))
26
+ # [url] The web services server url (schema, host, port, path (up to, but not including /api)).
30
27
  #
31
- # [login] the login of a WebCRM user with an API key (web service credential)
28
+ # [login] The user name (login) of the WebCRM contact person.
32
29
  #
33
- # [api_key] the WebCRM user's valid api key (web service credential)
30
+ # [api_key] The WebCRM user's valid API key (web services credential).
34
31
  #
35
32
  # [locale] The locale to use when sending requests to the server. Can be
36
33
  # redefined at any time.
@@ -43,9 +40,9 @@ module Infopark; module Crm
43
40
  #
44
41
  # Infopark::Crm::Contact.create.errors.full_messages
45
42
  #
46
- # [live_server_groups_callback] A custom definition of what the live_server_groups of
47
- # a contact is. The provided lambda is called with the contact
48
- # instance and must return an array of live_server_groups (strings)
43
+ # [live_server_groups_callback] A custom definition of what a contact's live_server_groups field
44
+ # returns. Provide a lambda that takes the contact instance as an
45
+ # argument and returns an array of live_server_groups (strings).
49
46
  #
50
47
  # Example:
51
48
  #
@@ -60,13 +57,12 @@ module Infopark; module Crm
60
57
  # }
61
58
  # end
62
59
  #
63
- # [debug] When set to true, includes the module Debugging into every resource, which
64
- # provides a logger method. Cannot be reverted by setting to +false+
65
60
  #
61
+ # @return [void]
66
62
  def self.configure(&block)
67
63
  yield Configuration
68
64
 
69
- Core::Base.configure(Configuration)
65
+ Core::Resource.configure(Configuration)
70
66
  end
71
67
 
72
68
  end; end
@@ -1,4 +1,33 @@
1
1
  module Infopark; module Crm
2
- # This is an extendable class. See Default::Account for documentation
3
- class Account < Default::Account; end
2
+
3
+ class Account < Core::Resource
4
+
5
+ ##
6
+ # @!method self.search(input)
7
+ # Searches for accounts
8
+ # @param input [Hash] A hash containing a +params+ key. The value of this key is a hash containing the actual search query.
9
+ # @return [Core::Enumerator<Infopark::Crm::Account>]
10
+ # @webcrm_rest_url <code>GET /api/accounts/search</code>
11
+ # @example
12
+ # results = Infopark::Crm::Account.search(:params => {:account_group => 'account_group_name'})
13
+ # results = Infopark::Crm::Account.search(:params => {:q => 'full-text search'})
14
+ has_search
15
+
16
+ self.schema = {
17
+ :account_group => :string,
18
+ :country => :string,
19
+ :extended_address => :string,
20
+ :home_page => :string,
21
+ :locality => :string,
22
+ :name => :string,
23
+ :org_name_address => :string,
24
+ :org_unit_address => :string,
25
+ :phone => :string,
26
+ :postalcode => :string,
27
+ :region => :string,
28
+ :street_address => :string,
29
+ :tags => :array,
30
+ :want_geo_location => :boolean,
31
+ }
32
+ end
4
33
  end; end
@@ -1,5 +1,63 @@
1
+ require 'ostruct'
2
+
1
3
  module Infopark; module Crm
2
- # This is an extendable class. See Default::Activity for documentation
3
- class Activity < Default::Activity; end
4
- end; end
4
+ class Activity < Core::Resource
5
+
6
+ ##
7
+ # @!method self.search(input)
8
+ # Searches for activities
9
+ # @param input [Hash] A hash containing a +params+ key. The value of this key is a hash containing the actual search query.
10
+ # @return [Array<Infopark::Crm::Activity>]
11
+ # @webcrm_rest_url <code>GET /api/activities/search</code>
12
+ # @example
13
+ # results = Infopark::Crm::Activity.search(:params => {:state => 'created'})
14
+ # results = Infopark::Crm::Activity.search(:params => {:kind => 'support case'})
15
+ # results = Infopark::Crm::Activity.search(:params => {:contact_id => cid})
16
+ # results = Infopark::Crm::Activity.search(:params => {:account_id => aid})
17
+ # results = Infopark::Crm::Activity.search(:params => {:q => 'full-text search'})
18
+ has_search
19
+
20
+ self.schema = {
21
+ :account_id => :string,
22
+ :appointment_contact_id => :string,
23
+ :appointment_dtend_at => :time,
24
+ :appointment_dtstart_at => :time,
25
+ :appointment_location => :string,
26
+ :comment_notes => :string,
27
+ :comment_published => :boolean,
28
+ :contact_id => :string,
29
+ :email_cc => :string,
30
+ :kind => :string,
31
+ :state => :string,
32
+ :tags => :array,
33
+ :task_due_at => :time,
34
+ :task_owner_id => :string,
35
+ :title => :string,
36
+ }
5
37
 
38
+ ##
39
+ # Queries the WebCRM for the Contact with the id +contact_id+.
40
+ # @return [Infopark::Crm::Contact] The contact associated with this activity, if +contact_id+ is present.
41
+ # @webcrm_rest_url <code>GET /api/contacts/_contact_id_</code>
42
+ def contact
43
+ Infopark::Crm::Contact.find(contact_id) if contact_id
44
+ end
45
+
46
+ ##
47
+ # Queries the WebCRM for the Account with the id +account_id+.
48
+ # @return [Infopark::Crm::Account] The account associated with this activity, if +account_id+ is present.
49
+ # @webcrm_rest_url <code>GET /api/accounts/_account_id_</code>
50
+ def account
51
+ Infopark::Crm::Account.find(account_id) if account_id
52
+ end
53
+
54
+ ##
55
+ # Queries the WebCRM for the CustomType with the id +kind+.
56
+ # @return [Infopark::Crm::CustomType] The custom type associated with this activity, if +kind+ is present.
57
+ # @webcrm_rest_url <code>GET /api/custom_types/_kind_</code>
58
+ def custom_type
59
+ Infopark::Crm::CustomType.find(kind) if kind
60
+ end
61
+
62
+ end
63
+ end; end
@@ -1,8 +1,8 @@
1
- # :stopdoc:
2
-
3
1
  require 'active_support/core_ext/class/attribute_accessors'
4
2
 
5
3
  module Infopark; module Crm
4
+
5
+ # @private
6
6
  class Configuration
7
7
 
8
8
  cattr_accessor :api_key
@@ -17,8 +17,6 @@ module Infopark; module Crm
17
17
 
18
18
  cattr_accessor :live_server_groups_callback
19
19
 
20
- cattr_accessor :debug
21
-
22
20
  self.login = "webservice"
23
21
 
24
22
  self.live_server_groups_callback = lambda {|contact| []}
@@ -1,5 +1,125 @@
1
1
  module Infopark; module Crm
2
- # This is an extendable class. See Default::Contact for documentation
3
- class Contact < Default::Contact; end
4
- end; end
2
+ class Contact < Core::Resource
3
+
4
+ ##
5
+ # @!method self.search(input)
6
+ # Searches for contacts
7
+ # @param input [Hash] A hash containing a +params+ key. The value of this key is a hash containing the actual search query.
8
+ # @return [Array<Infopark::Crm::Contact>]
9
+ # @webcrm_rest_url <code>GET /api/contacts/search</code>
10
+ # @example
11
+ # results = Infopark::Crm::Contact.search(:params => {:login => 'the_login'})
12
+ # results = Infopark::Crm::Contact.search(:params => {:email => 'email@example.com'})
13
+ # results = Infopark::Crm::Contact.search(:params => {:q => 'full-text search'})
14
+ has_search
15
+
16
+ self.schema = {
17
+ :account_id => :string,
18
+ :country => :string,
19
+ :email => :string,
20
+ :extended_address => :string,
21
+ :fax => :string,
22
+ :first_name => :string,
23
+ :gender => :string,
24
+ :job_title => :string,
25
+ :language => :string,
26
+ :last_name => :string,
27
+ :locality => :string,
28
+ :login => :string,
29
+ :mobile_phone => :string,
30
+ :name_prefix => :string,
31
+ :org_name_address => :string,
32
+ :org_unit_address => :string,
33
+ :phone => :string,
34
+ :postalcode => :string,
35
+ :region => :string,
36
+ :role_names => :array,
37
+ :street_address => :string,
38
+ :tags => :array,
39
+ :want_email => :boolean,
40
+ :want_geo_location => :boolean,
41
+ :want_phonecall => :boolean,
42
+ :want_snailmail => :boolean,
43
+ }
44
+
45
+ ##
46
+ # Queries the WebCRM for the Account with the id +account_id+.
47
+ # @return [Infopark::Crm::Account] The account associated with this contact, if +account_id+ is present.
48
+ # @webcrm_rest_url <code>GET /api/accounts/_account_id_</code>
49
+ def account
50
+ Infopark::Crm::Account.find(account_id) if account_id
51
+ end
52
+
53
+ ##
54
+ # Looks for the user with the given +login+ and check whether the +password+ is correct.
55
+ # @param login [String]
56
+ # @param password [String]
57
+ # @return [Infopark::Crm::Contact] The found and authenticated contact.
58
+ # @raise [Infopark::Crm::Errors::AuthenticationFailed] if provided +password+ is not correct.
59
+ # @webcrm_rest_url <code>POST /api/contacts/authenticate</code>
60
+ def self.authenticate(login, password)
61
+ begin
62
+ response = post(:authenticate, {}, format.encode({:login => login, :password => password}))
63
+ result = format.decode(response.body)
64
+ return find(result['id']) if result.kind_of? Hash # ActiveResource 3.0
65
+ find(result)
66
+ rescue ActiveResource::ResourceInvalid
67
+ raise Errors::AuthenticationFailed
68
+ end
69
+ end
70
+
71
+ ##
72
+ # Sets a new +password+ for the contact, which is associated with the given +token+.
73
+ # @param password [String] The new password.
74
+ # @param token [String] The token provided by +password_request+ which is associated with a contact.
75
+ # @return [String] The result message from the server.
76
+ # @webcrm_rest_url <code>POST /api/contacts/password_set</code>
77
+ def self.password_set(password, token)
78
+ response = post(:password_set, {}, format.encode({:password => password, :token => token}))
79
+ result = format.decode(response.body)
80
+ return result['message'] if result.kind_of? Hash # ActiveResource 3.0
81
+ result
82
+ end
5
83
 
84
+ ##
85
+ # Sets the password of this contact to +password+.
86
+ # @param password [String] the new password
87
+ # @return [void]
88
+ def password_set(password)
89
+ token = password_request(:params => {:only_get_token => true})
90
+ self.class.password_set(password, token)
91
+ end
92
+
93
+ ##
94
+ # Instructs the WebCRM to send the user an e-mail to let them set a new password.
95
+ # @param options [Hash]
96
+ # @webcrm_rest_url <code>GET /api/contacts/_id_/password_request</code>
97
+ # @webcrm_todo return nil instead of message for default parameters?
98
+ def password_request(options = {})
99
+ params = options[:params] || {}
100
+ response = post(:password_request, {}, self.class.format.encode(params))
101
+ result = self.class.format.decode(response.body)
102
+ return result.values.first if result.kind_of? Hash # ActiveResource 3.0
103
+ result
104
+ end
105
+
106
+ # Returns the live_server_groups of this contact as defined by +Configuration.live_server_groups_callback+
107
+ # @return [Array<String>] The calculated roles of this contact.
108
+ def live_server_groups
109
+ return @live_server_groups if defined?(@live_server_groups)
110
+ callback = Configuration.live_server_groups_callback
111
+ @live_server_groups = callback.call(self) if callback.respond_to?(:call)
112
+ raise "live_server_groups_callback: not defined or unexpected result!" unless @live_server_groups
113
+
114
+ @live_server_groups
115
+ end
116
+
117
+ ##
118
+ # Overwrites +live_server_groups+, so live_server_groups_callback is not called for this object.
119
+ # @return [void]
120
+ def live_server_groups=(value)
121
+ @live_server_groups = value
122
+ end
123
+
124
+ end
125
+ end; end