Class: CropwisePlatformSdk::OrganizationApi
- Inherits:
-
Object
- Object
- CropwisePlatformSdk::OrganizationApi
- Defined in:
- lib/cropwise-platform-sdk/api/organization_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_org(opts = {}) ⇒ Organization
Organization Creator Create an Organization.
-
#create_org_with_http_info(opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Organization Creator Create an Organization.
-
#delete_org_by_id(org_id, opts = {}) ⇒ nil
Delete the specified Organization.
-
#delete_org_by_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete the specified Organization.
-
#delete_org_picture_by_org_id(org_id, opts = {}) ⇒ nil
Remove Organization Photo Removes the ‘Organization` main photo.
-
#delete_org_picture_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove Organization Photo Removes the `Organization` main photo.
-
#delete_worker_by_id(id, org_id, opts = {}) ⇒ nil
Delete the specified Worker.
-
#delete_worker_by_id_with_http_info(id, org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete the specified Worker.
-
#get_accounts_by_orgs_id(opts = {}) ⇒ PagedAccount
Get Orgs’ Accounts by Orgs’ Ids Get Accounts by its org’s Ids.
-
#get_accounts_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedAccount, Integer, Hash)>
Get Orgs' Accounts by Orgs' Ids Get Accounts by its org's Ids.
-
#get_allowed_orgs(opts = {}) ⇒ PagedOrg
List allowed Organizations Gets all Organizations that are allowed to the authenticated Account.
-
#get_allowed_orgs_extended_search(include_extended, opts = {}) ⇒ PagedOrg
List allowed Organizations with filtered extra_attribute Gets all Organizations that are allowed to the authenticated Account.
-
#get_allowed_orgs_extended_search_with_http_info(include_extended, opts = {}) ⇒ Array<(PagedOrg, Integer, Hash)>
List allowed Organizations with filtered extra_attribute Gets all Organizations that are allowed to the authenticated Account.
-
#get_allowed_orgs_with_http_info(opts = {}) ⇒ Array<(PagedOrg, Integer, Hash)>
List allowed Organizations Gets all Organizations that are allowed to the authenticated Account.
-
#get_equipments(org_id, opts = {}) ⇒ PagedEquipment
List Organization equipments List Organization Equipments.
-
#get_equipments_with_extended_attribute(org_id, include_extended, opts = {}) ⇒ PagedEquipment
List Organization equipments with filtered extra_attribute List Organization Equipments with ExtendedAttribute.
-
#get_equipments_with_extended_attribute_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedEquipment, Integer, Hash)>
List Organization equipments with filtered extra_attribute List Organization Equipments with ExtendedAttribute.
-
#get_equipments_with_http_info(org_id, opts = {}) ⇒ Array<(PagedEquipment, Integer, Hash)>
List Organization equipments List Organization Equipments.
-
#get_invite_status_by_org(org_id, opts = {}) ⇒ PagedInviteStatus
List Invitation Statuses for an Organization Gets all invites status of an ‘Organization`.
-
#get_invite_status_by_org_with_http_info(org_id, opts = {}) ⇒ Array<(PagedInviteStatus, Integer, Hash)>
List Invitation Statuses for an Organization Gets all invites status of an `Organization`.
-
#get_invites_by_orgs_id(opts = {}) ⇒ PagedInviteStatus
Get Orgs’ Invites by Orgs’ Ids and its status Get Invites by its org’s Ids.
-
#get_invites_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedInviteStatus, Integer, Hash)>
Get Orgs' Invites by Orgs' Ids and its status Get Invites by its org's Ids.
-
#get_org_accounts_by_org_id(org_id, opts = {}) ⇒ PagedAccount
Get Org Accounts.
-
#get_org_accounts_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(PagedAccount, Integer, Hash)>
Get Org Accounts.
-
#get_org_by_id(org_id, opts = {}) ⇒ Organization
Organization Details Gets the specified Organization details.
-
#get_org_by_id_with_http_info(org_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Organization Details Gets the specified Organization details.
-
#get_org_cycles(org_id, opts = {}) ⇒ PagedCycleDTO
List Organization’s Cycles Gets all cycles of an ‘Organization`.
-
#get_org_cycles_with_http_info(org_id, opts = {}) ⇒ Array<(PagedCycleDTO, Integer, Hash)>
List Organization's Cycles Gets all cycles of an `Organization`.
-
#get_org_picture_by_org_id(org_id, opts = {}) ⇒ nil
Get Organization Photo Requests the ‘Organization` main photo.
-
#get_org_picture_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get Organization Photo Requests the `Organization` main photo.
-
#get_orgs_by_orgs_id(opts = {}) ⇒ PagedOrg
Get Orgs by Ids Get Orgs by its Ids.
-
#get_orgs_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedOrg, Integer, Hash)>
Get Orgs by Ids Get Orgs by its Ids.
-
#get_products_by_org_id(org_id, opts = {}) ⇒ PagedProduct
List Organization Products List Organization Products.
-
#get_products_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(PagedProduct, Integer, Hash)>
List Organization Products List Organization Products.
-
#get_properties_by_org(org_id, opts = {}) ⇒ PagedProperty
List Organization properties Gets all properties of an ‘Organization` and optionally the total area of each property.
-
#get_properties_by_org_extended_search(org_id, include_extended, opts = {}) ⇒ PagedProperty
List Organization properties with filtered extra_attribute Gets all properties of an ‘Organization` and optionally the total area of each property.
-
#get_properties_by_org_extended_search_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedProperty, Integer, Hash)>
List Organization properties with filtered extra_attribute Gets all properties of an `Organization` and optionally the total area of each property.
-
#get_properties_by_org_with_http_info(org_id, opts = {}) ⇒ Array<(PagedProperty, Integer, Hash)>
List Organization properties Gets all properties of an `Organization` and optionally the total area of each property.
-
#get_properties_by_orgs_id(opts = {}) ⇒ PagedProperty
Get Orgs’ Properties by Orgs’ Ids Get Properties by its org’s Ids.
-
#get_properties_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedProperty, Integer, Hash)>
Get Orgs' Properties by Orgs' Ids Get Properties by its org's Ids.
-
#get_root_owners_workspace_id(opts = {}) ⇒ PagedAccount
Get Root owners from the orgs that the workspace id is linked Get Root owners from the orgs that the workspace id is linked.
-
#get_root_owners_workspace_id_with_http_info(opts = {}) ⇒ Array<(PagedAccount, Integer, Hash)>
Get Root owners from the orgs that the workspace id is linked Get Root owners from the orgs that the workspace id is linked.
-
#get_seasons_by_org(org_id, opts = {}) ⇒ PagedSeason
List Organization seasons Gets all seasons of an ‘Organization`.
-
#get_seasons_by_org_with_extended_attribute(org_id, opts = {}) ⇒ PagedSeason
List Organization seasons with filtered extra_attribute Gets all seasons of an ‘Organization with ExtendedAttribute`.
-
#get_seasons_by_org_with_extended_attribute_with_http_info(org_id, opts = {}) ⇒ Array<(PagedSeason, Integer, Hash)>
List Organization seasons with filtered extra_attribute Gets all seasons of an `Organization with ExtendedAttribute`.
-
#get_seasons_by_org_with_http_info(org_id, opts = {}) ⇒ Array<(PagedSeason, Integer, Hash)>
List Organization seasons Gets all seasons of an `Organization`.
-
#get_seasons_by_orgs_id(opts = {}) ⇒ PagedSeason
Get Orgs’ Seasons by Orgs’ Ids Get Seasons by its org’s Ids.
-
#get_seasons_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedSeason, Integer, Hash)>
Get Orgs' Seasons by Orgs' Ids Get Seasons by its org's Ids.
-
#get_tasks_by_organization(org_id, opts = {}) ⇒ PagedTask
Get Task By Organization Get the tasks of a specified organization.
-
#get_tasks_by_organization_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get Task By Organization Get the tasks of a specified organization.
-
#get_tasks_extended_search(org_id, include_extended, opts = {}) ⇒ PagedTask
List Organization Tasks with filtered extra_attribute List Organization Tasks.
-
#get_tasks_extended_search_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
List Organization Tasks with filtered extra_attribute List Organization Tasks.
-
#get_v2_orgs_org_id_apps(org_id, parent_region_id, opts = {}) ⇒ PagedDeveloperApp
Installed apps for Org Get All Apps.
-
#get_v2_orgs_org_id_apps_with_http_info(org_id, parent_region_id, opts = {}) ⇒ Array<(PagedDeveloperApp, Integer, Hash)>
Installed apps for Org Get All Apps.
-
#get_worker(id, org_id, opts = {}) ⇒ WorkerResponse
Get worker Get Worker.
-
#get_worker_with_http_info(id, org_id, opts = {}) ⇒ Array<(WorkerResponse, Integer, Hash)>
Get worker Get Worker.
-
#get_workers(org_id, opts = {}) ⇒ PagedWorker
List Organization Workers List Organization Workers.
-
#get_workers_by_org_id_and_properties_ids(org_id, opts = {}) ⇒ PagedWorker
List Organization Workers by Property Id and Name List Worker in a Organization by properties ids.
-
#get_workers_by_org_id_and_properties_ids_with_http_info(org_id, opts = {}) ⇒ Array<(PagedWorker, Integer, Hash)>
List Organization Workers by Property Id and Name List Worker in a Organization by properties ids.
-
#get_workers_extended_search(org_id, include_extended, opts = {}) ⇒ PagedWorker
List Organization Workers with filtered extra_attribute List Organization Workers.
-
#get_workers_extended_search_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedWorker, Integer, Hash)>
List Organization Workers with filtered extra_attribute List Organization Workers.
-
#get_workers_with_http_info(org_id, opts = {}) ⇒ Array<(PagedWorker, Integer, Hash)>
List Organization Workers List Organization Workers.
-
#initialize(api_client = ApiClient.default) ⇒ OrganizationApi
constructor
A new instance of OrganizationApi.
-
#post_org_picture(org_id, opts = {}) ⇒ PostAccountPhoto200Response
Upload Organization Photo Uploads Organization main photo.
-
#post_org_picture_with_http_info(org_id, opts = {}) ⇒ Array<(PostAccountPhoto200Response, Integer, Hash)>
Upload Organization Photo Uploads Organization main photo.
-
#post_worker(org_id, opts = {}) ⇒ WorkerResponse
Create worker Create Worker.
-
#post_worker_with_http_info(org_id, opts = {}) ⇒ Array<(WorkerResponse, Integer, Hash)>
Create worker Create Worker.
-
#update_org_by_id(org_id, opts = {}) ⇒ Organization
Organization Updater Edits an existing ‘Organization` with the specified id.
-
#update_org_by_id_with_http_info(org_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Organization Updater Edits an existing `Organization` with the specified id.
-
#update_worker(id, org_id, opts = {}) ⇒ WorkerResponse
Update worker Update Worker.
-
#update_worker_with_http_info(id, org_id, opts = {}) ⇒ Array<(WorkerResponse, Integer, Hash)>
Update worker Update Worker.
-
#v2_orgs_org_id_tasks_get(org_id, opts = {}) ⇒ PagedTask
Get task by organization.
-
#v2_orgs_org_id_tasks_get_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get task by organization.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ OrganizationApi
Returns a new instance of OrganizationApi.
19 20 21 |
# File 'lib/cropwise-platform-sdk/api/organization_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/organization_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_org(opts = {}) ⇒ Organization
Organization Creator Create an Organization
28 29 30 31 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 28 def create_org(opts = {}) data, _status_code, _headers = create_org_with_http_info(opts) data end |
#create_org_with_http_info(opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Organization Creator Create an Organization
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/organization_api.rb', line 39 def create_org_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.create_org ...' end # resource path local_var_path = '/v2/orgs' # 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_organization']) # return_type return_type = opts[:debug_return_type] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.create_org", :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: OrganizationApi#create_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_org_by_id(org_id, opts = {}) ⇒ nil
Delete the specified Organization.
94 95 96 97 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 94 def delete_org_by_id(org_id, opts = {}) delete_org_by_id_with_http_info(org_id, opts) nil end |
#delete_org_by_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete the specified Organization.
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/organization_api.rb', line 104 def delete_org_by_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.delete_org_by_id ...' 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 OrganizationApi.delete_org_by_id" end # resource path local_var_path = '/v2/orgs/{org_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_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 => :"OrganizationApi.delete_org_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: OrganizationApi#delete_org_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_org_picture_by_org_id(org_id, opts = {}) ⇒ nil
Remove Organization Photo Removes the ‘Organization` main photo.
155 156 157 158 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 155 def delete_org_picture_by_org_id(org_id, opts = {}) delete_org_picture_by_org_id_with_http_info(org_id, opts) nil end |
#delete_org_picture_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove Organization Photo Removes the `Organization` main photo.
165 166 167 168 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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 165 def delete_org_picture_by_org_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.delete_org_picture_by_org_id ...' 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 OrganizationApi.delete_org_picture_by_org_id" end # resource path local_var_path = '/v2/orgs/{org_id}/picture'.sub('{' + 'org_id' + '}', CGI.escape(org_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 => :"OrganizationApi.delete_org_picture_by_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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationApi#delete_org_picture_by_org_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_worker_by_id(id, org_id, opts = {}) ⇒ nil
Delete the specified Worker.
217 218 219 220 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 217 def delete_worker_by_id(id, org_id, opts = {}) delete_worker_by_id_with_http_info(id, org_id, opts) nil end |
#delete_worker_by_id_with_http_info(id, org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete the specified Worker.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 228 def delete_worker_by_id_with_http_info(id, org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.delete_worker_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 OrganizationApi.delete_worker_by_id" 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 OrganizationApi.delete_worker_by_id" end # resource path local_var_path = '/v2/orgs/{orgId}/workers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'orgId' + '}', CGI.escape(org_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 => :"OrganizationApi.delete_worker_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: OrganizationApi#delete_worker_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_accounts_by_orgs_id(opts = {}) ⇒ PagedAccount
Get Orgs’ Accounts by Orgs’ Ids Get Accounts by its org’s Ids. If an id does not exist, it does not return it.
287 288 289 290 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 287 def get_accounts_by_orgs_id(opts = {}) data, _status_code, _headers = get_accounts_by_orgs_id_with_http_info(opts) data end |
#get_accounts_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedAccount, Integer, Hash)>
Get Orgs' Accounts by Orgs' Ids Get Accounts by its org's Ids. If an id does not exist, it does not return it.
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 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 301 def get_accounts_by_orgs_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_accounts_by_orgs_id ...' end # resource path local_var_path = '/v2/orgs/ids/accounts' # query parameters query_params = opts[:query_params] || {} query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? query_params[:'exclude_attributes'] = opts[:'exclude_attributes'] if !opts[:'exclude_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] || 'PagedAccount' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_accounts_by_orgs_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: OrganizationApi#get_accounts_by_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_allowed_orgs(opts = {}) ⇒ PagedOrg
List allowed Organizations Gets all Organizations that are allowed to the authenticated Account.
364 365 366 367 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 364 def get_allowed_orgs(opts = {}) data, _status_code, _headers = get_allowed_orgs_with_http_info(opts) data end |
#get_allowed_orgs_extended_search(include_extended, opts = {}) ⇒ PagedOrg
List allowed Organizations with filtered extra_attribute Gets all Organizations that are allowed to the authenticated Account.
445 446 447 448 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 445 def get_allowed_orgs_extended_search(include_extended, opts = {}) data, _status_code, _headers = get_allowed_orgs_extended_search_with_http_info(include_extended, opts) data end |
#get_allowed_orgs_extended_search_with_http_info(include_extended, opts = {}) ⇒ Array<(PagedOrg, Integer, Hash)>
List allowed Organizations with filtered extra_attribute Gets all Organizations that are allowed to the authenticated Account.
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 462 def get_allowed_orgs_extended_search_with_http_info(include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_allowed_orgs_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 OrganizationApi.get_allowed_orgs_extended_search" end # resource path local_var_path = '/v2/orgs/extended-search' # query parameters query_params = opts[:query_params] || {} query_params[:'include_extended'] = include_extended query_params[:'workspaces'] = @api_client.build_collection_param(opts[:'workspaces'], :multi) if !opts[:'workspaces'].nil? query_params[:'licensing_accounts'] = @api_client.build_collection_param(opts[:'licensing_accounts'], :multi) if !opts[:'licensing_accounts'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].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] || 'PagedOrg' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_allowed_orgs_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: OrganizationApi#get_allowed_orgs_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_allowed_orgs_with_http_info(opts = {}) ⇒ Array<(PagedOrg, Integer, Hash)>
List allowed Organizations Gets all Organizations that are allowed to the authenticated Account.
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 423 424 425 426 427 428 429 430 431 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 379 def get_allowed_orgs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_allowed_orgs ...' end allowable_values = [] 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/orgs' # query parameters query_params = opts[:query_params] || {} query_params[:'licensing_accounts'] = @api_client.build_collection_param(opts[:'licensing_accounts'], :multi) if !opts[:'licensing_accounts'].nil? query_params[:'workspaces'] = @api_client.build_collection_param(opts[:'workspaces'], :multi) if !opts[:'workspaces'].nil? query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if !opts[:'attributes'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedOrg' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_allowed_orgs", :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: OrganizationApi#get_allowed_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_equipments(org_id, opts = {}) ⇒ PagedEquipment
List Organization equipments List Organization Equipments
528 529 530 531 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 528 def get_equipments(org_id, opts = {}) data, _status_code, _headers = get_equipments_with_http_info(org_id, opts) data end |
#get_equipments_with_extended_attribute(org_id, include_extended, opts = {}) ⇒ PagedEquipment
List Organization equipments with filtered extra_attribute List Organization Equipments with ExtendedAttribute
609 610 611 612 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 609 def get_equipments_with_extended_attribute(org_id, include_extended, opts = {}) data, _status_code, _headers = get_equipments_with_extended_attribute_with_http_info(org_id, include_extended, opts) data end |
#get_equipments_with_extended_attribute_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedEquipment, Integer, Hash)>
List Organization equipments with filtered extra_attribute List Organization Equipments with ExtendedAttribute
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 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 627 def get_equipments_with_extended_attribute_with_http_info(org_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_equipments_with_extended_attribute ...' 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 OrganizationApi.get_equipments_with_extended_attribute" 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 OrganizationApi.get_equipments_with_extended_attribute" end # resource path local_var_path = '/v2/orgs/{org_id}/equipments/extended-search'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].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[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? 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] || 'PagedEquipment' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_equipments_with_extended_attribute", :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: OrganizationApi#get_equipments_with_extended_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_equipments_with_http_info(org_id, opts = {}) ⇒ Array<(PagedEquipment, Integer, Hash)>
List Organization equipments List Organization Equipments
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 543 def get_equipments_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_equipments ...' 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 OrganizationApi.get_equipments" end # resource path local_var_path = '/v2/orgs/{org_id}/equipments'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].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[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedEquipment' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_equipments", :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: OrganizationApi#get_equipments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_invite_status_by_org(org_id, opts = {}) ⇒ PagedInviteStatus
List Invitation Statuses for an Organization Gets all invites status of an ‘Organization`.
695 696 697 698 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 695 def get_invite_status_by_org(org_id, opts = {}) data, _status_code, _headers = get_invite_status_by_org_with_http_info(org_id, opts) data end |
#get_invite_status_by_org_with_http_info(org_id, opts = {}) ⇒ Array<(PagedInviteStatus, Integer, Hash)>
List Invitation Statuses for an Organization Gets all invites status of an `Organization`.
708 709 710 711 712 713 714 715 716 717 718 719 720 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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 708 def get_invite_status_by_org_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_invite_status_by_org ...' 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 OrganizationApi.get_invite_status_by_org" end # resource path local_var_path = '/v2/orgs/{org_id}/invite-status'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'status_list'] = opts[:'status_list'] if !opts[:'status_list'].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] || 'PagedInviteStatus' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_invite_status_by_org", :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: OrganizationApi#get_invite_status_by_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_invites_by_orgs_id(opts = {}) ⇒ PagedInviteStatus
Get Orgs’ Invites by Orgs’ Ids and its status Get Invites by its org’s Ids. If an id does not exist, it does not return it.
767 768 769 770 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 767 def get_invites_by_orgs_id(opts = {}) data, _status_code, _headers = get_invites_by_orgs_id_with_http_info(opts) data end |
#get_invites_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedInviteStatus, Integer, Hash)>
Get Orgs' Invites by Orgs' Ids and its status Get Invites by its org's Ids. If an id does not exist, it does not return it.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 780 def get_invites_by_orgs_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_invites_by_orgs_id ...' end # resource path local_var_path = '/v2/orgs/ids/invite-status' # query parameters query_params = opts[:query_params] || {} query_params[:'status_list'] = opts[:'status_list'] if !opts[:'status_list'].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] || 'PagedInviteStatus' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_invites_by_orgs_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: OrganizationApi#get_invites_by_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_org_accounts_by_org_id(org_id, opts = {}) ⇒ PagedAccount
Get Org Accounts
840 841 842 843 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 840 def get_org_accounts_by_org_id(org_id, opts = {}) data, _status_code, _headers = get_org_accounts_by_org_id_with_http_info(org_id, opts) data end |
#get_org_accounts_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(PagedAccount, Integer, Hash)>
Get Org Accounts
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 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 853 def get_org_accounts_by_org_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_org_accounts_by_org_id ...' 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 OrganizationApi.get_org_accounts_by_org_id" end # resource path local_var_path = '/v2/orgs/{org_id}/accounts/'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'exclude_attributes'] = opts[:'exclude_attributes'] if !opts[:'exclude_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedAccount' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_org_accounts_by_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: OrganizationApi#get_org_accounts_by_org_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_org_by_id(org_id, opts = {}) ⇒ Organization
Organization Details Gets the specified Organization details.
909 910 911 912 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 909 def get_org_by_id(org_id, opts = {}) data, _status_code, _headers = get_org_by_id_with_http_info(org_id, opts) data end |
#get_org_by_id_with_http_info(org_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Organization Details Gets the specified Organization details.
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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 919 def get_org_by_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_org_by_id ...' 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 OrganizationApi.get_org_by_id" end # resource path local_var_path = '/v2/orgs/{org_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_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] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_org_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: OrganizationApi#get_org_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_org_cycles(org_id, opts = {}) ⇒ PagedCycleDTO
List Organization’s Cycles Gets all cycles of an ‘Organization`
974 975 976 977 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 974 def get_org_cycles(org_id, opts = {}) data, _status_code, _headers = get_org_cycles_with_http_info(org_id, opts) data end |
#get_org_cycles_with_http_info(org_id, opts = {}) ⇒ Array<(PagedCycleDTO, Integer, Hash)>
List Organization's Cycles Gets all cycles of an `Organization`
986 987 988 989 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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 986 def get_org_cycles_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_org_cycles ...' 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 OrganizationApi.get_org_cycles" end # resource path local_var_path = '/v2/orgs/{orgId}/cycles'.sub('{' + 'orgId' + '}', CGI.escape(org_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? # 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] || 'PagedCycleDTO' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_org_cycles", :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: OrganizationApi#get_org_cycles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_org_picture_by_org_id(org_id, opts = {}) ⇒ nil
Get Organization Photo Requests the ‘Organization` main photo.
1041 1042 1043 1044 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1041 def get_org_picture_by_org_id(org_id, opts = {}) get_org_picture_by_org_id_with_http_info(org_id, opts) nil end |
#get_org_picture_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get Organization Photo Requests the `Organization` main photo.
1051 1052 1053 1054 1055 1056 1057 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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1051 def get_org_picture_by_org_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_org_picture_by_org_id ...' 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 OrganizationApi.get_org_picture_by_org_id" end # resource path local_var_path = '/v2/orgs/{org_id}/picture'.sub('{' + 'org_id' + '}', CGI.escape(org_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 => :"OrganizationApi.get_org_picture_by_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: OrganizationApi#get_org_picture_by_org_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orgs_by_orgs_id(opts = {}) ⇒ PagedOrg
Get Orgs by Ids Get Orgs by its Ids. If an id does not exist, it does not return it.
1105 1106 1107 1108 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1105 def get_orgs_by_orgs_id(opts = {}) data, _status_code, _headers = get_orgs_by_orgs_id_with_http_info(opts) data end |
#get_orgs_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedOrg, Integer, Hash)>
Get Orgs by Ids Get Orgs by its Ids. If an id does not exist, it does not return it.
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1118 def get_orgs_by_orgs_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_orgs_by_orgs_id ...' end # resource path local_var_path = '/v2/orgs/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? # 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] || 'PagedOrg' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_orgs_by_orgs_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: OrganizationApi#get_orgs_by_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_products_by_org_id(org_id, opts = {}) ⇒ PagedProduct
List Organization Products List Organization Products
1181 1182 1183 1184 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1181 def get_products_by_org_id(org_id, opts = {}) data, _status_code, _headers = get_products_by_org_id_with_http_info(org_id, opts) data end |
#get_products_by_org_id_with_http_info(org_id, opts = {}) ⇒ Array<(PagedProduct, Integer, Hash)>
List Organization Products List Organization Products
1197 1198 1199 1200 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 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1197 def get_products_by_org_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_products_by_org_id ...' 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 OrganizationApi.get_products_by_org_id" end # resource path local_var_path = '/v2/orgs/{org_id}/products'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? query_params[:'show_canonicals'] = opts[:'show_canonicals'] if !opts[:'show_canonicals'].nil? query_params[:'location'] = opts[:'location'] if !opts[:'location'].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[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedProduct' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_products_by_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: OrganizationApi#get_products_by_org_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_properties_by_org(org_id, opts = {}) ⇒ PagedProperty
List Organization properties Gets all properties of an ‘Organization` and optionally the total area of each property.
1259 1260 1261 1262 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1259 def get_properties_by_org(org_id, opts = {}) data, _status_code, _headers = get_properties_by_org_with_http_info(org_id, opts) data end |
#get_properties_by_org_extended_search(org_id, include_extended, opts = {}) ⇒ PagedProperty
List Organization properties with filtered extra_attribute Gets all properties of an ‘Organization` and optionally the total area of each property.
1338 1339 1340 1341 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1338 def get_properties_by_org_extended_search(org_id, include_extended, opts = {}) data, _status_code, _headers = get_properties_by_org_extended_search_with_http_info(org_id, include_extended, opts) data end |
#get_properties_by_org_extended_search_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedProperty, Integer, Hash)>
List Organization properties with filtered extra_attribute Gets all properties of an `Organization` and optionally the total area of each property.
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 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1354 def get_properties_by_org_extended_search_with_http_info(org_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_properties_by_org_extended_search ...' 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 OrganizationApi.get_properties_by_org_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 OrganizationApi.get_properties_by_org_extended_search" end allowable_values = ["total_area"] 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/orgs/{org_id}/properties/extended-search'.sub('{' + 'org_id' + '}', CGI.escape(org_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] || 'PagedProperty' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_properties_by_org_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: OrganizationApi#get_properties_by_org_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_properties_by_org_with_http_info(org_id, opts = {}) ⇒ Array<(PagedProperty, Integer, Hash)>
List Organization properties Gets all properties of an `Organization` and optionally the total area of each property.
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 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1272 def get_properties_by_org_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_properties_by_org ...' 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 OrganizationApi.get_properties_by_org" end allowable_values = ["total_area"] 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/orgs/{org_id}/properties'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedProperty' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_properties_by_org", :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: OrganizationApi#get_properties_by_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_properties_by_orgs_id(opts = {}) ⇒ PagedProperty
Get Orgs’ Properties by Orgs’ Ids Get Properties by its org’s Ids. If an id does not exist, it does not return it.
1424 1425 1426 1427 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1424 def get_properties_by_orgs_id(opts = {}) data, _status_code, _headers = get_properties_by_orgs_id_with_http_info(opts) data end |
#get_properties_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedProperty, Integer, Hash)>
Get Orgs' Properties by Orgs' Ids Get Properties by its org's Ids. If an id does not exist, it does not return it.
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 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1437 def get_properties_by_orgs_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_properties_by_orgs_id ...' end # resource path local_var_path = '/v2/orgs/ids/properties' # 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[:'uuid_list_model']) # return_type return_type = opts[:debug_return_type] || 'PagedProperty' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_properties_by_orgs_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: OrganizationApi#get_properties_by_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_root_owners_workspace_id(opts = {}) ⇒ PagedAccount
Get Root owners from the orgs that the workspace id is linked Get Root owners from the orgs that the workspace id is linked. If an id does not exist, it does not return it.
1497 1498 1499 1500 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1497 def get_root_owners_workspace_id(opts = {}) data, _status_code, _headers = get_root_owners_workspace_id_with_http_info(opts) data end |
#get_root_owners_workspace_id_with_http_info(opts = {}) ⇒ Array<(PagedAccount, Integer, Hash)>
Get Root owners from the orgs that the workspace id is linked Get Root owners from the orgs that the workspace id is linked. If an id does not exist, it does not return it.
1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1510 def get_root_owners_workspace_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_root_owners_workspace_id ...' end # resource path local_var_path = '/v2/workspaces/ids/root-owners' # 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[:'uuid_list_model']) # return_type return_type = opts[:debug_return_type] || 'PagedAccount' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_root_owners_workspace_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: OrganizationApi#get_root_owners_workspace_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_seasons_by_org(org_id, opts = {}) ⇒ PagedSeason
List Organization seasons Gets all seasons of an ‘Organization`
1571 1572 1573 1574 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1571 def get_seasons_by_org(org_id, opts = {}) data, _status_code, _headers = get_seasons_by_org_with_http_info(org_id, opts) data end |
#get_seasons_by_org_with_extended_attribute(org_id, opts = {}) ⇒ PagedSeason
List Organization seasons with filtered extra_attribute Gets all seasons of an ‘Organization with ExtendedAttribute`
1647 1648 1649 1650 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1647 def get_seasons_by_org_with_extended_attribute(org_id, opts = {}) data, _status_code, _headers = get_seasons_by_org_with_extended_attribute_with_http_info(org_id, opts) data end |
#get_seasons_by_org_with_extended_attribute_with_http_info(org_id, opts = {}) ⇒ Array<(PagedSeason, Integer, Hash)>
List Organization seasons with filtered extra_attribute Gets all seasons of an `Organization with ExtendedAttribute`
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1662 def get_seasons_by_org_with_extended_attribute_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_seasons_by_org_with_extended_attribute ...' 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 OrganizationApi.get_seasons_by_org_with_extended_attribute" end # resource path local_var_path = '/v2/orgs/{org_id}/seasons/extended-search'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'include_extended'] = opts[:'include_extended'] if !opts[:'include_extended'].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] || 'PagedSeason' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_seasons_by_org_with_extended_attribute", :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: OrganizationApi#get_seasons_by_org_with_extended_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_seasons_by_org_with_http_info(org_id, opts = {}) ⇒ Array<(PagedSeason, Integer, Hash)>
List Organization seasons Gets all seasons of an `Organization`
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1585 def get_seasons_by_org_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_seasons_by_org ...' 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 OrganizationApi.get_seasons_by_org" end # resource path local_var_path = '/v2/orgs/{org_id}/seasons'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'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] || 'PagedSeason' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_seasons_by_org", :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: OrganizationApi#get_seasons_by_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_seasons_by_orgs_id(opts = {}) ⇒ PagedSeason
Get Orgs’ Seasons by Orgs’ Ids Get Seasons by its org’s Ids. If an id does not exist, it does not return it.
1723 1724 1725 1726 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1723 def get_seasons_by_orgs_id(opts = {}) data, _status_code, _headers = get_seasons_by_orgs_id_with_http_info(opts) data end |
#get_seasons_by_orgs_id_with_http_info(opts = {}) ⇒ Array<(PagedSeason, Integer, Hash)>
Get Orgs' Seasons by Orgs' Ids Get Seasons by its org's Ids. If an id does not exist, it does not return it.
1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1736 def get_seasons_by_orgs_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_seasons_by_orgs_id ...' end # resource path local_var_path = '/v2/orgs/ids/seasons' # 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[:'uuid_list_model']) # return_type return_type = opts[:debug_return_type] || 'PagedSeason' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_seasons_by_orgs_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: OrganizationApi#get_seasons_by_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tasks_by_organization(org_id, opts = {}) ⇒ PagedTask
Get Task By Organization Get the tasks of a specified organization
1796 1797 1798 1799 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1796 def get_tasks_by_organization(org_id, opts = {}) data, _status_code, _headers = get_tasks_by_organization_with_http_info(org_id, opts) data end |
#get_tasks_by_organization_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get Task By Organization Get the tasks of a specified organization
1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1809 def get_tasks_by_organization_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_tasks_by_organization ...' 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 OrganizationApi.get_tasks_by_organization" end # resource path local_var_path = '/v2/orgs/{org_id}/tasks'.sub('{' + 'org_id' + '}', CGI.escape(org_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? # 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[:'task_filters']) # return_type return_type = opts[:debug_return_type] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_tasks_by_organization", :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: OrganizationApi#get_tasks_by_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tasks_extended_search(org_id, include_extended, opts = {}) ⇒ PagedTask
List Organization Tasks with filtered extra_attribute List Organization Tasks
1878 1879 1880 1881 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1878 def get_tasks_extended_search(org_id, include_extended, opts = {}) data, _status_code, _headers = get_tasks_extended_search_with_http_info(org_id, include_extended, opts) data end |
#get_tasks_extended_search_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
List Organization Tasks with filtered extra_attribute List Organization Tasks
1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1897 def get_tasks_extended_search_with_http_info(org_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_tasks_extended_search ...' 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 OrganizationApi.get_tasks_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 OrganizationApi.get_tasks_extended_search" end # resource path local_var_path = '/v2/orgs/{org_id}/tasks/extended-search'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'season_id'] = opts[:'season_id'] if !opts[:'season_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'property_id'] = opts[:'property_id'] if !opts[:'property_id'].nil? query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_tasks_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: OrganizationApi#get_tasks_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_orgs_org_id_apps(org_id, parent_region_id, opts = {}) ⇒ PagedDeveloperApp
Installed apps for Org Get All Apps
1967 1968 1969 1970 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1967 def get_v2_orgs_org_id_apps(org_id, parent_region_id, opts = {}) data, _status_code, _headers = get_v2_orgs_org_id_apps_with_http_info(org_id, parent_region_id, opts) data end |
#get_v2_orgs_org_id_apps_with_http_info(org_id, parent_region_id, opts = {}) ⇒ Array<(PagedDeveloperApp, Integer, Hash)>
Installed apps for Org Get All Apps
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 1981 def get_v2_orgs_org_id_apps_with_http_info(org_id, parent_region_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_v2_orgs_org_id_apps ...' 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 OrganizationApi.get_v2_orgs_org_id_apps" 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 OrganizationApi.get_v2_orgs_org_id_apps" 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/orgs/{org_id}/apps'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)) # 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? # 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] || 'PagedDeveloperApp' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_v2_orgs_org_id_apps", :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: OrganizationApi#get_v2_orgs_org_id_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_worker(id, org_id, opts = {}) ⇒ WorkerResponse
Get worker Get Worker
2047 2048 2049 2050 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2047 def get_worker(id, org_id, opts = {}) data, _status_code, _headers = get_worker_with_http_info(id, org_id, opts) data end |
#get_worker_with_http_info(id, org_id, opts = {}) ⇒ Array<(WorkerResponse, Integer, Hash)>
Get worker Get Worker
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2058 def get_worker_with_http_info(id, org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_worker ...' 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 OrganizationApi.get_worker" 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 OrganizationApi.get_worker" end # resource path local_var_path = '/v2/orgs/{orgId}/workers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'orgId' + '}', CGI.escape(org_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] || 'WorkerResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_worker", :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: OrganizationApi#get_worker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workers(org_id, opts = {}) ⇒ PagedWorker
List Organization Workers List Organization Workers
2119 2120 2121 2122 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2119 def get_workers(org_id, opts = {}) data, _status_code, _headers = get_workers_with_http_info(org_id, opts) data end |
#get_workers_by_org_id_and_properties_ids(org_id, opts = {}) ⇒ PagedWorker
List Organization Workers by Property Id and Name List Worker in a Organization by properties ids. If an empty list is sent, it return all workers from that organization
2192 2193 2194 2195 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2192 def get_workers_by_org_id_and_properties_ids(org_id, opts = {}) data, _status_code, _headers = get_workers_by_org_id_and_properties_ids_with_http_info(org_id, opts) data end |
#get_workers_by_org_id_and_properties_ids_with_http_info(org_id, opts = {}) ⇒ Array<(PagedWorker, Integer, Hash)>
List Organization Workers by Property Id and Name List Worker in a Organization by properties ids. If an empty list is sent, it return all workers from that organization
2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2204 def get_workers_by_org_id_and_properties_ids_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_workers_by_org_id_and_properties_ids ...' 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 OrganizationApi.get_workers_by_org_id_and_properties_ids" end # resource path local_var_path = '/v2/orgs/{org_id}/properties/ids/workers'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'name'] = opts[:'name'] if !opts[:'name'].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] || 'PagedWorker' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_workers_by_org_id_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: OrganizationApi#get_workers_by_org_id_and_properties_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workers_extended_search(org_id, include_extended, opts = {}) ⇒ PagedWorker
List Organization Workers with filtered extra_attribute List Organization Workers
2270 2271 2272 2273 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2270 def get_workers_extended_search(org_id, include_extended, opts = {}) data, _status_code, _headers = get_workers_extended_search_with_http_info(org_id, include_extended, opts) data end |
#get_workers_extended_search_with_http_info(org_id, include_extended, opts = {}) ⇒ Array<(PagedWorker, Integer, Hash)>
List Organization Workers with filtered extra_attribute List Organization Workers
2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2287 def get_workers_extended_search_with_http_info(org_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_workers_extended_search ...' 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 OrganizationApi.get_workers_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 OrganizationApi.get_workers_extended_search" end # resource path local_var_path = '/v2/orgs/{org_id}/workers/extended-search'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'name'] = opts[:'name'] if !opts[:'name'].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[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? 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] || 'PagedWorker' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_workers_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: OrganizationApi#get_workers_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workers_with_http_info(org_id, opts = {}) ⇒ Array<(PagedWorker, Integer, Hash)>
List Organization Workers List Organization Workers
2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2133 def get_workers_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.get_workers ...' 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 OrganizationApi.get_workers" end # resource path local_var_path = '/v2/orgs/{org_id}/workers'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'name'] = opts[:'name'] if !opts[:'name'].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[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedWorker' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.get_workers", :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: OrganizationApi#get_workers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_org_picture(org_id, opts = {}) ⇒ PostAccountPhoto200Response
Upload Organization Photo Uploads Organization main photo.
2352 2353 2354 2355 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2352 def post_org_picture(org_id, opts = {}) data, _status_code, _headers = post_org_picture_with_http_info(org_id, opts) data end |
#post_org_picture_with_http_info(org_id, opts = {}) ⇒ Array<(PostAccountPhoto200Response, Integer, Hash)>
Upload Organization Photo Uploads Organization main photo.
2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2363 def post_org_picture_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.post_org_picture ...' 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 OrganizationApi.post_org_picture" end # resource path local_var_path = '/v2/orgs/{org_id}/picture'.sub('{' + 'org_id' + '}', CGI.escape(org_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(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = opts[:'file'] if !opts[:'file'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PostAccountPhoto200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.post_org_picture", :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: OrganizationApi#post_org_picture\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_worker(org_id, opts = {}) ⇒ WorkerResponse
Create worker Create Worker
2424 2425 2426 2427 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2424 def post_worker(org_id, opts = {}) data, _status_code, _headers = post_worker_with_http_info(org_id, opts) data end |
#post_worker_with_http_info(org_id, opts = {}) ⇒ Array<(WorkerResponse, Integer, Hash)>
Create worker Create Worker
2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2436 def post_worker_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.post_worker ...' 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 OrganizationApi.post_worker" end # resource path local_var_path = '/v2/orgs/{orgId}/workers'.sub('{' + 'orgId' + '}', CGI.escape(org_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[:'worker']) # return_type return_type = opts[:debug_return_type] || 'WorkerResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.post_worker", :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: OrganizationApi#post_worker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_org_by_id(org_id, opts = {}) ⇒ Organization
Organization Updater Edits an existing ‘Organization` with the specified id.
2497 2498 2499 2500 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2497 def update_org_by_id(org_id, opts = {}) data, _status_code, _headers = update_org_by_id_with_http_info(org_id, opts) data end |
#update_org_by_id_with_http_info(org_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Organization Updater Edits an existing `Organization` with the specified id.
2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2509 def update_org_by_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.update_org_by_id ...' 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 OrganizationApi.update_org_by_id" end # resource path local_var_path = '/v2/orgs/{org_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'organization']) # return_type return_type = opts[:debug_return_type] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.update_org_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: OrganizationApi#update_org_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_worker(id, org_id, opts = {}) ⇒ WorkerResponse
Update worker Update Worker
2571 2572 2573 2574 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2571 def update_worker(id, org_id, opts = {}) data, _status_code, _headers = update_worker_with_http_info(id, org_id, opts) data end |
#update_worker_with_http_info(id, org_id, opts = {}) ⇒ Array<(WorkerResponse, Integer, Hash)>
Update worker Update Worker
2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2584 def update_worker_with_http_info(id, org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.update_worker ...' 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 OrganizationApi.update_worker" 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 OrganizationApi.update_worker" end # resource path local_var_path = '/v2/orgs/{orgId}/workers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'orgId' + '}', CGI.escape(org_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[:'worker']) # return_type return_type = opts[:debug_return_type] || 'WorkerResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.update_worker", :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: OrganizationApi#update_worker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v2_orgs_org_id_tasks_get(org_id, opts = {}) ⇒ PagedTask
Get task by organization
2653 2654 2655 2656 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2653 def v2_orgs_org_id_tasks_get(org_id, opts = {}) data, _status_code, _headers = v2_orgs_org_id_tasks_get_with_http_info(org_id, opts) data end |
#v2_orgs_org_id_tasks_get_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get task by organization
2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 |
# File 'lib/cropwise-platform-sdk/api/organization_api.rb', line 2669 def v2_orgs_org_id_tasks_get_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.v2_orgs_org_id_tasks_get ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationApi.v2_orgs_org_id_tasks_get" end # resource path local_var_path = '/v2/orgs/{org_id}/tasks'.sub('{' + 'org_id' + '}', CGI.escape(org_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[:'season_id'] = opts[:'season_id'] if !opts[:'season_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'property_id'] = opts[:'property_id'] if !opts[:'property_id'].nil? query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].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] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrganizationApi.v2_orgs_org_id_tasks_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationApi#v2_orgs_org_id_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |