Class: CropwisePlatformSdk::NotesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cropwise-platform-sdk/api/notes_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ NotesApi

Returns a new instance of NotesApi.



19
20
21
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#v2_notes_context_post(opts = {}) ⇒ PageableNotesObject

Get Notes by context attribute There are two special values for the parameter ‘context` to search notes, `null` and `*` Ex: `property:cf4ff242-674c-42a7-837d-f52a82fd2648/parent_region:null/field:*`, This example should return all notes without the key `parent_region` and with any value at the key `field`. The dates format (YYYY-MM-DD HH:MM:SS)

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



29
30
31
32
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 29

def v2_notes_context_post(opts = {})
  data, _status_code, _headers = v2_notes_context_post_with_http_info(opts)
  data
end

#v2_notes_context_post_with_http_info(opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes by context attribute There are two special values for the parameter &#x60;context&#x60; to search notes, &#x60;null&#x60; and &#x60;*&#x60; Ex: &#x60;property:cf4ff242-674c-42a7-837d-f52a82fd2648/parent_region:null/field:*&#x60;, This example should return all notes without the key &#x60;parent_region&#x60; and with any value at the key &#x60;field&#x60;. The dates format (YYYY-MM-DD HH:MM:SS)

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PageableNotesObject 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
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 41

def v2_notes_context_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_context_post ...'
  end
  # resource path
  local_var_path = '/v2/notes/context'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

  # 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(opts[:'notes_by_context_object'])

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

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

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

#v2_notes_created_by_id_get(id, org_id, opts = {}) ⇒ PageableNotesObject

Get Notes created by a specific user Get Notes created by a specific user

Parameters:

  • id (String)
  • org_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :last_key (String)
  • :size (Integer)
  • :tag (Array<String>)

    If it&#39;s more than one value the values should be sent separately. Ex: &#x60;&amp;tag&#x3D;VALUE1&amp;tag&#x3D;VALUE2&amp;tag&#x3D;VALUE3&#x60;.

Returns:



101
102
103
104
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 101

def v2_notes_created_by_id_get(id, org_id, opts = {})
  data, _status_code, _headers = v2_notes_created_by_id_get_with_http_info(id, org_id, opts)
  data
end

#v2_notes_created_by_id_get_with_http_info(id, org_id, opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes created by a specific user Get Notes created by a specific user

Parameters:

  • id (String)
  • org_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :last_key (String)
  • :size (Integer)
  • :tag (Array<String>)

    If it&#39;s more than one value the values should be sent separately. Ex: &#x60;&amp;tag&#x3D;VALUE1&amp;tag&#x3D;VALUE2&amp;tag&#x3D;VALUE3&#x60;.

Returns:

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

    PageableNotesObject data, response status code and response headers



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
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 115

def v2_notes_created_by_id_get_with_http_info(id, org_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_created_by_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.v2_notes_created_by_id_get"
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling NotesApi.v2_notes_created_by_id_get"
  end
  # resource path
  local_var_path = '/v2/notes/created-by/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'org_id'] = org_id
  query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"NotesApi.v2_notes_created_by_id_get",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#v2_notes_created_by_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v2_notes_fields_id_get(id, org_id, opts = {}) ⇒ PageableNotesObject

Get Notes by field ID in a time interval Get Notes by field ID in a time interval

Parameters:

  • id (String)
  • org_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :last_key (String)
  • :size (Integer)
  • :start_date (String)
  • :end_date (String)
  • :tag (Array<String>)

    If it&#39;s more than one value the values should be sent separately. Ex: &#x60;&amp;tag&#x3D;VALUE1&amp;tag&#x3D;VALUE2&amp;tag&#x3D;VALUE3&#x60;.

Returns:



182
183
184
185
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 182

def v2_notes_fields_id_get(id, org_id, opts = {})
  data, _status_code, _headers = v2_notes_fields_id_get_with_http_info(id, org_id, opts)
  data
end

#v2_notes_fields_id_get_with_http_info(id, org_id, opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes by field ID in a time interval Get Notes by field ID in a time interval

Parameters:

  • id (String)
  • org_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :last_key (String)
  • :size (Integer)
  • :start_date (String)
  • :end_date (String)
  • :tag (Array<String>)

    If it&#39;s more than one value the values should be sent separately. Ex: &#x60;&amp;tag&#x3D;VALUE1&amp;tag&#x3D;VALUE2&amp;tag&#x3D;VALUE3&#x60;.

Returns:

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

    PageableNotesObject data, response status code and response headers



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
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 198

def v2_notes_fields_id_get_with_http_info(id, org_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_fields_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.v2_notes_fields_id_get"
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling NotesApi.v2_notes_fields_id_get"
  end
  # resource path
  local_var_path = '/v2/notes/fields/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'org_id'] = org_id
  query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"NotesApi.v2_notes_fields_id_get",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#v2_notes_fields_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v2_notes_fields_post(opts = {}) ⇒ PageableNotesObject

Get Notes by fields in a time interval Get Notes by fields in a time interval

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



263
264
265
266
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 263

def v2_notes_fields_post(opts = {})
  data, _status_code, _headers = v2_notes_fields_post_with_http_info(opts)
  data
end

#v2_notes_fields_post_with_http_info(opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes by fields in a time interval Get Notes by fields in a time interval

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PageableNotesObject data, response status code and response headers



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
319
320
321
322
323
324
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 275

def v2_notes_fields_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_fields_post ...'
  end
  # resource path
  local_var_path = '/v2/notes/fields'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

  # 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(opts[:'notes_by_fields_object'])

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

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

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

#v2_notes_id_delete(id, opts = {}) ⇒ nil

Delete a note Delete a note

Parameters:

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

    the optional parameters

Returns:

  • (nil)


331
332
333
334
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 331

def v2_notes_id_delete(id, opts = {})
  v2_notes_id_delete_with_http_info(id, opts)
  nil
end

#v2_notes_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a note Delete a note

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 341

def v2_notes_id_delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_id_delete ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.v2_notes_id_delete"
  end
  # resource path
  local_var_path = '/v2/notes/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}

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

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"NotesApi.v2_notes_id_delete",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#v2_notes_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v2_notes_id_get(id, opts = {}) ⇒ NoteObject

Get Note Details Get Note Details

Parameters:

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

    the optional parameters

Returns:



392
393
394
395
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 392

def v2_notes_id_get(id, opts = {})
  data, _status_code, _headers = v2_notes_id_get_with_http_info(id, opts)
  data
end

#v2_notes_id_get_with_http_info(id, opts = {}) ⇒ Array<(NoteObject, Integer, Hash)>

Get Note Details Get Note Details

Parameters:

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

    the optional parameters

Returns:

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

    NoteObject data, response status code and response headers



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
443
444
445
446
447
448
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 402

def v2_notes_id_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.v2_notes_id_get"
  end
  # resource path
  local_var_path = '/v2/notes/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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'])

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"NotesApi.v2_notes_id_get",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#v2_notes_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v2_notes_id_put(id, opts = {}) ⇒ NoteObject

Edit Note with specified Id Edit Note with specified Id. Obs: if the client wants to delete all the Tags and/or the Attachemnt, it should send the attribute with an empty array (the value ‘[]`)

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



