Class: CropwisePlatformSdk::FieldApi
- Inherits:
-
Object
- Object
- CropwisePlatformSdk::FieldApi
- Defined in:
- lib/cropwise-platform-sdk/api/field_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_field(opts = {}) ⇒ Field
Create Field Create a ‘Field`.
-
#create_field_with_http_info(opts = {}) ⇒ Array<(Field, Integer, Hash)>
Create Field Create a `Field`.
-
#delete_area_history_using_delete(id, version_id, opts = {}) ⇒ nil
Delete Field history by id Delete a field’s version.
-
#delete_area_history_using_delete_with_http_info(id, version_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Field history by id Delete a field's version.
-
#delete_field_by_id(id, opts = {}) ⇒ nil
Delete Field By ID Delete the specified ‘Field`.
-
#delete_field_by_id_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Field By ID Delete the specified `Field`.
-
#edit_field_by_id(id, opts = {}) ⇒ Field
Edit existing Field Edits an existing ‘Field` with the specified id.
-
#edit_field_by_id_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Edit existing Field Edits an existing `Field` with the specified id.
-
#get_area_history_by_entity_id(id, opts = {}) ⇒ FieldHistoryDTO
Field history details by id Get the history of field by id.
-
#get_area_history_by_entity_id_with_http_info(id, opts = {}) ⇒ Array<(FieldHistoryDTO, Integer, Hash)>
Field history details by id Get the history of field by id.
-
#get_current_season_by_field_id(id, opts = {}) ⇒ GetCurrentSeasonByFieldId200Response
Get Current Season by Field Id Get Current Season by Field Id.
-
#get_current_season_by_field_id_with_http_info(id, opts = {}) ⇒ Array<(GetCurrentSeasonByFieldId200Response, Integer, Hash)>
Get Current Season by Field Id Get Current Season by Field Id.
-
#get_current_season_fields(property_id, deleted, opts = {}) ⇒ PagedSeasonField
List of property’s season fields Get the current season fields from a specifief property.
-
#get_current_season_fields_with_http_info(property_id, deleted, opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
List of property's season fields Get the current season fields from a specifief property.
-
#get_cycle_season_fields(cycle_id, opts = {}) ⇒ PagedSeasonField
Get Cycle’s season-fields Get Cycle’s Season-fields.
-
#get_cycle_season_fields_with_http_info(cycle_id, opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
Get Cycle's season-fields Get Cycle's Season-fields.
-
#get_field_by_id(id, opts = {}) ⇒ Field
Field details Get the specified Field details.
-
#get_field_by_id_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Field details Get the specified Field details.
-
#get_field_by_version(id, opts = {}) ⇒ Field
Field details by version Get the specified field by version.
-
#get_field_by_version_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Field details by version Get the specified field by version.
-
#get_fields(parent_region_id, opts = {}) ⇒ PagedField
List fields List the fields of a given Region.
-
#get_fields_by_field_id(opts = {}) ⇒ PagedField
Get Fields by Ids Get Fields by its Ids.
-
#get_fields_by_field_id_with_http_info(opts = {}) ⇒ Array<(PagedField, Integer, Hash)>
Get Fields by Ids Get Fields by its Ids.
-
#get_fields_by_property_extended_search(property_id, include_extended, opts = {}) ⇒ PagedField
List property fields with ExtendedAttribute Get the Fields of an specified property and optionally the Geometry of each Field.
-
#get_fields_by_property_extended_search_with_http_info(property_id, include_extended, opts = {}) ⇒ Array<(PagedField, Integer, Hash)>
List property fields with ExtendedAttribute Get the Fields of an specified property and optionally the Geometry of each Field.
-
#get_fields_geometry_updates(property_id, opts = {}) ⇒ RegionCollection
Query results and version identifiers of previous updates.
-
#get_fields_geometry_updates_with_http_info(property_id, opts = {}) ⇒ Array<(RegionCollection, Integer, Hash)>
Query results and version identifiers of previous updates.
-
#get_fields_with_http_info(parent_region_id, opts = {}) ⇒ Array<(PagedField, Integer, Hash)>
List fields List the fields of a given Region.
-
#get_regions_geometry_updates(property_id, opts = {}) ⇒ RegionCollection
Query results and version identifiers of previous updates.
-
#get_regions_geometry_updates_with_http_info(property_id, opts = {}) ⇒ Array<(RegionCollection, Integer, Hash)>
Query results and version identifiers of previous updates.
-
#get_season_fields_by_season_id(season_id, opts = {}) ⇒ PagedSeasonField
List Fields of the Season List the Season/Field relationship of the specified Season.
-
#get_season_fields_by_season_id_with_http_info(season_id, opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
List Fields of the Season List the Season/Field relationship of the specified Season.
-
#get_season_fields_by_seasons_ids_and_properties_ids(opts = {}) ⇒ PagedSeasonField
List Seasons Fields of Seasons and Properties List the Season/Field relationship for specifieds Seasons.
-
#get_season_fields_by_seasons_ids_and_properties_ids_with_http_info(opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
List Seasons Fields of Seasons and Properties List the Season/Field relationship for specifieds Seasons.
-
#get_seasons_by_field_id(id, opts = {}) ⇒ GetSeasonsByFieldId200Response
Get Seasons by Field Id Get Seasons by Field Id.
-
#get_seasons_by_field_id_with_http_info(id, opts = {}) ⇒ Array<(GetSeasonsByFieldId200Response, Integer, Hash)>
Get Seasons by Field Id Get Seasons by Field Id.
-
#initialize(api_client = ApiClient.default) ⇒ FieldApi
constructor
A new instance of FieldApi.
-
#post_field_by_version(id, opts = {}) ⇒ Field
Restore field by version Get the specified field by version.
-
#post_field_by_version_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Restore field by version Get the specified field by version.
-
#post_fields_geometry_updates(property_id, geometry_update_request, opts = {}) ⇒ UpdateResponse
Performs field geometry updates A fields batch that can be created, updated or deleted.
-
#post_fields_geometry_updates_with_http_info(property_id, geometry_update_request, opts = {}) ⇒ Array<(UpdateResponse, Integer, Hash)>
Performs field geometry updates A fields batch that can be created, updated or deleted.
-
#season_land_batch_updates(opts = {}) ⇒ nil
Perform batch of operations related to each Season and ‘land` (Properties and Fields) Associate/dissociate properties and/or fields to/from each Season.
-
#season_land_batch_updates_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform batch of operations related to each Season and `land` (Properties and Fields) Associate/dissociate properties and/or fields to/from each Season.
-
#season_land_updates(season_id, opts = {}) ⇒ nil
Perform a batch of operations related to Season and ‘land` (Properties and Fields) Associate/dissociate properties and/or fields to/from a Season.
-
#season_land_updates_with_http_info(season_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform a batch of operations related to Season and `land` (Properties and Fields) Associate/dissociate properties and/or fields to/from a Season.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_field(opts = {}) ⇒ Field
Create Field Create a ‘Field`. The request is executed asynchronously, so at the end of the request the process may not be completed.
28 29 30 31 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 28 def create_field(opts = {}) data, _status_code, _headers = create_field_with_http_info(opts) data end |
#create_field_with_http_info(opts = {}) ⇒ Array<(Field, Integer, Hash)>
Create Field Create a `Field`. The request is executed asynchronously, so at the end of the request the process may not be completed.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 39 def create_field_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.create_field ...' end # resource path local_var_path = '/v2/fields' # 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 header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'basic_field']) # return_type return_type = opts[:debug_return_type] || 'Field' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.create_field", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#create_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_area_history_using_delete(id, version_id, opts = {}) ⇒ nil
Delete Field history by id Delete a field’s version. The request is executed asynchronously, so at the end of the request the process may not be completed.
95 96 97 98 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 95 def delete_area_history_using_delete(id, version_id, opts = {}) delete_area_history_using_delete_with_http_info(id, version_id, opts) nil end |
#delete_area_history_using_delete_with_http_info(id, version_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Field history by id Delete a field's version. The request is executed asynchronously, so at the end of the request the process may not be completed.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 106 def delete_area_history_using_delete_with_http_info(id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.delete_area_history_using_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 FieldApi.delete_area_history_using_delete" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling FieldApi.delete_area_history_using_delete" end # resource path local_var_path = '/v2/fields/{id}/history/{version_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_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] || [] = opts.merge( :operation => :"FieldApi.delete_area_history_using_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#delete_area_history_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_field_by_id(id, opts = {}) ⇒ nil
Delete Field By ID Delete the specified ‘Field`. The request is executed asynchronously, so at the end of the request the process may not be completed.
161 162 163 164 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 161 def delete_field_by_id(id, opts = {}) delete_field_by_id_with_http_info(id, opts) nil end |
#delete_field_by_id_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Field By ID Delete the specified `Field`. The request is executed asynchronously, so at the end of the request the process may not be completed.
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 171 def delete_field_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.delete_field_by_id ...' 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 FieldApi.delete_field_by_id" end # resource path local_var_path = '/v2/fields/{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] || [] = opts.merge( :operation => :"FieldApi.delete_field_by_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#delete_field_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_field_by_id(id, opts = {}) ⇒ Field
Edit existing Field Edits an existing ‘Field` with the specified id. The `event_date` param will define if the field will be edit or will create a new version. The request is executed asynchronously, so at the end of the request the process may not be completed.
224 225 226 227 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 224 def edit_field_by_id(id, opts = {}) data, _status_code, _headers = edit_field_by_id_with_http_info(id, opts) data end |
#edit_field_by_id_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Edit existing Field Edits an existing `Field` with the specified id. The `event_date` param will define if the field will be edit or will create a new version. The request is executed asynchronously, so at the end of the request the process may not be completed.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 236 def edit_field_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.edit_field_by_id ...' 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 FieldApi.edit_field_by_id" end # resource path local_var_path = '/v2/fields/{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 header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'field']) # return_type return_type = opts[:debug_return_type] || 'Field' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.edit_field_by_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#edit_field_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_area_history_by_entity_id(id, opts = {}) ⇒ FieldHistoryDTO
Field history details by id Get the history of field by id
298 299 300 301 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 298 def get_area_history_by_entity_id(id, opts = {}) data, _status_code, _headers = get_area_history_by_entity_id_with_http_info(id, opts) data end |
#get_area_history_by_entity_id_with_http_info(id, opts = {}) ⇒ Array<(FieldHistoryDTO, Integer, Hash)>
Field history details by id Get the history of field by id
311 312 313 314 315 316 317 318 319 320 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 311 def get_area_history_by_entity_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_area_history_by_entity_id ...' 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 FieldApi.get_area_history_by_entity_id" end # resource path local_var_path = '/v2/fields/{id}/history'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].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] || 'FieldHistoryDTO' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_area_history_by_entity_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_area_history_by_entity_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_current_season_by_field_id(id, opts = {}) ⇒ GetCurrentSeasonByFieldId200Response
Get Current Season by Field Id Get Current Season by Field Id
369 370 371 372 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 369 def get_current_season_by_field_id(id, opts = {}) data, _status_code, _headers = get_current_season_by_field_id_with_http_info(id, opts) data end |
#get_current_season_by_field_id_with_http_info(id, opts = {}) ⇒ Array<(GetCurrentSeasonByFieldId200Response, Integer, Hash)>
Get Current Season by Field Id Get Current Season by Field Id
381 382 383 384 385 386 387 388 389 390 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 381 def get_current_season_by_field_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_current_season_by_field_id ...' 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 FieldApi.get_current_season_by_field_id" end # resource path local_var_path = '/v2/fields/{id}/current-season'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_extended'] = opts[:'include_extended'] if !opts[:'include_extended'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetCurrentSeasonByFieldId200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_current_season_by_field_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_current_season_by_field_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_current_season_fields(property_id, deleted, opts = {}) ⇒ PagedSeasonField
List of property’s season fields Get the current season fields from a specifief property
440 441 442 443 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 440 def get_current_season_fields(property_id, deleted, opts = {}) data, _status_code, _headers = get_current_season_fields_with_http_info(property_id, deleted, opts) data end |
#get_current_season_fields_with_http_info(property_id, deleted, opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
List of property's season fields Get the current season fields from a specifief property
454 455 456 457 458 459 460 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 454 def get_current_season_fields_with_http_info(property_id, deleted, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_current_season_fields ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling FieldApi.get_current_season_fields" end # verify the required parameter 'deleted' is set if @api_client.config.client_side_validation && deleted.nil? fail ArgumentError, "Missing the required parameter 'deleted' when calling FieldApi.get_current_season_fields" end # resource path local_var_path = '/v2/properties/{property_id}/current-season-fields'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'deleted'] = deleted query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'lastUpdateDate'] = opts[:'last_update_date'] if !opts[:'last_update_date'].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] || 'PagedSeasonField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_current_season_fields", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_current_season_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_cycle_season_fields(cycle_id, opts = {}) ⇒ PagedSeasonField
Get Cycle’s season-fields Get Cycle’s Season-fields
515 516 517 518 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 515 def get_cycle_season_fields(cycle_id, opts = {}) data, _status_code, _headers = get_cycle_season_fields_with_http_info(cycle_id, opts) data end |
#get_cycle_season_fields_with_http_info(cycle_id, opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
Get Cycle's season-fields Get Cycle's Season-fields
525 526 527 528 529 530 531 532 533 534 535 536 537 538 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 525 def get_cycle_season_fields_with_http_info(cycle_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_cycle_season_fields ...' end # verify the required parameter 'cycle_id' is set if @api_client.config.client_side_validation && cycle_id.nil? fail ArgumentError, "Missing the required parameter 'cycle_id' when calling FieldApi.get_cycle_season_fields" end # resource path local_var_path = '/v2/cycles/{cycleId}/season-fields'.sub('{' + 'cycleId' + '}', CGI.escape(cycle_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] || 'PagedSeasonField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_cycle_season_fields", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_cycle_season_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_field_by_id(id, opts = {}) ⇒ Field
Field details Get the specified Field details.
580 581 582 583 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 580 def get_field_by_id(id, opts = {}) data, _status_code, _headers = get_field_by_id_with_http_info(id, opts) data end |
#get_field_by_id_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Field details Get the specified Field details.
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 592 def get_field_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_field_by_id ...' 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 FieldApi.get_field_by_id" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/fields/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'reference_date'] = opts[:'reference_date'] if !opts[:'reference_date'].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] || 'Field' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_field_by_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_field_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_field_by_version(id, opts = {}) ⇒ Field
Field details by version Get the specified field by version
653 654 655 656 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 653 def get_field_by_version(id, opts = {}) data, _status_code, _headers = get_field_by_version_with_http_info(id, opts) data end |
#get_field_by_version_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Field details by version Get the specified field by version
665 666 667 668 669 670 671 672 673 674 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 665 def get_field_by_version_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_field_by_version ...' 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 FieldApi.get_field_by_version" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/fields/{id}/versioning'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'reference_date'] = opts[:'reference_date'] if !opts[:'reference_date'].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] || 'Field' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_field_by_version", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_field_by_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fields(parent_region_id, opts = {}) ⇒ PagedField
List fields List the fields of a given Region.
729 730 731 732 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 729 def get_fields(parent_region_id, opts = {}) data, _status_code, _headers = get_fields_with_http_info(parent_region_id, opts) data end |
#get_fields_by_field_id(opts = {}) ⇒ PagedField
Get Fields by Ids Get Fields by its Ids. If an id does not exist, it does not return it.
811 812 813 814 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 811 def get_fields_by_field_id(opts = {}) data, _status_code, _headers = get_fields_by_field_id_with_http_info(opts) data end |
#get_fields_by_field_id_with_http_info(opts = {}) ⇒ Array<(PagedField, Integer, Hash)>
Get Fields by Ids Get Fields by its Ids. If an id does not exist, it does not return it.
825 826 827 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 878 879 880 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 825 def get_fields_by_field_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_fields_by_field_id ...' end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/fields/ids' # query parameters query_params = opts[:query_params] || {} query_params[:'reference_date'] = opts[:'reference_date'] if !opts[:'reference_date'].nil? query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].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[:'uuid_list_model']) # return_type return_type = opts[:debug_return_type] || 'PagedField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_fields_by_field_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_fields_by_field_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fields_by_property_extended_search(property_id, include_extended, opts = {}) ⇒ PagedField
List property fields with ExtendedAttribute Get the Fields of an specified property and optionally the Geometry of each Field
893 894 895 896 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 893 def get_fields_by_property_extended_search(property_id, include_extended, opts = {}) data, _status_code, _headers = get_fields_by_property_extended_search_with_http_info(property_id, include_extended, opts) data end |
#get_fields_by_property_extended_search_with_http_info(property_id, include_extended, opts = {}) ⇒ Array<(PagedField, Integer, Hash)>
List property fields with ExtendedAttribute Get the Fields of an specified property and optionally the Geometry of each Field
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 909 def get_fields_by_property_extended_search_with_http_info(property_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_fields_by_property_extended_search ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling FieldApi.get_fields_by_property_extended_search" end # verify the required parameter 'include_extended' is set if @api_client.config.client_side_validation && include_extended.nil? fail ArgumentError, "Missing the required parameter 'include_extended' when calling FieldApi.get_fields_by_property_extended_search" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/properties/{property_id}/fields/extended-search'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_extended'] = include_extended query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'extra_attribute'] = opts[:'extra_attribute'] if !opts[:'extra_attribute'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_fields_by_property_extended_search", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_fields_by_property_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fields_geometry_updates(property_id, opts = {}) ⇒ RegionCollection
Query results and version identifiers of previous updates.
978 979 980 981 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 978 def get_fields_geometry_updates(property_id, opts = {}) data, _status_code, _headers = get_fields_geometry_updates_with_http_info(property_id, opts) data end |
#get_fields_geometry_updates_with_http_info(property_id, opts = {}) ⇒ Array<(RegionCollection, Integer, Hash)>
Query results and version identifiers of previous updates.
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 990 def get_fields_geometry_updates_with_http_info(property_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_fields_geometry_updates ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling FieldApi.get_fields_geometry_updates" end # resource path local_var_path = '/v2/properties/{property_id}/fields/updates'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'reference_date'] = opts[:'reference_date'] if !opts[:'reference_date'].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] || 'RegionCollection' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_fields_geometry_updates", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_fields_geometry_updates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fields_with_http_info(parent_region_id, opts = {}) ⇒ Array<(PagedField, Integer, Hash)>
List fields List the fields of a given Region.
744 745 746 747 748 749 750 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 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 744 def get_fields_with_http_info(parent_region_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_fields ...' end # verify the required parameter 'parent_region_id' is set if @api_client.config.client_side_validation && parent_region_id.nil? fail ArgumentError, "Missing the required parameter 'parent_region_id' when calling FieldApi.get_fields" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/fields' # query parameters query_params = opts[:query_params] || {} query_params[:'parent_region_id'] = parent_region_id query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil? query_params[:'reference_date'] = opts[:'reference_date'] if !opts[:'reference_date'].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] || 'PagedField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_fields", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_regions_geometry_updates(property_id, opts = {}) ⇒ RegionCollection
Query results and version identifiers of previous updates.
1047 1048 1049 1050 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1047 def get_regions_geometry_updates(property_id, opts = {}) data, _status_code, _headers = get_regions_geometry_updates_with_http_info(property_id, opts) data end |
#get_regions_geometry_updates_with_http_info(property_id, opts = {}) ⇒ Array<(RegionCollection, Integer, Hash)>
Query results and version identifiers of previous updates.
1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1058 def get_regions_geometry_updates_with_http_info(property_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_regions_geometry_updates ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling FieldApi.get_regions_geometry_updates" end # resource path local_var_path = '/v2/properties/{property_id}/regions/updates'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].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] || 'RegionCollection' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_regions_geometry_updates", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_regions_geometry_updates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_season_fields_by_season_id(season_id, opts = {}) ⇒ PagedSeasonField
List Fields of the Season List the Season/Field relationship of the specified Season. It can be filtered using a query parameter to specify a Property.
1116 1117 1118 1119 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1116 def get_season_fields_by_season_id(season_id, opts = {}) data, _status_code, _headers = get_season_fields_by_season_id_with_http_info(season_id, opts) data end |
#get_season_fields_by_season_id_with_http_info(season_id, opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
List Fields of the Season List the Season/Field relationship of the specified Season. It can be filtered using a query parameter to specify a Property.
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1129 def get_season_fields_by_season_id_with_http_info(season_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_season_fields_by_season_id ...' end # verify the required parameter 'season_id' is set if @api_client.config.client_side_validation && season_id.nil? fail ArgumentError, "Missing the required parameter 'season_id' when calling FieldApi.get_season_fields_by_season_id" end # resource path local_var_path = '/v2/seasons/{season_id}/fields'.sub('{' + 'season_id' + '}', CGI.escape(season_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'property_id'] = opts[:'property_id'] if !opts[:'property_id'].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] || 'PagedSeasonField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_season_fields_by_season_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_season_fields_by_season_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_season_fields_by_seasons_ids_and_properties_ids(opts = {}) ⇒ PagedSeasonField
List Seasons Fields of Seasons and Properties List the Season/Field relationship for specifieds Seasons. It can be filtered by passing a property id. If none is passed, no season field is filtered.
1188 1189 1190 1191 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1188 def get_season_fields_by_seasons_ids_and_properties_ids(opts = {}) data, _status_code, _headers = get_season_fields_by_seasons_ids_and_properties_ids_with_http_info(opts) data end |
#get_season_fields_by_seasons_ids_and_properties_ids_with_http_info(opts = {}) ⇒ Array<(PagedSeasonField, Integer, Hash)>
List Seasons Fields of Seasons and Properties List the Season/Field relationship for specifieds Seasons. It can be filtered by passing a property id. If none is passed, no season field is filtered.
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1201 def get_season_fields_by_seasons_ids_and_properties_ids_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_season_fields_by_seasons_ids_and_properties_ids ...' end # resource path local_var_path = '/v2/seasons/ids/properties/ids/fields' # query parameters query_params = opts[:query_params] || {} query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].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[:'body']) # return_type return_type = opts[:debug_return_type] || 'PagedSeasonField' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_season_fields_by_seasons_ids_and_properties_ids", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_season_fields_by_seasons_ids_and_properties_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_seasons_by_field_id(id, opts = {}) ⇒ GetSeasonsByFieldId200Response
Get Seasons by Field Id Get Seasons by Field Id
1258 1259 1260 1261 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1258 def get_seasons_by_field_id(id, opts = {}) data, _status_code, _headers = get_seasons_by_field_id_with_http_info(id, opts) data end |
#get_seasons_by_field_id_with_http_info(id, opts = {}) ⇒ Array<(GetSeasonsByFieldId200Response, Integer, Hash)>
Get Seasons by Field Id Get Seasons by Field Id
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1268 def get_seasons_by_field_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.get_seasons_by_field_id ...' 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 FieldApi.get_seasons_by_field_id" end # resource path local_var_path = '/v2/fields/{id}/seasons'.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] || 'GetSeasonsByFieldId200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.get_seasons_by_field_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#get_seasons_by_field_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_field_by_version(id, opts = {}) ⇒ Field
Restore field by version Get the specified field by version
1324 1325 1326 1327 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1324 def post_field_by_version(id, opts = {}) data, _status_code, _headers = post_field_by_version_with_http_info(id, opts) data end |
#post_field_by_version_with_http_info(id, opts = {}) ⇒ Array<(Field, Integer, Hash)>
Restore field by version Get the specified field by version
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1337 def post_field_by_version_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.post_field_by_version ...' 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 FieldApi.post_field_by_version" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/fields/{id}/versioning'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'reference_date'] = opts[:'reference_date'] if !opts[:'reference_date'].nil? query_params[:'restore'] = opts[:'restore'] if !opts[:'restore'].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] || 'Field' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.post_field_by_version", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#post_field_by_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_fields_geometry_updates(property_id, geometry_update_request, opts = {}) ⇒ UpdateResponse
Performs field geometry updates A fields batch that can be created, updated or deleted. The request is executed asynchronously, so at the end of the request the process may not be completed.
1399 1400 1401 1402 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1399 def post_fields_geometry_updates(property_id, geometry_update_request, opts = {}) data, _status_code, _headers = post_fields_geometry_updates_with_http_info(property_id, geometry_update_request, opts) data end |
#post_fields_geometry_updates_with_http_info(property_id, geometry_update_request, opts = {}) ⇒ Array<(UpdateResponse, Integer, Hash)>
Performs field geometry updates A fields batch that can be created, updated or deleted. The request is executed asynchronously, so at the end of the request the process may not be completed.
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1411 def post_fields_geometry_updates_with_http_info(property_id, geometry_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.post_fields_geometry_updates ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling FieldApi.post_fields_geometry_updates" end # verify the required parameter 'geometry_update_request' is set if @api_client.config.client_side_validation && geometry_update_request.nil? fail ArgumentError, "Missing the required parameter 'geometry_update_request' when calling FieldApi.post_fields_geometry_updates" end allowable_values = ["saved_fields"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/properties/{property_id}/fields/updates'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].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(geometry_update_request) # return_type return_type = opts[:debug_return_type] || 'UpdateResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.post_fields_geometry_updates", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#post_fields_geometry_updates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#season_land_batch_updates(opts = {}) ⇒ nil
Perform batch of operations related to each Season and ‘land` (Properties and Fields) Associate/dissociate properties and/or fields to/from each Season.
1478 1479 1480 1481 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1478 def season_land_batch_updates(opts = {}) season_land_batch_updates_with_http_info(opts) nil end |
#season_land_batch_updates_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform batch of operations related to each Season and `land` (Properties and Fields) Associate/dissociate properties and/or fields to/from each Season.
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1488 def season_land_batch_updates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.season_land_batch_updates ...' end # resource path local_var_path = '/v2/seasons/land/updates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # 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[:'season_land_batch_list']) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.season_land_batch_updates", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#season_land_batch_updates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#season_land_updates(season_id, opts = {}) ⇒ nil
Perform a batch of operations related to Season and ‘land` (Properties and Fields) Associate/dissociate properties and/or fields to/from a Season.
1541 1542 1543 1544 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1541 def season_land_updates(season_id, opts = {}) season_land_updates_with_http_info(season_id, opts) nil end |
#season_land_updates_with_http_info(season_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform a batch of operations related to Season and `land` (Properties and Fields) Associate/dissociate properties and/or fields to/from a Season.
1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 |
# File 'lib/cropwise-platform-sdk/api/field_api.rb', line 1552 def season_land_updates_with_http_info(season_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FieldApi.season_land_updates ...' end # verify the required parameter 'season_id' is set if @api_client.config.client_side_validation && season_id.nil? fail ArgumentError, "Missing the required parameter 'season_id' when calling FieldApi.season_land_updates" end # resource path local_var_path = '/v2/seasons/{season_id}/land/updates'.sub('{' + 'season_id' + '}', CGI.escape(season_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # 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[:'season_land_updates_list']) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FieldApi.season_land_updates", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FieldApi#season_land_updates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |