Class: Smartsheet::Sheets

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

Overview

Sheets Endpoints

See Also:

Constant Summary

Constants included from Constants

Constants::API_URL, Constants::CSV_TYPE, Constants::DEFAULT_BACKOFF_METHOD, Constants::DEFAULT_MAX_RETRY_TIME, Constants::EXCEL_TYPE, Constants::JSON_TYPE, Constants::PDF_TYPE, Constants::USER_AGENT, Constants::VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Sheets

Returns a new instance of Sheets.



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 37

def initialize(client)
  @client = client

  @attachments = SheetsAttachments.new(client)
  @cells = Cells.new(client)
  @columns = Columns.new(client)
  @comments = Comments.new(client)
  @discussions = Discussions.new(client)
  @rows = Rows.new(client)
  @share = SheetsShare.new(client)
end

Instance Attribute Details

#attachmentsSheetsAttachments (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

#cellsCells (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

#columnsColumns (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

#commentsComments (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

#discussionsDiscussions (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

#rowsRows (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

#shareSheetsShare (readonly)

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 31

class Sheets
  include Smartsheet::Constants

  attr_reader :client, :attachments, :cells, :columns, :comments, :discussions, :rows, :share
  private :client

  def initialize(client)
    @client = client

    @attachments = SheetsAttachments.new(client)
    @cells = Cells.new(client)
    @columns = Columns.new(client)
    @comments = Comments.new(client)
    @discussions = Discussions.new(client)
    @rows = Rows.new(client)
    @share = SheetsShare.new(client)
  end

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

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

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

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

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

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

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

  def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['folders', :folder_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        folder_id: folder_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(
        :post,
        ['workspaces', :workspace_id, 'sheets'],
        body_type: :json
    )
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        workspace_id: workspace_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

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

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

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

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

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

  def list_image_urls(body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

Instance Method Details

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



208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 208

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

#create(body:, params: {}, header_overrides: {}) ⇒ Object



120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 120

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

#create_from_template(body:, params: {}, header_overrides: {}) ⇒ Object



164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 164

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

#create_in_folder(folder_id:, body:, params: {}, header_overrides: {}) ⇒ Object



134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 134

def create_in_folder(folder_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(
      :post,
      ['folders', :folder_id, 'sheets'],
      body_type: :json
  )
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      folder_id: folder_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {}) ⇒ Object



178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 178

def create_in_folder_from_template(folder_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(
      :post,
      ['folders', :folder_id, 'sheets'],
      body_type: :json
  )
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      folder_id: folder_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {}) ⇒ Object



149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 149

def create_in_workspace(workspace_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(
      :post,
      ['workspaces', :workspace_id, 'sheets'],
      body_type: :json
  )
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      workspace_id: workspace_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {}) ⇒ Object



193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 193

def create_in_workspace_from_template(workspace_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(
      :post,
      ['workspaces', :workspace_id, 'sheets'],
      body_type: :json
  )
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      workspace_id: workspace_id
  )
  client.make_request(endpoint_spec, request_spec)
end

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



253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 253

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

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



58
59
60
61
62
63
64
65
66
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 58

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

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



106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 106

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

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



78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 78

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

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



92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 92

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

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



275
276
277
278
279
280
281
282
283
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 275

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

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



68
69
70
71
72
73
74
75
76
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 68

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

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



49
50
51
52
53
54
55
56
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 49

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

#list_for_org(params: {}, header_overrides: {}) ⇒ Object



266
267
268
269
270
271
272
273
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 266

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

#list_image_urls(body:, params: {}, header_overrides: {}) ⇒ Object



307
308
309
310
311
312
313
314
315
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 307

def list_image_urls(body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:post,['imageurls'], body_type: :json)
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body
  )
  client.make_request(endpoint_spec, request_spec)
end

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



223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 223

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

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



296
297
298
299
300
301
302
303
304
305
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 296

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

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



285
286
287
288
289
290
291
292
293
294
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 285

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

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



238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/smartsheet/endpoints/sheets/sheets.rb', line 238

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