Class: TuneupTechnology::Location
- Inherits:
-
Object
- Object
- TuneupTechnology::Location
- Defined in:
- lib/tuneuptechnology/location.rb
Overview
Methods for the Location object
Class Method Summary collapse
-
.all(data) ⇒ Object
Retrieve all location records.
-
.create(data) ⇒ Object
Create a location.
-
.delete(data) ⇒ Object
Delete a location record.
-
.retrieve(data) ⇒ Object
Retrieve a single location record.
-
.update(data) ⇒ Object
Update a location record.
Class Method Details
.all(data) ⇒ Object
Retrieve all location records
13 14 15 16 |
# File 'lib/tuneuptechnology/location.rb', line 13 def self.all(data) endpoint = Client.base_url + 'locations' Client.post(data, endpoint) end |
.create(data) ⇒ Object
Create a location
7 8 9 10 |
# File 'lib/tuneuptechnology/location.rb', line 7 def self.create(data) endpoint = Client.base_url + 'locations/create' Client.post(data, endpoint) end |
.delete(data) ⇒ Object
Delete a location record
31 32 33 34 |
# File 'lib/tuneuptechnology/location.rb', line 31 def self.delete(data) endpoint = Client.base_url + 'locations/' + data['id'].to_s + '/delete' Client.post(data, endpoint) end |
.retrieve(data) ⇒ Object
Retrieve a single location record
19 20 21 22 |
# File 'lib/tuneuptechnology/location.rb', line 19 def self.retrieve(data) endpoint = Client.base_url + 'locations/' + data['id'].to_s Client.post(data, endpoint) end |
.update(data) ⇒ Object
Update a location record
25 26 27 28 |
# File 'lib/tuneuptechnology/location.rb', line 25 def self.update(data) endpoint = Client.base_url + 'locations/' + data['id'].to_s + '/update' Client.post(data, endpoint) end |