456
457
458
459
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 456

def v2_notes_id_put(id, opts = {})
  data, _status_code, _headers = v2_notes_id_put_with_http_info(id, opts)
  data
end

#v2_notes_id_put_with_http_info(id, opts = {}) ⇒ Array<(NoteObject, Integer, Hash)>

Edit Note with specified Id Edit Note with specified Id. Obs: if the client wants to delete all the Tags and/or the Attachemnt, it should send the attribute with an empty array (the value &#x60;[]&#x60;)

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    NoteObject data, response status code and response headers



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
513
514
515
516
517
518
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 467

def v2_notes_id_put_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_id_put ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.v2_notes_id_put"
  end
  # resource path
  local_var_path = '/v2/notes/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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(opts[:'notes_edit_object_request'])

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

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

  new_options = opts.merge(
    :operation => :"NotesApi.v2_notes_id_put",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#v2_notes_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v2_notes_namespace_post(opts = {}) ⇒ PageableNotesObject

Get Notes by namespace Get Notes by namespace

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



527
528
529
530
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 527

def v2_notes_namespace_post(opts = {})
  data, _status_code, _headers = v2_notes_namespace_post_with_http_info(opts)
  data
end

#v2_notes_namespace_post_with_http_info(opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes by namespace Get Notes by namespace

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PageableNotesObject data, response status code and response headers



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 539

def v2_notes_namespace_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_namespace_post ...'
  end
  # resource path
  local_var_path = '/v2/notes/namespace'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

  # 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(opts[:'notes_by_namespace_object'])

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

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

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

#v2_notes_nearest_points_post(opts = {}) ⇒ PageableNotesByNearestPointsObject

Get Notes by nearest points Get Notes by nearest points

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



597
598
599
600
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 597

def v2_notes_nearest_points_post(opts = {})
  data, _status_code, _headers = v2_notes_nearest_points_post_with_http_info(opts)
  data
end

#v2_notes_nearest_points_post_with_http_info(opts = {}) ⇒ Array<(PageableNotesByNearestPointsObject, Integer, Hash)>

Get Notes by nearest points Get Notes by nearest points

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 609

def v2_notes_nearest_points_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_nearest_points_post ...'
  end
  # resource path
  local_var_path = '/v2/notes/nearest-points'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

  # 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(opts[:'notes_by_nearest_points_object'])

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

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

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

#v2_notes_post(opts = {}) ⇒ NoteObject

Create a new Note Create a new Note

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



665
666
667
668
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 665

def v2_notes_post(opts = {})
  data, _status_code, _headers = v2_notes_post_with_http_info(opts)
  data
end

#v2_notes_post_with_http_info(opts = {}) ⇒ Array<(NoteObject, Integer, Hash)>

Create a new Note Create a new Note

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    NoteObject data, response status code and response headers



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 675

def v2_notes_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_post ...'
  end
  # resource path
  local_var_path = '/v2/notes'

  # 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(opts[:'note_object'])

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

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

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

#v2_notes_property_id_get(id, org_id, opts = {}) ⇒ PageableNotesObject

Get Notes by property in a time interval Get Notes by property in a time interval

Parameters:

  • id (String)
  • org_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :last_key (String)
  • :size (Integer)
  • :start_date (String)
  • :end_date (String)
  • :tag (Array<String>)

    If it&#39;s more than one value the values should be sent separately. Ex: &#x60;&amp;tag&#x3D;VALUE1&amp;tag&#x3D;VALUE2&amp;tag&#x3D;VALUE3&#x60;.

Returns:



735
736
737
738
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 735

def v2_notes_property_id_get(id, org_id, opts = {})
  data, _status_code, _headers = v2_notes_property_id_get_with_http_info(id, org_id, opts)
  data
end

#v2_notes_property_id_get_with_http_info(id, org_id, opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes by property in a time interval Get Notes by property in a time interval

Parameters:

  • id (String)
  • org_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :last_key (String)
  • :size (Integer)
  • :start_date (String)
  • :end_date (String)
  • :tag (Array<String>)

    If it&#39;s more than one value the values should be sent separately. Ex: &#x60;&amp;tag&#x3D;VALUE1&amp;tag&#x3D;VALUE2&amp;tag&#x3D;VALUE3&#x60;.

Returns:

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

    PageableNotesObject data, response status code and response headers



751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 751

def v2_notes_property_id_get_with_http_info(id, org_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_property_id_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.v2_notes_property_id_get"
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling NotesApi.v2_notes_property_id_get"
  end
  # resource path
  local_var_path = '/v2/notes/property/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'org_id'] = org_id
  query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"NotesApi.v2_notes_property_id_get",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#v2_notes_property_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v2_notes_source_post(opts = {}) ⇒ PageableNotesObject

Get Notes by source Get Notes by source

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



816
817
818
819
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 816

def v2_notes_source_post(opts = {})
  data, _status_code, _headers = v2_notes_source_post_with_http_info(opts)
  data
end

#v2_notes_source_post_with_http_info(opts = {}) ⇒ Array<(PageableNotesObject, Integer, Hash)>

Get Notes by source Get Notes by source

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PageableNotesObject data, response status code and response headers



828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
# File 'lib/cropwise-platform-sdk/api/notes_api.rb', line 828

def v2_notes_source_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.v2_notes_source_post ...'
  end
  # resource path
  local_var_path = '/v2/notes/source'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

  # 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(opts[:'notes_by_source_object'])

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

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

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