Module: Code42::API::Destination

Included in:
Client
Defined in:
lib/code42/api/destination.rb

Instance Method Summary collapse

Instance Method Details

#create_destination(attrs) ⇒ Object



12
13
14
15
# File 'lib/code42/api/destination.rb', line 12

def create_destination(attrs)
  response = post('Destination', attrs)
  response && response['data'].is_a?(Array)
end

#destination(id) ⇒ Object



8
9
10
# File 'lib/code42/api/destination.rb', line 8

def destination(id)
  object_from_response(Code42::Destination, :get, "destination/#{id}")
end

#destinationsObject



4
5
6
# File 'lib/code42/api/destination.rb', line 4

def destinations
  objects_from_response(Code42::Destination, :get, 'destinations', key: 'destinations')
end