Class: Pike13::API::V3::Desk::EventOccurrenceStaffMembers

Inherits:
Base
  • Object
show all
Defined in:
lib/pike13/api/v3/desk/event_occurrence_staff_members.rb

Overview

Event Occurrence Staff Members resource Details of event occurrences by staff member (instructor, trainer, or organizer) If multiple staff members exist for an event occurrence, a record displays for each

Examples:

Basic query

Pike13::Reporting::EventOccurrenceStaffMembers.query(
  fields: ['event_occurrence_id', 'full_name', 'event_name', 'service_date', 'enrollment_count']
)

Query by staff member

Pike13::Reporting::EventOccurrenceStaffMembers.query(
  fields: ['full_name', 'event_name', 'service_date', 'completed_enrollment_count', 'role'],
  filter: ['eq', 'person_id', 12345]
)

Group by staff member

Pike13::Reporting::EventOccurrenceStaffMembers.query(
  fields: ['event_occurrence_count', 'total_enrollment_count', 'total_completed_enrollment_count'],
  group: 'full_name'
)

Constant Summary collapse

DETAIL_FIELDS =

Available detail fields (when not grouping)

%w[
  address
  attendance_completed
  business_id
  business_name
  business_subdomain
  capacity
  city
  completed_enrollment_count
  completed_unpaid_count
  country_code
  currency_code
  duration_in_hours
  duration_in_minutes
  email
  end_at
  enrollment_count
  event_id
  event_name
  event_occurrence_id
  expired_enrollment_count
  franchise_id
  full_name
  home_location_id
  home_location_name
  is_waitlist_count
  key
  late_canceled_enrollment_count
  noshowed_enrollment_count
  paid_count
  person_id
  phone
  postal_code
  registered_enrollment_count
  removed_enrollment_count
  reserved_enrollment_count
  role
  service_category
  service_date
  service_day
  service_id
  service_location_id
  service_location_name
  service_name
  service_state
  service_time
  service_type
  start_at
  state_code
  street_address
  street_address2
  visit_count
  waiting_enrollment_count
  waitlist_to_visit_count
].freeze
SUMMARY_FIELDS =

Available summary fields (when grouping)

%w[
  attendance_completed_count
  business_id_summary
  business_subdomain_summary
  event_count
  event_occurrence_count
  person_count
  service_count
  total_capacity
  total_completed_enrollment_count
  total_completed_unpaid_count
  total_count
  total_duration_in_hours
  total_duration_in_minutes
  total_enrollment_count
  total_expired_enrollment_count
  total_is_waitlist_count
  total_late_canceled_enrollment_count
  total_noshowed_enrollment_count
  total_paid_count
  total_registered_enrollment_count
  total_removed_enrollment_count
  total_reserved_enrollment_count
  total_visit_count
  total_waiting_enrollment_count
  total_waitlist_to_visit_count
].freeze
GROUPINGS =

Available grouping fields

%w[
  attendance_completed
  business_id
  business_name
  business_subdomain
  event_id
  event_name
  event_occurrence_id
  full_name
  person_id
  role
  service_category
  service_date
  service_day
  service_id
  service_location_id
  service_location_name
  service_month_start_date
  service_name
  service_quarter_start_date
  service_state
  service_time
  service_type
  service_week_mon_start_date
  service_week_sun_start_date
  service_year_start_date
].freeze

Class Method Summary collapse

Methods inherited from Base

client, configure

Class Method Details

.query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil) ⇒ Hash

Execute an event occurrence staff members query

Parameters:

  • fields (Array<String>)

    Fields to return (detail or summary fields)

  • filter (Array, nil) (defaults to: nil)

    Filter criteria (optional)

  • group (String, nil) (defaults to: nil)

    Grouping field (optional)

  • sort (Array<String>, nil) (defaults to: nil)

    Sort order (optional)

  • page (Hash, nil) (defaults to: nil)

    Pagination options (optional)

  • total_count (Boolean) (defaults to: nil)

    Whether to return total count (optional)

Returns:

  • (Hash)

    Query result with rows, fields, and metadata

See Also:



40
41
42
43
44
45
46
47
48
49
# File 'lib/pike13/api/v3/desk/event_occurrence_staff_members.rb', line 40

def query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil)
  query_params = { fields: fields }
  query_params[:filter] = filter if filter
  query_params[:group] = group if group
  query_params[:sort] = sort if sort
  query_params[:page] = page if page
  query_params[:total_count] = total_count if total_count

  super("event_occurrence_staff_members", query_params)
end