Class: YourMembership::Sa::Groups

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

Overview

YourMembership System Administrator Groups 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

.group_getMembershipLog(group_id, options = {}) ⇒ Hash

Returns a list of group membership log entries by Group ID that may be optionally filtered by timestamp. This method will return a maximum of 1,000 results.

Parameters:

  • group_id (Integer)

    The Group ID of the Membership Log records to be returned.

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

Options Hash (options):

  • :StartDate (DateTime)

    Filter the returned results by date/time. Only those membership log items which have been created or updated after the supplied date/time will be returned.

  • :ItemID (Integer)

    Filter the returned results by sequential ItemID. Only those membership log items which have a ItemID greater than the supplied integer will be returned. A typical usage scenario for this parameter would be to supply it when making additional calls while 1,000 records are being returned. You would supply the last record’s ItemID to retrieve the next batch of up to 1,000 records, repeating the process until no records are returned.

Returns:

  • (Hash)

    Returns an Hash representing a group’s membership Log

See Also:



20
21
22
23
24
25
26
27
# File 'lib/your_membership/sa_groups.rb', line 20

def self.group_getMembershipLog(group_id, options = {}) # rubocop:disable Style/MethodName
  options[:GroupID] = group_id

  response = post('/', :body => build_XML_request('Sa.Groups.Group.GetMembershipLog', nil, options))

  response_valid? response
  response['YourMembership_Response']['Sa.Groups.Group.GetMembershipLog']
end