Class: Antaeus::Resources::Location
- Inherits:
-
Antaeus::Resource
- Object
- Antaeus::Resource
- Antaeus::Resources::Location
- Defined in:
- lib/antaeus-sdk/resources/location.rb
Instance Attribute Summary
Attributes inherited from Antaeus::Resource
Instance Method Summary collapse
Methods inherited from Antaeus::Resource
#<=>, all, delayed_property, #destroy, #fresh?, gen_property_methods, get, human, i18n_key, #id, immutable, #immutable?, immutable?, #initialize, #model_name, #new?, param_key, path, path_for, #path_for, paths, #paths, #persisted?, properties, property, #reload, route_key, #save, search, singular_route_key, #tainted?, #to_key, #to_model, #to_param, #update, where
Constructor Details
This class inherits a constructor from Antaeus::Resource
Instance Method Details
#appointments ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/antaeus-sdk/resources/location.rb', line 19 def appointments ResourceCollection.new( @client.get("#{path_for(:all)}/#{id}/appointments?all=true")['appointments'].collect do |record| Appointment.new( entity: record, lazy: true, tainted: false, client: @client ) end, type: Antaeus::Resources::Appointment, client: @client ) end |
#upcoming_appointments ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/antaeus-sdk/resources/location.rb', line 34 def upcoming_appointments ResourceCollection.new( @client.get("#{path_for(:all)}/#{id}/appointments")['appointments'].collect do |record| Appointment.new( entity: record, lazy: true, tainted: false, client: @client ) end, type: Antaeus::Resources::Appointment, client: @client ) end |