Class: Pike13::API::V2::Desk::Base
- Inherits:
-
Object
- Object
- Pike13::API::V2::Desk::Base
- Defined in:
- lib/pike13/api/v2/desk/base.rb
Overview
Base class for all Desk namespace resources Desk endpoints use the business subdomain (scoped connection)
Direct Known Subclasses
Appointment, Booking, Business, CustomField, Event, EventOccurrence, EventOccurrenceNote, EventOccurrenceVisit, EventOccurrenceWaitlistEntry, FormOfPayment, Invoice, Location, MakeUp, Note, Pack, PackProduct, Payment, Person, PersonPlan, PersonVisit, PersonWaitlistEntry, PersonWaiver, Plan, PlanProduct, Punch, Refund, RevenueCategory, SalesTax, Service, StaffMember, Visit, WaitlistEntry
Class Method Summary collapse
Class Method Details
.client ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/pike13/api/v2/desk/base.rb', line 18 def client # Return this class's client if set, otherwise traverse up to Base return @client if instance_variable_defined?(:@client) && @client return superclass.client if superclass.respond_to?(:client) && superclass != Object raise "Client not configured. Call Pike13.configure first." end |
.configure(config) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/pike13/api/v2/desk/base.rb', line 11 def configure(config) @client = Pike13::HTTPClient.new( base_url: config.full_url, access_token: config.access_token ) end |