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

#batch_clone_draft_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ Object

Clone rows in batch Clones 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)

    The JSON array of row ids

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

    the optional parameters

Returns:

  • (Object)


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

def batch_clone_draft_table_rows(table_id_or_name, batch_input_string, opts = {})
  data, _status_code, _headers = batch_clone_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  data
end

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

Clone rows in batch Clones 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)

    The JSON array of row ids

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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

def batch_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.batch_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.batch_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.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Object' 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_clone_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#batch_create_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {}) ⇒ Object

Create rows in batch Creates rows in the ‘draft` version of the specified table, given an array of row objects. 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 (BatchInputHubDbTableRowV3)

    JSON array of row objects

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

    the optional parameters

Returns:

  • (Object)


100
101
102
103
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 100

def batch_create_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {})
  data, _status_code, _headers = batch_create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3, opts)
  data
end

#batch_create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Create rows in batch Creates rows in the &#x60;draft&#x60; version of the specified table, given an array of row objects. 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 (BatchInputHubDbTableRowV3)

    JSON array of row objects

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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

def batch_create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.batch_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.batch_create_draft_table_rows"
  end
  # verify the required parameter 'batch_input_hub_db_table_row_v3' is set
  if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3' when calling RowsBatchApi.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Object' 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_create_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#batch_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.

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)


170
171
172
173
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 170

def batch_purge_draft_table_rows(table_id_or_name, batch_input_string, opts = {})
  batch_purge_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  nil
end

#batch_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.

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



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

def batch_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.batch_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.batch_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.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_purge_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#batch_read_draft_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ Object

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:

  • (Object)


240
241
242
243
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 240

def batch_read_draft_table_rows(table_id_or_name, batch_input_string, opts = {})
  data, _status_code, _headers = batch_read_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  data
end

#batch_read_draft_table_rows_with_http_info(table_id_or_name, batch_input_string, opts = {}) ⇒ Array<(Object, 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:

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

    Object data, response status code and response headers



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

def batch_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.batch_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.batch_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.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Object' 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_read_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#batch_read_table_rows(table_id_or_name, batch_input_string, opts = {}) ⇒ Object

Get a set of rows Returns rows in the ‘live` 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:

  • (Object)


310
311
312
313
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 310

def batch_read_table_rows(table_id_or_name, batch_input_string, opts = {})
  data, _status_code, _headers = batch_read_table_rows_with_http_info(table_id_or_name, batch_input_string, opts)
  data
end

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

Get a set of rows Returns rows in the &#x60;live&#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:

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

    Object data, response status code and response headers



321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
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
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 321

def batch_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.batch_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.batch_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.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Object' 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_read_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#batch_replace_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {}) ⇒ Object

Replace rows in batch in draft table Replaces multiple rows as a batch in the ‘draft` version of the table. 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 (BatchInputHubDbTableRowV3)

    JSON array of row objects.

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

    the optional parameters

Returns:

  • (Object)


380
381
382
383
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 380

def batch_replace_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {})
  data, _status_code, _headers = batch_replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3, opts)
  data
end

#batch_replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Replace rows in batch in draft table Replaces multiple rows as a batch in the &#x60;draft&#x60; version of the table. 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 (BatchInputHubDbTableRowV3)

    JSON array of row objects.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
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
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 391

def batch_replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.batch_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.batch_replace_draft_table_rows"
  end
  # verify the required parameter 'batch_input_hub_db_table_row_v3' is set
  if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3' when calling RowsBatchApi.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Object' 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_replace_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#batch_update_draft_table_rows(table_id_or_name, batch_input_json_node, opts = {}) ⇒ Object

Update rows in batch in draft table Updates multiple rows as a batch in the ‘draft` version of the table. 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_json_node (BatchInputJsonNode)

    JSON array of row objects.

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

    the optional parameters

Returns:

  • (Object)


450
451
452
453
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 450

def batch_update_draft_table_rows(table_id_or_name, batch_input_json_node, opts = {})
  data, _status_code, _headers = batch_update_draft_table_rows_with_http_info(table_id_or_name, batch_input_json_node, opts)
  data
end

#batch_update_draft_table_rows_with_http_info(table_id_or_name, batch_input_json_node, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Update rows in batch in draft table Updates multiple rows as a batch in the &#x60;draft&#x60; version of the table. 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_json_node (BatchInputJsonNode)

    JSON array of row objects.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
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
# File 'lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb', line 461

def batch_update_draft_table_rows_with_http_info(table_id_or_name, batch_input_json_node, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RowsBatchApi.batch_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.batch_update_draft_table_rows"
  end
  # verify the required parameter 'batch_input_json_node' is set
  if @api_client.config.client_side_validation && batch_input_json_node.nil?
    fail ArgumentError, "Missing the required parameter 'batch_input_json_node' when calling RowsBatchApi.batch_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Object' 

  # auth_names
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :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#batch_update_draft_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end