Class: CropwisePlatformSdk::RegionApi
- Inherits:
-
Object
- Object
- CropwisePlatformSdk::RegionApi
- Defined in:
- lib/cropwise-platform-sdk/api/region_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_region_by_id(id, opts = {}) ⇒ nil
Delete Region By ID Delete the specified ‘Region`.
-
#delete_region_by_id_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Region By ID Delete the specified `Region`.
-
#delete_region_history_using_delete(id, version_id, opts = {}) ⇒ nil
Delete Region history by id Delete a region’s version.
-
#delete_region_history_using_delete_with_http_info(id, version_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Region history by id Delete a region's version.
-
#edit_region_by_id(id, opts = {}) ⇒ Region
Edit existing Region Edits an existing ‘Region` with the specified id.
-
#edit_region_by_id_with_http_info(id, opts = {}) ⇒ Array<(Region, Integer, Hash)>
Edit existing Region Edits an existing `Region` with the specified id.
-
#get_fields_by_region(region_id, opts = {}) ⇒ Array<GetFieldsByRegion200ResponseInner>
List fields by regions Get the fields of an specified region.
-
#get_fields_by_region_with_http_info(region_id, opts = {}) ⇒ Array<(Array<GetFieldsByRegion200ResponseInner>, Integer, Hash)>
List fields by regions Get the fields of an specified region.
-
#get_region_by_id(id, opts = {}) ⇒ Region
Region details Get the specified Region details.
-
#get_region_by_id_with_http_info(id, opts = {}) ⇒ Array<(Region, Integer, Hash)>
Region details Get the specified Region details.
-
#get_region_history_by_entity_id(id, opts = {}) ⇒ BaseRegionHistoryDTO
Region history details by id Get the history of region by id.
-
#get_region_history_by_entity_id_with_http_info(id, opts = {}) ⇒ Array<(BaseRegionHistoryDTO, Integer, Hash)>
Region history details by id Get the history of region by id.
-
#get_region_tree(region_id, opts = {}) ⇒ Array<OutputRegionDTO>
List regionTree Get the regionTree of an specified region.
-
#get_region_tree_with_http_info(region_id, opts = {}) ⇒ Array<(Array<OutputRegionDTO>, Integer, Hash)>
List regionTree Get the regionTree of an specified region.
-
#get_regions_by_parent_region(region_id, opts = {}) ⇒ Array<Region>
List regions by parent Get the parentRegion of an specified region.
-
#get_regions_by_parent_region_with_http_info(region_id, opts = {}) ⇒ Array<(Array<Region>, Integer, Hash)>
List regions by parent Get the parentRegion of an specified region.
-
#get_regions_by_property_id_extended_search(property_id, include_extended, opts = {}) ⇒ Array<OutputParent>
List regions with Extra Attribute Get the Region of an specified property.
-
#get_regions_by_property_id_extended_search_with_http_info(property_id, include_extended, opts = {}) ⇒ Array<(Array<OutputParent>, Integer, Hash)>
List regions with Extra Attribute Get the Region of an specified property.
-
#get_regions_by_region_id(region_id, opts = {}) ⇒ Array<Region>
List regions Get the Region of an specified region.
-
#get_regions_by_region_id_with_http_info(region_id, opts = {}) ⇒ Array<(Array<Region>, Integer, Hash)>
List regions Get the Region of an specified region.
-
#get_regions_ids(opts = {}) ⇒ PagedRegion
Get all regions by its ids Get the Regions by its ids.
-
#get_regions_ids_with_http_info(opts = {}) ⇒ Array<(PagedRegion, Integer, Hash)>
Get all regions by its ids Get the Regions by its ids.
-
#initialize(api_client = ApiClient.default) ⇒ RegionApi
constructor
A new instance of RegionApi.
-
#post_regions_geometry_updates(property_id, geometry_update_request, opts = {}) ⇒ UpdateResponse
Performs region geometry updates A regions batch that can be created, updated or deleted.
-
#post_regions_geometry_updates_with_http_info(property_id, geometry_update_request, opts = {}) ⇒ Array<(UpdateResponse, Integer, Hash)>
Performs region geometry updates A regions batch that can be created, updated or deleted.
-
#post_v2_regions(opts = {}) ⇒ Region
Region Create a ‘Region`.
-
#post_v2_regions_with_http_info(opts = {}) ⇒ Array<(Region, Integer, Hash)>
Region Create a `Region`.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_region_by_id(id, opts = {}) ⇒ nil
Delete Region By ID Delete the specified ‘Region`. The request is executed asynchronously, so at the end of the request the process may not be completed.
27 28 29 30 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 27 def delete_region_by_id(id, opts = {}) delete_region_by_id_with_http_info(id, opts) nil end |
#delete_region_by_id_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Region By ID Delete the specified `Region`. The request is executed asynchronously, so at the end of the request the process may not be completed.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 37 def delete_region_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.delete_region_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 RegionApi.delete_region_by_id" end # resource path local_var_path = '/v2/regions/{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 => :"RegionApi.delete_region_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: RegionApi#delete_region_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_region_history_using_delete(id, version_id, opts = {}) ⇒ nil
Delete Region history by id Delete a region’s version. The request is executed asynchronously, so at the end of the request the process may not be completed.
89 90 91 92 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 89 def delete_region_history_using_delete(id, version_id, opts = {}) delete_region_history_using_delete_with_http_info(id, version_id, opts) nil end |
#delete_region_history_using_delete_with_http_info(id, version_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Region history by id Delete a region's version. The request is executed asynchronously, so at the end of the request the process may not be completed.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 100 def delete_region_history_using_delete_with_http_info(id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.delete_region_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 RegionApi.delete_region_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 RegionApi.delete_region_history_using_delete" end # resource path local_var_path = '/v2/regions/{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 => :"RegionApi.delete_region_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: RegionApi#delete_region_history_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_region_by_id(id, opts = {}) ⇒ Region
Edit existing Region Edits an existing ‘Region` with the specified id. The `event_date` param will define if the region 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.
157 158 159 160 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 157 def edit_region_by_id(id, opts = {}) data, _status_code, _headers = edit_region_by_id_with_http_info(id, opts) data end |
#edit_region_by_id_with_http_info(id, opts = {}) ⇒ Array<(Region, Integer, Hash)>
Edit existing Region Edits an existing `Region` with the specified id. The `event_date` param will define if the region 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.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 169 def edit_region_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.edit_region_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 RegionApi.edit_region_by_id" end # resource path local_var_path = '/v2/regions/{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[:'region']) # return_type return_type = opts[:debug_return_type] || 'Region' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.edit_region_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: RegionApi#edit_region_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fields_by_region(region_id, opts = {}) ⇒ Array<GetFieldsByRegion200ResponseInner>
List fields by regions Get the fields of an specified region
229 230 231 232 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 229 def get_fields_by_region(region_id, opts = {}) data, _status_code, _headers = get_fields_by_region_with_http_info(region_id, opts) data end |
#get_fields_by_region_with_http_info(region_id, opts = {}) ⇒ Array<(Array<GetFieldsByRegion200ResponseInner>, Integer, Hash)>
List fields by regions Get the fields of an specified region
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 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 240 def get_fields_by_region_with_http_info(region_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_fields_by_region ...' end # verify the required parameter 'region_id' is set if @api_client.config.client_side_validation && region_id.nil? fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionApi.get_fields_by_region" end # resource path local_var_path = '/v2/regions/{regionId}/fields'.sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s)) # query parameters query_params = opts[:query_params] || {} 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] || 'Array<GetFieldsByRegion200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_fields_by_region", :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: RegionApi#get_fields_by_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_region_by_id(id, opts = {}) ⇒ Region
Region details Get the specified Region details.
294 295 296 297 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 294 def get_region_by_id(id, opts = {}) data, _status_code, _headers = get_region_by_id_with_http_info(id, opts) data end |
#get_region_by_id_with_http_info(id, opts = {}) ⇒ Array<(Region, Integer, Hash)>
Region details Get the specified Region details.
304 305 306 307 308 309 310 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 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 304 def get_region_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_region_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 RegionApi.get_region_by_id" end # resource path local_var_path = '/v2/regions/{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] || 'Region' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_region_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: RegionApi#get_region_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_region_history_by_entity_id(id, opts = {}) ⇒ BaseRegionHistoryDTO
Region history details by id Get the history of region by id
360 361 362 363 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 360 def get_region_history_by_entity_id(id, opts = {}) data, _status_code, _headers = get_region_history_by_entity_id_with_http_info(id, opts) data end |
#get_region_history_by_entity_id_with_http_info(id, opts = {}) ⇒ Array<(BaseRegionHistoryDTO, Integer, Hash)>
Region history details by id Get the history of region by id
373 374 375 376 377 378 379 380 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 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 373 def get_region_history_by_entity_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_region_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 RegionApi.get_region_history_by_entity_id" end # resource path local_var_path = '/v2/regions/{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] || 'BaseRegionHistoryDTO' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_region_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: RegionApi#get_region_history_by_entity_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_region_tree(region_id, opts = {}) ⇒ Array<OutputRegionDTO>
List regionTree Get the regionTree of an specified region
430 431 432 433 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 430 def get_region_tree(region_id, opts = {}) data, _status_code, _headers = get_region_tree_with_http_info(region_id, opts) data end |
#get_region_tree_with_http_info(region_id, opts = {}) ⇒ Array<(Array<OutputRegionDTO>, Integer, Hash)>
List regionTree Get the regionTree of an specified region
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 441 def get_region_tree_with_http_info(region_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_region_tree ...' end # verify the required parameter 'region_id' is set if @api_client.config.client_side_validation && region_id.nil? fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionApi.get_region_tree" end # resource path local_var_path = '/v2/regions/{regionId}/region-tree'.sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s)) # query parameters query_params = opts[:query_params] || {} 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] || 'Array<OutputRegionDTO>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_region_tree", :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: RegionApi#get_region_tree\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_regions_by_parent_region(region_id, opts = {}) ⇒ Array<Region>
List regions by parent Get the parentRegion of an specified region
496 497 498 499 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 496 def get_regions_by_parent_region(region_id, opts = {}) data, _status_code, _headers = get_regions_by_parent_region_with_http_info(region_id, opts) data end |
#get_regions_by_parent_region_with_http_info(region_id, opts = {}) ⇒ Array<(Array<Region>, Integer, Hash)>
List regions by parent Get the parentRegion of an specified region
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 507 def get_regions_by_parent_region_with_http_info(region_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_regions_by_parent_region ...' end # verify the required parameter 'region_id' is set if @api_client.config.client_side_validation && region_id.nil? fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionApi.get_regions_by_parent_region" end # resource path local_var_path = '/v2/regions/{regionId}/parent'.sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s)) # query parameters query_params = opts[:query_params] || {} 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] || 'Array<Region>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_regions_by_parent_region", :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: RegionApi#get_regions_by_parent_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_regions_by_property_id_extended_search(property_id, include_extended, opts = {}) ⇒ Array<OutputParent>
List regions with Extra Attribute Get the Region of an specified property
564 565 566 567 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 564 def get_regions_by_property_id_extended_search(property_id, include_extended, opts = {}) data, _status_code, _headers = get_regions_by_property_id_extended_search_with_http_info(property_id, include_extended, opts) data end |
#get_regions_by_property_id_extended_search_with_http_info(property_id, include_extended, opts = {}) ⇒ Array<(Array<OutputParent>, Integer, Hash)>
List regions with Extra Attribute Get the Region of an specified property
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 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 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 577 def get_regions_by_property_id_extended_search_with_http_info(property_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_regions_by_property_id_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 RegionApi.get_regions_by_property_id_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 RegionApi.get_regions_by_property_id_extended_search" end # resource path local_var_path = '/v2/properties/{propertyId}/regions/extended-search'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_extended'] = include_extended 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] || 'Array<OutputParent>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_regions_by_property_id_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: RegionApi#get_regions_by_property_id_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_regions_by_region_id(region_id, opts = {}) ⇒ Array<Region>
List regions Get the Region of an specified region
638 639 640 641 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 638 def get_regions_by_region_id(region_id, opts = {}) data, _status_code, _headers = get_regions_by_region_id_with_http_info(region_id, opts) data end |
#get_regions_by_region_id_with_http_info(region_id, opts = {}) ⇒ Array<(Array<Region>, Integer, Hash)>
List regions Get the Region of an specified region
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 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 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 649 def get_regions_by_region_id_with_http_info(region_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_regions_by_region_id ...' end # verify the required parameter 'region_id' is set if @api_client.config.client_side_validation && region_id.nil? fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionApi.get_regions_by_region_id" end # resource path local_var_path = '/v2/regions/{regionId}/regions'.sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s)) # query parameters query_params = opts[:query_params] || {} 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] || 'Array<Region>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_regions_by_region_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: RegionApi#get_regions_by_region_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_regions_ids(opts = {}) ⇒ PagedRegion
Get all regions by its ids Get the Regions by its ids
707 708 709 710 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 707 def get_regions_ids(opts = {}) data, _status_code, _headers = get_regions_ids_with_http_info(opts) data end |
#get_regions_ids_with_http_info(opts = {}) ⇒ Array<(PagedRegion, Integer, Hash)>
Get all regions by its ids Get the Regions by its ids
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 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 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 721 def get_regions_ids_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.get_regions_ids ...' end # resource path local_var_path = '/v2/regions/ids' # 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? 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']) # 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] || 'PagedRegion' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.get_regions_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: RegionApi#get_regions_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_regions_geometry_updates(property_id, geometry_update_request, opts = {}) ⇒ UpdateResponse
Performs region geometry updates A regions 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.
780 781 782 783 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 780 def post_regions_geometry_updates(property_id, geometry_update_request, opts = {}) data, _status_code, _headers = post_regions_geometry_updates_with_http_info(property_id, geometry_update_request, opts) data end |
#post_regions_geometry_updates_with_http_info(property_id, geometry_update_request, opts = {}) ⇒ Array<(UpdateResponse, Integer, Hash)>
Performs region geometry updates A regions 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.
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 791 def post_regions_geometry_updates_with_http_info(property_id, geometry_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.post_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 RegionApi.post_regions_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 RegionApi.post_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] || {} # 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 => :"RegionApi.post_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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionApi#post_regions_geometry_updates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_regions(opts = {}) ⇒ Region
Region Create a ‘Region`. The request is executed asynchronously, so at the end of the request the process may not be completed.
854 855 856 857 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 854 def post_v2_regions(opts = {}) data, _status_code, _headers = post_v2_regions_with_http_info(opts) data end |
#post_v2_regions_with_http_info(opts = {}) ⇒ Array<(Region, Integer, Hash)>
Region Create a `Region`. The request is executed asynchronously, so at the end of the request the process may not be completed.
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 |
# File 'lib/cropwise-platform-sdk/api/region_api.rb', line 865 def post_v2_regions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegionApi.post_v2_regions ...' end # resource path local_var_path = '/v2/regions' # 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_region_v2']) # return_type return_type = opts[:debug_return_type] || 'Region' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RegionApi.post_v2_regions", :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: RegionApi#post_v2_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |