Class: CropwisePlatformSdk::CatalogCropGrowthScaleApi
- Inherits:
-
Object
- Object
- CropwisePlatformSdk::CatalogCropGrowthScaleApi
- Defined in:
- lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_v2_catalog_growth_scales_id(id, opts = {}) ⇒ nil
Delete Growth Scale By Id Delete Growth Scale By Id.
-
#delete_v2_catalog_growth_scales_id_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Growth Scale By Id Delete Growth Scale By Id.
-
#get_all_v2_catalog_growth_scales(crop_id, org_id, location, opts = {}) ⇒ Array<CreateGrowthScaleResponse>
Get All Growth Scales Associated With Org Get All Growth Scales Associated With Org using org id, crop id, location.
-
#get_all_v2_catalog_growth_scales_with_http_info(crop_id, org_id, location, opts = {}) ⇒ Array<(Array<CreateGrowthScaleResponse>, Integer, Hash)>
Get All Growth Scales Associated With Org Get All Growth Scales Associated With Org using org id, crop id, location.
-
#get_v2_catalog_growth_scales(id, opts = {}) ⇒ GrowthScaleDTO
Get Growth Scale By Id Get Growth Scale By Id.
-
#get_v2_catalog_growth_scales_with_http_info(id, opts = {}) ⇒ Array<(GrowthScaleDTO, Integer, Hash)>
Get Growth Scale By Id Get Growth Scale By Id.
-
#get_v2_g_scale_localized(opts = {}) ⇒ GetV2GScaleLocalized200Response
Get Growth Scales By Localized Crop.
-
#get_v2_g_scale_localized_with_http_info(opts = {}) ⇒ Array<(GetV2GScaleLocalized200Response, Integer, Hash)>
Get Growth Scales By Localized Crop.
-
#get_v2_g_scale_without_org_id(opts = {}) ⇒ PageableGrowthScaleDTO
Get All Growth Scales Without OrgId.
-
#get_v2_g_scale_without_org_id_with_http_info(opts = {}) ⇒ Array<(PageableGrowthScaleDTO, Integer, Hash)>
Get All Growth Scales Without OrgId.
-
#get_v2_localizeds_by_growth_scale(id, opts = {}) ⇒ GetV2LocalizedsByGrowthScale200Response
Get all Localized Crops from a growth scale.
-
#get_v2_localizeds_by_growth_scale_with_http_info(id, opts = {}) ⇒ Array<(GetV2LocalizedsByGrowthScale200Response, Integer, Hash)>
Get all Localized Crops from a growth scale.
-
#initialize(api_client = ApiClient.default) ⇒ CatalogCropGrowthScaleApi
constructor
A new instance of CatalogCropGrowthScaleApi.
-
#post_v2_catalog_growth_scale_allocation(opts = {}) ⇒ AllocationGrowthScaleResponse
Create Growth Scale Allocation Create Growth Scale Allocation.
-
#post_v2_catalog_growth_scale_allocation_with_http_info(opts = {}) ⇒ Array<(AllocationGrowthScaleResponse, Integer, Hash)>
Create Growth Scale Allocation Create Growth Scale Allocation.
-
#post_v2_catalog_growth_scales(opts = {}) ⇒ CreateGrowthScaleResponse
Create a Growth Scale Create a Growth Scale.
-
#post_v2_catalog_growth_scales_with_http_info(opts = {}) ⇒ Array<(CreateGrowthScaleResponse, Integer, Hash)>
Create a Growth Scale Create a Growth Scale.
-
#post_v2_growth_scale_with_localized_associate(id, opts = {}) ⇒ LocalizedCropandGrowthScaleAssociationResponse
Associate a growth scale with localized crops.
-
#post_v2_growth_scale_with_localized_associate_with_http_info(id, opts = {}) ⇒ Array<(LocalizedCropandGrowthScaleAssociationResponse, Integer, Hash)>
Associate a growth scale with localized crops.
-
#put_v2_catalog_growth_scales_id(id, opts = {}) ⇒ GrowthScaleDTO
Update Growth Scale By Id Update Growth Scale By Id.
-
#put_v2_catalog_growth_scales_id_with_http_info(id, opts = {}) ⇒ Array<(GrowthScaleDTO, Integer, Hash)>
Update Growth Scale By Id Update Growth Scale By Id.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CatalogCropGrowthScaleApi
Returns a new instance of CatalogCropGrowthScaleApi.
19 20 21 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_v2_catalog_growth_scales_id(id, opts = {}) ⇒ nil
Delete Growth Scale By Id Delete Growth Scale By Id
27 28 29 30 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 27 def delete_v2_catalog_growth_scales_id(id, opts = {}) delete_v2_catalog_growth_scales_id_with_http_info(id, opts) nil end |
#delete_v2_catalog_growth_scales_id_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Growth Scale By Id Delete Growth Scale By Id
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 82 83 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 37 def delete_v2_catalog_growth_scales_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.delete_v2_catalog_growth_scales_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 CatalogCropGrowthScaleApi.delete_v2_catalog_growth_scales_id" end # resource path local_var_path = '/v2/catalog/growth-scales/{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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.delete_v2_catalog_growth_scales_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: CatalogCropGrowthScaleApi#delete_v2_catalog_growth_scales_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_v2_catalog_growth_scales(crop_id, org_id, location, opts = {}) ⇒ Array<CreateGrowthScaleResponse>
Get All Growth Scales Associated With Org Get All Growth Scales Associated With Org using org id, crop id, location
92 93 94 95 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 92 def get_all_v2_catalog_growth_scales(crop_id, org_id, location, opts = {}) data, _status_code, _headers = get_all_v2_catalog_growth_scales_with_http_info(crop_id, org_id, location, opts) data end |
#get_all_v2_catalog_growth_scales_with_http_info(crop_id, org_id, location, opts = {}) ⇒ Array<(Array<CreateGrowthScaleResponse>, Integer, Hash)>
Get All Growth Scales Associated With Org Get All Growth Scales Associated With Org using org id, crop id, location
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 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 104 def get_all_v2_catalog_growth_scales_with_http_info(crop_id, org_id, location, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.get_all_v2_catalog_growth_scales ...' end # verify the required parameter 'crop_id' is set if @api_client.config.client_side_validation && crop_id.nil? fail ArgumentError, "Missing the required parameter 'crop_id' when calling CatalogCropGrowthScaleApi.get_all_v2_catalog_growth_scales" end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling CatalogCropGrowthScaleApi.get_all_v2_catalog_growth_scales" end # verify the required parameter 'location' is set if @api_client.config.client_side_validation && location.nil? fail ArgumentError, "Missing the required parameter 'location' when calling CatalogCropGrowthScaleApi.get_all_v2_catalog_growth_scales" end # resource path local_var_path = '/v2/catalog/growth-scales' # query parameters query_params = opts[:query_params] || {} query_params[:'crop_id'] = crop_id query_params[:'org_id'] = org_id query_params[:'location'] = location # 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<CreateGrowthScaleResponse>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.get_all_v2_catalog_growth_scales", :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: CatalogCropGrowthScaleApi#get_all_v2_catalog_growth_scales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_catalog_growth_scales(id, opts = {}) ⇒ GrowthScaleDTO
Get Growth Scale By Id Get Growth Scale By Id
168 169 170 171 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 168 def get_v2_catalog_growth_scales(id, opts = {}) data, _status_code, _headers = get_v2_catalog_growth_scales_with_http_info(id, opts) data end |
#get_v2_catalog_growth_scales_with_http_info(id, opts = {}) ⇒ Array<(GrowthScaleDTO, Integer, Hash)>
Get Growth Scale By Id Get Growth Scale By Id
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 222 223 224 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 178 def get_v2_catalog_growth_scales_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.get_v2_catalog_growth_scales ...' 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 CatalogCropGrowthScaleApi.get_v2_catalog_growth_scales" end # resource path local_var_path = '/v2/catalog/growth-scales/{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] || 'GrowthScaleDTO' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.get_v2_catalog_growth_scales", :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: CatalogCropGrowthScaleApi#get_v2_catalog_growth_scales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_g_scale_localized(opts = {}) ⇒ GetV2GScaleLocalized200Response
Get Growth Scales By Localized Crop
229 230 231 232 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 229 def get_v2_g_scale_localized(opts = {}) data, _status_code, _headers = get_v2_g_scale_localized_with_http_info(opts) data end |
#get_v2_g_scale_localized_with_http_info(opts = {}) ⇒ Array<(GetV2GScaleLocalized200Response, Integer, Hash)>
Get Growth Scales By Localized Crop
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 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 237 def get_v2_g_scale_localized_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.get_v2_g_scale_localized ...' end # resource path local_var_path = '/v2/catalog/growth-scales/localized-crop' # 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] || 'GetV2GScaleLocalized200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.get_v2_g_scale_localized", :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: CatalogCropGrowthScaleApi#get_v2_g_scale_localized\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_g_scale_without_org_id(opts = {}) ⇒ PageableGrowthScaleDTO
Get All Growth Scales Without OrgId
286 287 288 289 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 286 def get_v2_g_scale_without_org_id(opts = {}) data, _status_code, _headers = get_v2_g_scale_without_org_id_with_http_info(opts) data end |
#get_v2_g_scale_without_org_id_with_http_info(opts = {}) ⇒ Array<(PageableGrowthScaleDTO, Integer, Hash)>
Get All Growth Scales Without OrgId
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 296 def get_v2_g_scale_without_org_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.get_v2_g_scale_without_org_id ...' end # resource path local_var_path = '/v2/catalog/growth-scales/no-org' # 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? # 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] || 'PageableGrowthScaleDTO' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.get_v2_g_scale_without_org_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: CatalogCropGrowthScaleApi#get_v2_g_scale_without_org_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_localizeds_by_growth_scale(id, opts = {}) ⇒ GetV2LocalizedsByGrowthScale200Response
Get all Localized Crops from a growth scale
346 347 348 349 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 346 def get_v2_localizeds_by_growth_scale(id, opts = {}) data, _status_code, _headers = get_v2_localizeds_by_growth_scale_with_http_info(id, opts) data end |
#get_v2_localizeds_by_growth_scale_with_http_info(id, opts = {}) ⇒ Array<(GetV2LocalizedsByGrowthScale200Response, Integer, Hash)>
Get all Localized Crops from a growth scale
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 355 def get_v2_localizeds_by_growth_scale_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.get_v2_localizeds_by_growth_scale ...' 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 CatalogCropGrowthScaleApi.get_v2_localizeds_by_growth_scale" end # resource path local_var_path = '/v2/catalog/growth-scales/{id}/localized-crops'.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] || 'GetV2LocalizedsByGrowthScale200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.get_v2_localizeds_by_growth_scale", :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: CatalogCropGrowthScaleApi#get_v2_localizeds_by_growth_scale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_catalog_growth_scale_allocation(opts = {}) ⇒ AllocationGrowthScaleResponse
Create Growth Scale Allocation Create Growth Scale Allocation
408 409 410 411 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 408 def post_v2_catalog_growth_scale_allocation(opts = {}) data, _status_code, _headers = post_v2_catalog_growth_scale_allocation_with_http_info(opts) data end |
#post_v2_catalog_growth_scale_allocation_with_http_info(opts = {}) ⇒ Array<(AllocationGrowthScaleResponse, Integer, Hash)>
Create Growth Scale Allocation Create Growth Scale Allocation
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 418 def post_v2_catalog_growth_scale_allocation_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.post_v2_catalog_growth_scale_allocation ...' end # resource path local_var_path = '/v2/catalog/growth-scales/allocation' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'AllocationGrowthScaleResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.post_v2_catalog_growth_scale_allocation", :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: CatalogCropGrowthScaleApi#post_v2_catalog_growth_scale_allocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_catalog_growth_scales(opts = {}) ⇒ CreateGrowthScaleResponse
Create a Growth Scale Create a Growth Scale
472 473 474 475 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 472 def post_v2_catalog_growth_scales(opts = {}) data, _status_code, _headers = post_v2_catalog_growth_scales_with_http_info(opts) data end |
#post_v2_catalog_growth_scales_with_http_info(opts = {}) ⇒ Array<(CreateGrowthScaleResponse, Integer, Hash)>
Create a Growth Scale Create a Growth Scale
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 482 def post_v2_catalog_growth_scales_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.post_v2_catalog_growth_scales ...' end # resource path local_var_path = '/v2/catalog/growth-scales' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'CreateGrowthScaleResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.post_v2_catalog_growth_scales", :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: CatalogCropGrowthScaleApi#post_v2_catalog_growth_scales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_growth_scale_with_localized_associate(id, opts = {}) ⇒ LocalizedCropandGrowthScaleAssociationResponse
Associate a growth scale with localized crops
536 537 538 539 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 536 def post_v2_growth_scale_with_localized_associate(id, opts = {}) data, _status_code, _headers = post_v2_growth_scale_with_localized_associate_with_http_info(id, opts) data end |
#post_v2_growth_scale_with_localized_associate_with_http_info(id, opts = {}) ⇒ Array<(LocalizedCropandGrowthScaleAssociationResponse, Integer, Hash)>
Associate a growth scale with localized crops
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 546 def post_v2_growth_scale_with_localized_associate_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.post_v2_growth_scale_with_localized_associate ...' 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 CatalogCropGrowthScaleApi.post_v2_growth_scale_with_localized_associate" end # resource path local_var_path = '/v2/catalog/growth-scales/{id}/localized-crops'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'LocalizedCropandGrowthScaleAssociationResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.post_v2_growth_scale_with_localized_associate", :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: CatalogCropGrowthScaleApi#post_v2_growth_scale_with_localized_associate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_v2_catalog_growth_scales_id(id, opts = {}) ⇒ GrowthScaleDTO
Update Growth Scale By Id Update Growth Scale By Id
605 606 607 608 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 605 def put_v2_catalog_growth_scales_id(id, opts = {}) data, _status_code, _headers = put_v2_catalog_growth_scales_id_with_http_info(id, opts) data end |
#put_v2_catalog_growth_scales_id_with_http_info(id, opts = {}) ⇒ Array<(GrowthScaleDTO, Integer, Hash)>
Update Growth Scale By Id Update Growth Scale By Id
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/cropwise-platform-sdk/api/catalog_crop_growth_scale_api.rb', line 616 def put_v2_catalog_growth_scales_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogCropGrowthScaleApi.put_v2_catalog_growth_scales_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 CatalogCropGrowthScaleApi.put_v2_catalog_growth_scales_id" end # resource path local_var_path = '/v2/catalog/growth-scales/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'GrowthScaleDTO' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CatalogCropGrowthScaleApi.put_v2_catalog_growth_scales_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: CatalogCropGrowthScaleApi#put_v2_catalog_growth_scales_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |