Class: Smartsheet::AutomationRules

Inherits:
Object
  • Object
show all
Defined in:
lib/smartsheet/endpoints/sheets/automation_rules.rb

Overview

Automation Rules Endpoints

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AutomationRules

Returns a new instance of AutomationRules.



8
9
10
# File 'lib/smartsheet/endpoints/sheets/automation_rules.rb', line 8

def initialize(client)
  @client = client
end

Instance Method Details

#delete(sheet_id:, automation_rule_id:, params: {}, header_overrides: {}) ⇒ Object



45
46
47
48
49
50
51
52
53
54
# File 'lib/smartsheet/endpoints/sheets/automation_rules.rb', line 45

def delete(sheet_id:, automation_rule_id:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:delete, ['sheets', :sheet_id, 'automationrules', :automation_rule_id])
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      sheet_id: sheet_id,
      automation_rule_id: automation_rule_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#get(sheet_id:, automation_rule_id:, params: {}, header_overrides: {}) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/smartsheet/endpoints/sheets/automation_rules.rb', line 22

def get(sheet_id:, automation_rule_id:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['sheets', :sheet_id, 'automationrules', :automation_rule_id])
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      sheet_id: sheet_id,
      automation_rule_id: automation_rule_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#list(sheet_id:, params: {}, header_overrides: {}) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/smartsheet/endpoints/sheets/automation_rules.rb', line 12

def list(sheet_id:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['sheets', :sheet_id, 'automationrules'])
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      sheet_id: sheet_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#update(sheet_id:, automation_rule_id:, body:, params: {}, header_overrides: {}) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/smartsheet/endpoints/sheets/automation_rules.rb', line 33

def update(sheet_id:, automation_rule_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:put, ['sheets', :sheet_id, 'automationrules', :automation_rule_id], body_type: :json)
  request_spec = Smartsheet::API::RequestSpec.new(
      header_overrides: header_overrides,
      params: params,
      body: body,
      sheet_id: sheet_id,
      automation_rule_id: automation_rule_id
  )
  client.make_request(endpoint_spec, request_spec)
end