class KoronaCloudClient::OrganizationalUnitsApi
Attributes
Public Class Methods
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
adds a batch of new day ratings @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param body [Array<DayRating>] an array of new day ratings @param [Hash] opts the optional parameters @return [Array<AddOrUpdateResult>]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 28 def add_organizational_unit_day_ratings(korona_account_id, organizational_unit_id, body, opts = {}) data, _status_code, _headers = add_organizational_unit_day_ratings_with_http_info(korona_account_id, organizational_unit_id, body, opts) data end
adds a batch of new day ratings @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param body [Array<DayRating>] an array of new day ratings @param [Hash] opts the optional parameters @return [Array<(Array<AddOrUpdateResult>, Integer, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 39 def add_organizational_unit_day_ratings_with_http_info(korona_account_id, organizational_unit_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.add_organizational_unit_day_ratings ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.add_organizational_unit_day_ratings" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.add_organizational_unit_day_ratings" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationalUnitsApi.add_organizational_unit_day_ratings" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Array<AddOrUpdateResult>' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#add_organizational_unit_day_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
deletes the single day rating by its id or date @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param day_rating_id_or_date [String] the id or date (YYYY-MM-DD) of the day rating @param [Hash] opts the optional parameters @return [nil]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 102 def delete_organizational_unit_day_rating(korona_account_id, organizational_unit_id, day_rating_id_or_date, opts = {}) delete_organizational_unit_day_rating_with_http_info(korona_account_id, organizational_unit_id, day_rating_id_or_date, opts) nil end
deletes the single day rating by its id or date @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param day_rating_id_or_date [String] the id or date (YYYY-MM-DD) of the day rating @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 113 def delete_organizational_unit_day_rating_with_http_info(korona_account_id, organizational_unit_id, day_rating_id_or_date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.delete_organizational_unit_day_rating ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.delete_organizational_unit_day_rating" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.delete_organizational_unit_day_rating" end # verify the required parameter 'day_rating_id_or_date' is set if @api_client.config.client_side_validation && day_rating_id_or_date.nil? fail ArgumentError, "Missing the required parameter 'day_rating_id_or_date' when calling OrganizationalUnitsApi.delete_organizational_unit_day_rating" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings/{dayRatingIdOrDate}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_id.to_s)).sub('{' + 'dayRatingIdOrDate' + '}', CGI.escape(day_rating_id_or_date.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[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#delete_organizational_unit_day_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
returns the single organizational unit @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @return [OrganizationalUnit]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 173 def get_organizational_unit(korona_account_id, organizational_unit_id, opts = {}) data, _status_code, _headers = get_organizational_unit_with_http_info(korona_account_id, organizational_unit_id, opts) data end
returns the single day rating by its id or date @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param day_rating_id_or_date [String] the id or date (YYYY-MM-DD) of the day rating @param [Hash] opts the optional parameters @return [DayRating]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 240 def get_organizational_unit_day_rating(korona_account_id, organizational_unit_id, day_rating_id_or_date, opts = {}) data, _status_code, _headers = get_organizational_unit_day_rating_with_http_info(korona_account_id, organizational_unit_id, day_rating_id_or_date, opts) data end
returns the single day rating by its id or date @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param day_rating_id_or_date [String] the id or date (YYYY-MM-DD) of the day rating @param [Hash] opts the optional parameters @return [Array<(DayRating
, Integer, Hash)>] DayRating
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 251 def get_organizational_unit_day_rating_with_http_info(korona_account_id, organizational_unit_id, day_rating_id_or_date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit_day_rating ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_unit_day_rating" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit_day_rating" end # verify the required parameter 'day_rating_id_or_date' is set if @api_client.config.client_side_validation && day_rating_id_or_date.nil? fail ArgumentError, "Missing the required parameter 'day_rating_id_or_date' when calling OrganizationalUnitsApi.get_organizational_unit_day_rating" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings/{dayRatingIdOrDate}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_id.to_s)).sub('{' + 'dayRatingIdOrDate' + '}', CGI.escape(day_rating_id_or_date.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[:body] # return_type return_type = opts[:return_type] || 'DayRating' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit_day_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all organizational unit related day ratings @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @return [ResultListDayRating]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 314 def get_organizational_unit_day_ratings(korona_account_id, organizational_unit_id, opts = {}) data, _status_code, _headers = get_organizational_unit_day_ratings_with_http_info(korona_account_id, organizational_unit_id, opts) data end
lists all organizational unit related day ratings @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @return [Array<(ResultListDayRating
, Integer, Hash)>] ResultListDayRating
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 327 def get_organizational_unit_day_ratings_with_http_info(korona_account_id, organizational_unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit_day_ratings ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_unit_day_ratings" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit_day_ratings" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] # return_type return_type = opts[:return_type] || 'ResultListDayRating' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit_day_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists the inventory lists belonging to the organizational unit (KORONA.retail required) @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @option opts [Boolean] :include_deleted indicates deleted objects should be loaded or not (default: false) @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [String] :booking_status booking status (possible values: BOOKED, IN_PROGRESS) @return [ResultListInventoryList]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 396 def get_organizational_unit_inventory_lists(korona_account_id, organizational_unit_id, opts = {}) data, _status_code, _headers = get_organizational_unit_inventory_lists_with_http_info(korona_account_id, organizational_unit_id, opts) data end
lists the inventory lists belonging to the organizational unit (KORONA.retail required) @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @option opts [Boolean] :include_deleted indicates deleted objects should be loaded or not (default: false) @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [String] :booking_status booking status (possible values: BOOKED, IN_PROGRESS) @return [Array<(ResultListInventoryList
, Integer, Hash)>] ResultListInventoryList
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 416 def get_organizational_unit_inventory_lists_with_http_info(korona_account_id, organizational_unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit_inventory_lists ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_unit_inventory_lists" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit_inventory_lists" end allowable_values = ["BOOKED", "IN_PROGRESS"] if @api_client.config.client_side_validation && opts[:'booking_status'] && !allowable_values.include?(opts[:'booking_status']) fail ArgumentError, "invalid value for \"booking_status\", must be one of #{allowable_values}" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/inventoryLists'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil? query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? query_params[:'minCreateTime'] = opts[:'min_create_time'] if !opts[:'min_create_time'].nil? query_params[:'maxCreateTime'] = opts[:'max_create_time'] if !opts[:'max_create_time'].nil? query_params[:'minBookingTime'] = opts[:'min_booking_time'] if !opts[:'min_booking_time'].nil? query_params[:'maxBookingTime'] = opts[:'max_booking_time'] if !opts[:'max_booking_time'].nil? query_params[:'bookingStatus'] = opts[:'booking_status'] if !opts[:'booking_status'].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[:body] # return_type return_type = opts[:return_type] || 'ResultListInventoryList' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit_inventory_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists the product stocks of the organizational unit, in case it contains a warehouse (KORONA.retail required) @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @return [ResultListProductStock]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 490 def get_organizational_unit_product_stocks(korona_account_id, organizational_unit_id, opts = {}) data, _status_code, _headers = get_organizational_unit_product_stocks_with_http_info(korona_account_id, organizational_unit_id, opts) data end
lists the product stocks of the organizational unit, in case it contains a warehouse (KORONA.retail required) @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @return [Array<(ResultListProductStock
, Integer, Hash)>] ResultListProductStock
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 504 def get_organizational_unit_product_stocks_with_http_info(korona_account_id, organizational_unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit_product_stocks ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_unit_product_stocks" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit_product_stocks" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/productStocks'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].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[:body] # return_type return_type = opts[:return_type] || 'ResultListProductStock' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit_product_stocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists the stock receipts belonging to the organizational unit (KORONA.retail required) @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @option opts [Boolean] :include_deleted indicates deleted objects should be loaded or not (default: false) @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [String] :source_organizational_unit source organizational unit @option opts [String] :booking_status booking status (possible values: BOOKED, IN_PROGRESS) @option opts [String] :number number of the related object @return [ResultListStockReceipt]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 576 def get_organizational_unit_stock_receipts(korona_account_id, organizational_unit_id, opts = {}) data, _status_code, _headers = get_organizational_unit_stock_receipts_with_http_info(korona_account_id, organizational_unit_id, opts) data end
lists the stock receipts belonging to the organizational unit (KORONA.retail required) @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @option opts [Boolean] :include_deleted indicates deleted objects should be loaded or not (default: false) @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional) @option opts [String] :source_organizational_unit source organizational unit @option opts [String] :booking_status booking status (possible values: BOOKED, IN_PROGRESS) @option opts [String] :number number of the related object @return [Array<(ResultListStockReceipt
, Integer, Hash)>] ResultListStockReceipt
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 598 def get_organizational_unit_stock_receipts_with_http_info(korona_account_id, organizational_unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit_stock_receipts ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_unit_stock_receipts" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit_stock_receipts" end allowable_values = ["BOOKED", "IN_PROGRESS"] if @api_client.config.client_side_validation && opts[:'booking_status'] && !allowable_values.include?(opts[:'booking_status']) fail ArgumentError, "invalid value for \"booking_status\", must be one of #{allowable_values}" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/stockReceipts'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil? query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? query_params[:'minCreateTime'] = opts[:'min_create_time'] if !opts[:'min_create_time'].nil? query_params[:'maxCreateTime'] = opts[:'max_create_time'] if !opts[:'max_create_time'].nil? query_params[:'minBookingTime'] = opts[:'min_booking_time'] if !opts[:'min_booking_time'].nil? query_params[:'maxBookingTime'] = opts[:'max_booking_time'] if !opts[:'max_booking_time'].nil? query_params[:'sourceOrganizationalUnit'] = opts[:'source_organizational_unit'] if !opts[:'source_organizational_unit'].nil? query_params[:'bookingStatus'] = opts[:'booking_status'] if !opts[:'booking_status'].nil? query_params[:'number'] = opts[:'number'] if !opts[:'number'].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[:body] # return_type return_type = opts[:return_type] || 'ResultListStockReceipt' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit_stock_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
returns the single organizational unit @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @return [Array<(OrganizationalUnit
, Integer, Hash)>] OrganizationalUnit
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 183 def get_organizational_unit_with_http_info(korona_account_id, organizational_unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_unit" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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[:body] # return_type return_type = opts[:return_type] || 'OrganizationalUnit' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all organizational units @param korona_account_id [String] account id of the KORONA.cloud account @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @option opts [Boolean] :include_deleted indicates deleted objects should be loaded or not (default: false) @option opts [String] :number number of the related object @return [ResultListOrganizationalUnit]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 675 def get_organizational_units(korona_account_id, opts = {}) data, _status_code, _headers = get_organizational_units_with_http_info(korona_account_id, opts) data end
lists all organizational units @param korona_account_id [String] account id of the KORONA.cloud account @param [Hash] opts the optional parameters @option opts [Integer] :page number of the page to fetch @option opts [Integer] :size amount of objects to return per page @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5) @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned @option opts [Boolean] :include_deleted indicates deleted objects should be loaded or not (default: false) @option opts [String] :number number of the related object @return [Array<(ResultListOrganizationalUnit
, Integer, Hash)>] ResultListOrganizationalUnit
data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 690 def get_organizational_units_with_http_info(korona_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_units ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.get_organizational_units" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_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[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil? query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? query_params[:'number'] = opts[:'number'] if !opts[:'number'].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[:body] # return_type return_type = opts[:return_type] || 'ResultListOrganizationalUnit' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_units\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
updates the day rating by its id or date @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param day_rating_id_or_date [String] the id or date (YYYY-MM-DD) of the day rating @param body [DayRating] the properties to update of the day rating @param [Hash] opts the optional parameters @return [nil]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 750 def update_organizational_unit_day_rating(korona_account_id, organizational_unit_id, day_rating_id_or_date, body, opts = {}) update_organizational_unit_day_rating_with_http_info(korona_account_id, organizational_unit_id, day_rating_id_or_date, body, opts) nil end
updates the day rating by its id or date @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param day_rating_id_or_date [String] the id or date (YYYY-MM-DD) of the day rating @param body [DayRating] the properties to update of the day rating @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 762 def update_organizational_unit_day_rating_with_http_info(korona_account_id, organizational_unit_id, day_rating_id_or_date, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.update_organizational_unit_day_rating ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.update_organizational_unit_day_rating" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.update_organizational_unit_day_rating" end # verify the required parameter 'day_rating_id_or_date' is set if @api_client.config.client_side_validation && day_rating_id_or_date.nil? fail ArgumentError, "Missing the required parameter 'day_rating_id_or_date' when calling OrganizationalUnitsApi.update_organizational_unit_day_rating" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationalUnitsApi.update_organizational_unit_day_rating" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings/{dayRatingIdOrDate}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_id.to_s)).sub('{' + 'dayRatingIdOrDate' + '}', CGI.escape(day_rating_id_or_date.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :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(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#update_organizational_unit_day_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
updates a batch of day ratings @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param body [Array<DayRating>] an array of new day ratings @param [Hash] opts the optional parameters @return [Array<AddOrUpdateResult>]
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 829 def update_organizational_unit_day_ratings(korona_account_id, organizational_unit_id, body, opts = {}) data, _status_code, _headers = update_organizational_unit_day_ratings_with_http_info(korona_account_id, organizational_unit_id, body, opts) data end
updates a batch of day ratings @param korona_account_id [String] account id of the KORONA.cloud account @param organizational_unit_id [String] id of the related object (important: id should match the uuid-format) @param body [Array<DayRating>] an array of new day ratings @param [Hash] opts the optional parameters @return [Array<(Array<AddOrUpdateResult>, Integer, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
# File lib/korona-cloud-client/api/organizational_units_api.rb, line 840 def update_organizational_unit_day_ratings_with_http_info(korona_account_id, organizational_unit_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.update_organizational_unit_day_ratings ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling OrganizationalUnitsApi.update_organizational_unit_day_ratings" end # verify the required parameter 'organizational_unit_id' is set if @api_client.config.client_side_validation && organizational_unit_id.nil? fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.update_organizational_unit_day_ratings" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationalUnitsApi.update_organizational_unit_day_ratings" end # resource path local_var_path = '/accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings'.sub('{' + 'koronaAccountId' + '}', CGI.escape(korona_account_id.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Array<AddOrUpdateResult>' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] new_options = opts.merge( :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(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationalUnitsApi#update_organizational_unit_day_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end