Class: YourMembership::Events
- Defined in:
- lib/your_membership/events.rb
Overview
YourMembership Events Namespace
Class Method Summary collapse
-
.all_search(session, options = {}) ⇒ Array
Returns a list of Community Events based on the supplied search term.
-
.event_attendees_get(session, event_id) ⇒ Array
Returns a list of all Attendees for the specified event including both Registrations and RSVPs.
-
.event_get(session, event_id) ⇒ Hash
Returns details about the provided Event ID.
Methods inherited from Base
build_XML_request, new_call_id, post, response_to_array, response_to_array_of_hashes, response_valid?, response_ym_error?
Class Method Details
.all_search(session, options = {}) ⇒ Array
Returns a list of Community Events based on the supplied search term.
14 15 16 17 18 19 20 21 |
# File 'lib/your_membership/events.rb', line 14 def self.all_search(session, = {}) # Options include :SearchText(String), :PageSize(Integer), :StartRecord(Integer) response = post('/', :body => build_XML_request('Events.All.Search', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Events.All.Search'], ['Results', 'Item'] end |
.event_attendees_get(session, event_id) ⇒ Array
Returns a list of all Attendees for the specified event including both Registrations and RSVPs. If the Event Registration contains a related Custom Form, the form data will be included in the <DataSet> element as it is stored in our database. Records for authenticated members also include the <ID> element to cross reference the Member’s data.
33 34 35 36 37 38 39 40 41 |
# File 'lib/your_membership/events.rb', line 33 def self.event_attendees_get(session, event_id) = {} [:EventID] = event_id response = post('/', :body => build_XML_request('Events.Event.Attendees.Get', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Events.Event.Attendees.Get'], ['Attendees', 'Attendee'] end |
.event_get(session, event_id) ⇒ Hash
Returns details about the provided Event ID.
50 51 52 53 54 55 56 57 58 |
# File 'lib/your_membership/events.rb', line 50 def self.event_get(session, event_id) = {} [:EventID] = event_id response = post('/', :body => build_XML_request('Events.Event.Get', session, )) response_valid? response response['YourMembership_Response']['Events.Event.Get'].to_h end |