Class: Pike13::API::V3::Desk::Clients
- Defined in:
- lib/pike13/api/v3/desk/clients.rb
Overview
Clients resource All client data — from tenure and unpaid bills to birthdays and passes held
Constant Summary collapse
- DETAIL_FIELDS =
Available detail fields (when not grouping)
%w[ account_claim_date account_credit_amount account_manager_emails account_manager_names account_manager_phones address street_address street_address2 city state_code postal_code country_code age also_staff birthdate business_id business_name business_subdomain client_since_date completed_visits currency_code current_plan_revenue_category current_plan_types current_plans custom_fields days_since_last_visit days_until_birthday dependent_names email first_name first_visit_date franchise_id full_name future_visits guardian_email guardian_name has_membership has_payment_on_file has_plan_on_hold has_signed_waiver home_location_name is_schedulable key last_email_bounced last_invoice_amount last_invoice_date last_invoice_id last_invoice_unpaid last_membership_end_date last_name last_signed_waiver_name last_site_access_date last_visit_date last_visit_id last_visit_service middle_name net_paid_amount next_pass_plan_end_date person_id person_state phone primary_staff_name revenue_amount source_name staff_member_who_added tenure tenure_group unpaid_visits ].freeze
- SUMMARY_FIELDS =
Available summary fields (when grouping)
%w[ account_claim_count also_staff_count business_id_summary business_subdomain_summary has_membership_count has_payment_on_file_count has_plan_on_hold_count has_signed_waiver_count is_schedulable_count last_email_bounced_count last_invoice_unpaid_count person_count total_account_credit_amount total_completed_visits total_count total_future_visits total_net_paid_amount total_revenue_amount total_unpaid_visits visited_site_count ].freeze
- GROUPINGS =
Available grouping fields
%w[ account_claim_date account_manager_names age also_staff business_id business_name business_subdomain client_since_date client_since_month_start_date client_since_quarter_start_date client_since_week_mon_start_date client_since_week_sun_start_date client_since_year_start_date has_membership has_payment_on_file has_plan_on_hold has_signed_waiver home_location_name is_schedulable last_email_bounced last_invoice_unpaid person_state primary_staff_name source_name staff_member_who_added tenure_group ].freeze
Class Method Summary collapse
-
.query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil) ⇒ Hash
Execute a clients query.
Methods inherited from Base
Class Method Details
.query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil) ⇒ Hash
Execute a clients query
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/pike13/api/v3/desk/clients.rb', line 39 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("clients", query_params) end |