Class: YourMembership::Sa::Events

Inherits:
Base
  • Object
show all
Defined in:
lib/your_membership/sa_events.rb

Overview

YourMembership System Administrator Events Namespace

Class Method Summary collapse

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_getIDs(options = {}) ⇒ Array

Returns a list of Events for the community optionally filtered by date or event name.

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :StartDate (DateTime)

    Starting date to filter the Event Start Date.

  • :EndDate (DateTime)

    Ending date to filter the Event Start Date.

  • :Name (String)

    Filter the returned events by Event Name.

Returns:

  • (Array)

    Returns an Array of Event IDs

See Also:



14
15
16
17
18
19
20
21
22
23
# File 'lib/your_membership/sa_events.rb', line 14

def self.all_getIDs(options = {}) # rubocop:disable Style/MethodName
  response = post('/', :body => build_XML_request('Sa.Events.All.GetIDs', nil, options))

  response_valid? response
  if response['YourMembership_Response']['Sa.Events.All.GetIDs']
    response['YourMembership_Response']['Sa.Events.All.GetIDs']['EventID']
  else
    return[]
  end
end

.event_registration_get(event_id, options = {}) ⇒ Hash

Returns Event Registration details for the provided Event and Event Registration ID. 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.

Parameters:

  • event_id (Integer)

    The ID number for the Event from which you wish to retrieve the Event Registration.

  • options (Hash) (defaults to: {})

    Either RegistrationID or Badge Number are required.

Options Hash (options):

  • :RegistrationID (String)

    RegistrationID of the Registration data to return.

  • :BadgeNumber (Integer)

    The Badge Number / Registration Number for an Event Registration record.

Returns:

  • (Hash)

    Returns a Hash representing an event registration

See Also:



36
37
38
39
40
41
42
43
# File 'lib/your_membership/sa_events.rb', line 36

def self.event_registration_get(event_id, options = {})
  options[:EventID] = event_id

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

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

.event_registrations_getIDs(event_id) ⇒ Array

Returns a list of Registration IDs for the specified Event ID.

Parameters:

  • event_id (Integer)

    The ID number for the Event from which you wish to retrieve the Event Registration.

Returns:

  • (Array)

    Returns an Array of registration IDs for a specific event.

See Also:



51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/your_membership/sa_events.rb', line 51

def self.event_registrations_getIDs(event_id) # rubocop:disable Style/MethodName
  options = {}
  options[:EventID] = event_id

  response = post('/', :body => build_XML_request('Sa.Events.Event.Registrations.GetIDs', nil, options))

  response_valid? response
  if response['YourMembership_Response']['Sa.Events.Event.Registrations.GetIDs']
    response['YourMembership_Response']['Sa.Events.Event.Registrations.GetIDs']['RegistrationID']
  else
    return []
  end
end