Class: ReactorSDK::Endpoints::AppConfigurations

Inherits:
BaseEndpoint
  • Object
show all
Defined in:
lib/reactor_sdk/endpoints/app_configurations.rb

Instance Method Summary collapse

Methods inherited from BaseEndpoint

#initialize

Constructor Details

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

Instance Method Details

#company(config_id) ⇒ Object



37
38
39
# File 'lib/reactor_sdk/endpoints/app_configurations.rb', line 37

def company(config_id)
  fetch_resource("/app_configurations/#{config_id}/company", Resources::Company)
end

#create(company_id:, attributes:) ⇒ Object



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

def create(company_id:, attributes:)
  create_resource(
    "/companies/#{company_id}/app_configurations",
    'app_configurations',
    Resources::AppConfiguration,
    attributes: attributes
  )
end

#delete(config_id) ⇒ Object



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

def delete(config_id)
  delete_resource("/app_configurations/#{config_id}")
end

#find(config_id) ⇒ Object



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

def find(config_id)
  fetch_resource("/app_configurations/#{config_id}", Resources::AppConfiguration)
end

#list_for_company(company_id) ⇒ Object



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

def list_for_company(company_id)
  list_resources("/companies/#{company_id}/app_configurations", Resources::AppConfiguration)
end

#update(config_id, attributes) ⇒ Object



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

def update(config_id, attributes)
  update_resource(
    "/app_configurations/#{config_id}",
    config_id,
    'app_configurations',
    Resources::AppConfiguration,
    attributes: attributes
  )
end