Class: Hubspot::Cms::Hubdb::RowsBatchApi

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RowsBatchApi

Returns a new instance of RowsBatchApi.



21
22
23
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 21

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



19
20
21
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 19

def api_client
  @api_client
end

Instance Method Details

#clone_draft_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ BatchResponseHubDbTableRowV3

Clone rows in batch Clones rows in the ‘draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_string (BatchInputString)

    The JSON array of row ids

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



30
31
32
33
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 30

def clone_draft_table_rows(table_id_or_name, batch_input_string, opts = {})
  data, _status_code, _headers = clone_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  data
end

#clone_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {}) ⇒ Array<(BatchResponseHubDbTableRowV3, Integer, Hash)>

Clone rows in batch Clones rows in the &#x60;draft&#x60; version of the specified table, given a set of row ids. Maximum of 100 row ids per call.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_string (BatchInputString)

    The JSON array of row ids

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 41

def clone_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.clone_draft_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.clone_draft_table_rows"
  end
  # verify the required parameter 'batch_input_string' is set
  if @api_client.config.client_side_validation && batch_input_string.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling RowsBatchApi.clone_draft_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/clone'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseHubDbTableRowV3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.clone_draft_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#clone_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {}) ⇒ BatchResponseHubDbTableRowV3

Create rows in batch Creates rows in the ‘draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_hub_db_table_row_v3_request (BatchInputHubDbTableRowV3Request)

    JSON array of row objects

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



104
105
106
107
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 104

def create_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {})
  data, _status_code, _headers = create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts)
  data
end

#create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {}) ⇒ Array<(BatchResponseHubDbTableRowV3, Integer, Hash)>

Create rows in batch Creates rows in the &#x60;draft&#x60; version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_hub_db_table_row_v3_request (BatchInputHubDbTableRowV3Request)

    JSON array of row objects

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 115

def create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.create_draft_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.create_draft_table_rows"
  end
  # verify the required parameter 'batch_input_hub_db_table_row_v3_request' is set
  if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3_request' when calling RowsBatchApi.create_draft_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/create'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseHubDbTableRowV3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.create_draft_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#create_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#purge_draft_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ nil

Permanently deletes rows Permanently deletes rows from the ‘draft` version of the table, given a set of row ids. Maximum of 100 row ids per call.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_string (BatchInputString)

    JSON array of row ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


178
179
180
181
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 178

def purge_draft_table_rows(table_id_or_name, batch_input_string, opts = {})
  purge_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  nil
end

#purge_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Permanently deletes rows Permanently deletes rows from the &#x60;draft&#x60; version of the table, given a set of row ids. Maximum of 100 row ids per call.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_string (BatchInputString)

    JSON array of row ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 189

def purge_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.purge_draft_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.purge_draft_table_rows"
  end
  # verify the required parameter 'batch_input_string' is set
  if @api_client.config.client_side_validation && batch_input_string.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling RowsBatchApi.purge_draft_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/purge'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.purge_draft_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#purge_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_draft_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ BatchResponseHubDbTableRowV3

Get a set of rows from draft table Returns rows in the ‘draft` version of the specified table, given a set of row ids.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_string (BatchInputString)

    JSON array of row ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



252
253
254
255
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 252

def read_draft_table_rows(table_id_or_name, batch_input_string, opts = {})
  data, _status_code, _headers = read_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  data
end

#read_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {}) ⇒ Array<(BatchResponseHubDbTableRowV3, Integer, Hash)>

Get a set of rows from draft table Returns rows in the &#x60;draft&#x60; version of the specified table, given a set of row ids.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_string (BatchInputString)

    JSON array of row ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
317
318
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 263

def read_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.read_draft_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.read_draft_table_rows"
  end
  # verify the required parameter 'batch_input_string' is set
  if @api_client.config.client_side_validation && batch_input_string.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling RowsBatchApi.read_draft_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/read'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseHubDbTableRowV3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.read_draft_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#read_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ BatchResponseHubDbTableRowV3

