Class: Onfleet::Organizations
- Inherits:
-
Object
- Object
- Onfleet::Organizations
- Defined in:
- lib/resources/organizations.rb
Overview
Organizations represent the top-most entity on Onfleet. All entities belong to an organization.
Instance Method Summary collapse
- #get(config, delegatee_id = nil) ⇒ Object
-
#insert_task(config, org_id, body) ⇒ Object
ACTION: still needs to be tested.
Instance Method Details
#get(config, delegatee_id = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/resources/organizations.rb', line 7 def get(config, delegatee_id = nil) method = 'get' # change url path if a delegatee is provided if delegatee_id path = "organizations/#{delegatee_id}" else path = 'organization' end Onfleet.request(config, method.to_sym, path) end |
#insert_task(config, org_id, body) ⇒ Object
ACTION: still needs to be tested
21 22 23 24 25 26 |
# File 'lib/resources/organizations.rb', line 21 def insert_task(config, org_id, body) method = 'put' path = "containers/organizations/#{org_id}" Onfleet.request(config, method.to_sym, path, body.to_json) end |