Class: YourMembership::People
- Defined in:
- lib/your_membership/people.rb
Overview
YourMembership People Namespace
Class Method Summary collapse
-
.all_search(session, options = {}) ⇒ Array
Returns paged results for a search request.
-
.profile_get(session, id) ⇒ YourMembership::Profile
Returns a person’s profile data.
Methods inherited from Base
build_XML_request, new_call_id, response_to_array, response_to_array_of_hashes, response_valid?, response_ym_error?
Class Method Details
.all_search(session, options = {}) ⇒ Array
Returns paged results for a search request. Returns a maximum of 100 records per request.
14 15 16 17 18 19 |
# File 'lib/your_membership/people.rb', line 14 def self.all_search(session, = {}) response = post('/', :body => build_XML_request('People.All.Search', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['People.All.Search'], ['Results', 'Item'] end |
.profile_get(session, id) ⇒ YourMembership::Profile
Returns a person’s profile data.
28 29 30 31 32 33 34 35 36 |
# File 'lib/your_membership/people.rb', line 28 def self.profile_get(session, id) = {} ['ID'] = id response = post('/', :body => build_XML_request('People.Profile.Get', session, )) response_valid? response YourMembership::Profile.new response['YourMembership_Response']['People.Profile.Get'] end |