Get a set of rows Returns rows in the ‘published` version of the specified table, given a set of row ids. Note: This endpoint can be accessed without any authentication if the table is set to be allowed for public access.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table to query.

  • batch_input_string (BatchInputString)

    The JSON array of row ids

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



326
327
328
329
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 326

def read_table_rows(table_id_or_name, batch_input_string, opts = {})
  data, _status_code, _headers = read_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  data
end

#read_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {}) ⇒ Array<(BatchResponseHubDbTableRowV3, Integer, Hash)>

Get a set of rows Returns rows in the &#x60;published&#x60; version of the specified table, given a set of row ids. Note: This endpoint can be accessed without any authentication if the table is set to be allowed for public access.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table to query.

  • batch_input_string (BatchInputString)

    The JSON array of row ids

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 337

def read_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.read_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.read_table_rows"
  end
  # verify the required parameter 'batch_input_string' is set
  if @api_client.config.client_side_validation && batch_input_string.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling RowsBatchApi.read_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/batch/read'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseHubDbTableRowV3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.read_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#read_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replace_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {}) ⇒ BatchResponseHubDbTableRowV3

Replace rows in batch in draft table Replaces multiple rows as a batch in the ‘draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/tableIdOrName/rows/rowId/draft` for details on updating a single row.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_hub_db_table_row_v3_batch_update_request (BatchInputHubDbTableRowV3BatchUpdateRequest)

    JSON array of row objects.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



400
401
402
403
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 400

def replace_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {})
  data, _status_code, _headers = replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts)
  data
end

#replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {}) ⇒ Array<(BatchResponseHubDbTableRowV3, Integer, Hash)>

Replace rows in batch in draft table Replaces multiple rows as a batch in the &#x60;draft&#x60; version of the table, with a maximum of 100 rows per call. See the endpoint &#x60;PUT /tables/tableIdOrName/rows/rowId/draft&#x60; for details on updating a single row.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_hub_db_table_row_v3_batch_update_request (BatchInputHubDbTableRowV3BatchUpdateRequest)

    JSON array of row objects.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 411

def replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.replace_draft_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.replace_draft_table_rows"
  end
  # verify the required parameter 'batch_input_hub_db_table_row_v3_batch_update_request' is set
  if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3_batch_update_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3_batch_update_request' when calling RowsBatchApi.replace_draft_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/replace'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3_batch_update_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseHubDbTableRowV3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.replace_draft_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#replace_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {}) ⇒ BatchResponseHubDbTableRowV3

Update rows in batch in draft table Updates multiple rows as a batch in the ‘draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/tableIdOrName/rows/rowId/draft` for details on updating a single row.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_hub_db_table_row_v3_batch_update_request (BatchInputHubDbTableRowV3BatchUpdateRequest)

    JSON array of row objects.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



474
475
476
477
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 474

def update_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {})
  data, _status_code, _headers = update_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts)
  data
end

#update_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {}) ⇒ Array<(BatchResponseHubDbTableRowV3, Integer, Hash)>

Update rows in batch in draft table Updates multiple rows as a batch in the &#x60;draft&#x60; version of the table, with a maximum of 100 rows per call. See the endpoint &#x60;PATCH /tables/tableIdOrName/rows/rowId/draft&#x60; for details on updating a single row.

Parameters:

  • table_id_or_name (String)

    The ID or name of the table

  • batch_input_hub_db_table_row_v3_batch_update_request (BatchInputHubDbTableRowV3BatchUpdateRequest)

    JSON array of row objects.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 485

def update_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_batch_update_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.update_draft_table_rows ...'
  end
  # verify the required parameter 'table_id_or_name' is set
  if @api_client.config.client_side_validation && table_id_or_name.nil?
    fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.update_draft_table_rows"
  end
  # verify the required parameter 'batch_input_hub_db_table_row_v3_batch_update_request' is set
  if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3_batch_update_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3_batch_update_request' when calling RowsBatchApi.update_draft_table_rows"
  end
  # resource path
  local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/update'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3_batch_update_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseHubDbTableRowV3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RowsBatchApi.update_draft_table_rows",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RowsBatchApi#update_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end