class YourMembership::Events

YourMembership Events Namespace

Public Class Methods

event_attendees_get(session, event_id) click to toggle source

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.

@see api.yourmembership.com/reference/2_00/Events_Event_Attendees_Get.htm

@param [YourMembership::Session] session @param [Integer] event_id An Event ID for which to return event details. @return [Array] Returns an Array of Hashes representing the attendees to a specific event.

# File lib/your_membership/events.rb, line 33
def self.event_attendees_get(session, event_id)
  options = {}
  options[:EventID] = event_id

  response = post('/', :body => build_XML_request('Events.Event.Attendees.Get', session, options))

  response_valid? response
  response_to_array_of_hashes response['YourMembership_Response']['Events.Event.Attendees.Get'], ['Attendees', 'Attendee']
end
event_get(session, event_id) click to toggle source

Returns details about the provided Event ID.

@see api.yourmembership.com/reference/2_00/Events_Event_Get.htm

@param [YourMembership::Session] session @param [Integer] event_id An Event ID for which to return event details. @return [Hash] Returns a Hash of details about a particular event.

# File lib/your_membership/events.rb, line 50
def self.event_get(session, event_id)
  options = {}
  options[:EventID] = event_id

  response = post('/', :body => build_XML_request('Events.Event.Get', session, options))

  response_valid? response
  response['YourMembership_Response']['Events.Event.Get'].to_h
end