class Luma::AppointmentType

Constants

APPOINTMENT_TYPE_ENDPOINT

Public Instance Methods

create_appointment_type(endpoint: APPOINTMENT_TYPE_ENDPOINT, body: nil, headers: {}, auth: true, verb: :post, debug_output: $stdout) click to toggle source
# File lib/luma/appointment_type.rb, line 17
def create_appointment_type(endpoint: APPOINTMENT_TYPE_ENDPOINT, body: nil, headers: {}, auth: true, verb: :post, debug_output: $stdout)
   @body = body
   self.add_headers_and_body if auth

   result = self.class.send(verb.to_s, endpoint, body: @body, headers: @headers, debug_output: $stdout)
   { result: result, headers: @headers }
end
view_appointment_types(endpoint: APPOINTMENT_TYPE_ENDPOINT, auth: true, name: nil, description: nil, debug_output: $stdout) click to toggle source
# File lib/luma/appointment_type.rb, line 7
def view_appointment_types(endpoint: APPOINTMENT_TYPE_ENDPOINT, auth: true, name: nil, description: nil, debug_output: $stdout)
   self.add_headers_and_body if auth

   url = "api/appointmentTypes?name=#{name}&description=#{description}"
   full_url = "https://api.lumahealth.io/" + url

   result = HTTParty.get(full_url.to_str, headers: @headers, debug_output: $stdout)
   { result: result, headers: @headers }
end