Class: Luma::AppointmentType
- Inherits:
-
Connection
- Object
- Connection
- Luma::AppointmentType
- Defined in:
- lib/luma/appointment_type.rb
Constant Summary collapse
- APPOINTMENT_TYPE_ENDPOINT =
'/api/appointmentTypes'.freeze
Constants inherited from Connection
Instance Method Summary collapse
- #create_appointment_type(endpoint: APPOINTMENT_TYPE_ENDPOINT, body: nil, headers: {}, auth: true, verb: :post, debug_output: $stdout) ⇒ Object
- #view_appointment_types(endpoint: APPOINTMENT_TYPE_ENDPOINT, auth: true, name: nil, description: nil, debug_output: $stdout) ⇒ Object
Methods inherited from Connection
#add_headers_and_body, #initialize, #request
Constructor Details
This class inherits a constructor from Luma::Connection
Instance Method Details
#create_appointment_type(endpoint: APPOINTMENT_TYPE_ENDPOINT, body: nil, headers: {}, auth: true, verb: :post, debug_output: $stdout) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/luma/appointment_type.rb', line 16 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 self.class.send(verb.to_s, endpoint, body: @body, headers: @headers, debug_output: $stdout) end |
#view_appointment_types(endpoint: APPOINTMENT_TYPE_ENDPOINT, auth: true, name: nil, description: nil, debug_output: $stdout) ⇒ Object
7 8 9 10 11 12 13 14 |
# 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 HTTParty.get(full_url.to_str, headers: @headers, debug_output: $stdout) end |