Class: ReactorSDK::Endpoints::Callbacks

Inherits:
BaseEndpoint show all
Defined in:
lib/reactor_sdk/endpoints/callbacks.rb

Instance Method Summary collapse

Methods inherited from BaseEndpoint

#initialize

Constructor Details

This class inherits a constructor from ReactorSDK::Endpoints::BaseEndpoint

Instance Method Details

#create(property_id:, attributes:) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/reactor_sdk/endpoints/callbacks.rb', line 14

def create(property_id:, attributes:)
  create_resource(
    "/properties/#{property_id}/callbacks",
    'callbacks',
    Resources::Callback,
    attributes: attributes
  )
end

#delete(callback_id) ⇒ Object



33
34
35
# File 'lib/reactor_sdk/endpoints/callbacks.rb', line 33

def delete(callback_id)
  delete_resource("/callbacks/#{callback_id}")
end

#find(callback_id) ⇒ Object



10
11
12
# File 'lib/reactor_sdk/endpoints/callbacks.rb', line 10

def find(callback_id)
  fetch_resource("/callbacks/#{callback_id}", Resources::Callback)
end

#list_for_property(property_id) ⇒ Object



6
7
8
# File 'lib/reactor_sdk/endpoints/callbacks.rb', line 6

def list_for_property(property_id)
  list_resources("/properties/#{property_id}/callbacks", Resources::Callback)
end

#update(callback_id, attributes) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/reactor_sdk/endpoints/callbacks.rb', line 23

def update(callback_id, attributes)
  update_resource(
    "/callbacks/#{callback_id}",
    callback_id,
    'callbacks',
    Resources::Callback,
    attributes: attributes
  )
end