class KoronaClient::PointsOfSaleApi
Attributes
Public Class Methods
# File lib/korona_client/api/points_of_sale_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
adds a batch of point of sale-related end-of-day-statements
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param coupling_id the coupling-id of the device @param [Hash] opts the optional parameters @option opts [Array<EndOfDayStatement>] :body the end-of-day-statements to add @return [Array<AddOrUpdateResult>]
# File lib/korona_client/api/points_of_sale_api.rb, line 30 def add_point_of_sale_end_of_day_statements(korona_account_id, point_of_sale_id, coupling_id, opts = {}) data, _status_code, _headers = add_point_of_sale_end_of_day_statements_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts) data end
adds a batch of point of sale-related end-of-day-statements
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param coupling_id the coupling-id of the device @param [Hash] opts the optional parameters @option opts [Array<EndOfDayStatement>] :body the end-of-day-statements to add @return [Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 43 def add_point_of_sale_end_of_day_statements_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.add_point_of_sale_end_of_day_statements ...' 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 PointsOfSaleApi.add_point_of_sale_end_of_day_statements" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.add_point_of_sale_end_of_day_statements" end # verify the required parameter 'coupling_id' is set if @api_client.config.client_side_validation && coupling_id.nil? fail ArgumentError, "Missing the required parameter 'coupling_id' when calling PointsOfSaleApi.add_point_of_sale_end_of_day_statements" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/endOfDayStatements'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = coupling_id # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<AddOrUpdateResult>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#add_point_of_sale_end_of_day_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
adds a batch of point of sale-related receipts
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param coupling_id the coupling-id of the device @param [Hash] opts the optional parameters @option opts [Array<Receipt>] :body the receipts to add @return [Array<AddOrUpdateResult>]
# File lib/korona_client/api/points_of_sale_api.rb, line 99 def add_point_of_sale_receipts(korona_account_id, point_of_sale_id, coupling_id, opts = {}) data, _status_code, _headers = add_point_of_sale_receipts_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts) data end
adds a batch of point of sale-related receipts
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param coupling_id the coupling-id of the device @param [Hash] opts the optional parameters @option opts [Array<Receipt>] :body the receipts to add @return [Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 112 def add_point_of_sale_receipts_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.add_point_of_sale_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 PointsOfSaleApi.add_point_of_sale_receipts" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.add_point_of_sale_receipts" end # verify the required parameter 'coupling_id' is set if @api_client.config.client_side_validation && coupling_id.nil? fail ArgumentError, "Missing the required parameter 'coupling_id' when calling PointsOfSaleApi.add_point_of_sale_receipts" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = coupling_id # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<AddOrUpdateResult>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#add_point_of_sale_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
returns the single point of sale
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id the number of the point of sale @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @return [Pos]
# File lib/korona_client/api/points_of_sale_api.rb, line 167 def get_point_of_sale(korona_account_id, point_of_sale_id, opts = {}) data, _status_code, _headers = get_point_of_sale_with_http_info(korona_account_id, point_of_sale_id, opts) data end
lists all point of sale-related end-of-day-statements
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @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 [ResultListEndOfDayStatement]
# File lib/korona_client/api/points_of_sale_api.rb, line 234 def get_point_of_sale_end_of_day_statements(korona_account_id, point_of_sale_id, opts = {}) data, _status_code, _headers = get_point_of_sale_end_of_day_statements_with_http_info(korona_account_id, point_of_sale_id, opts) data end
lists all point of sale-related end-of-day-statements
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @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<(ResultListEndOfDayStatement
, Fixnum, Hash)>] ResultListEndOfDayStatement
data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 250 def get_point_of_sale_end_of_day_statements_with_http_info(korona_account_id, point_of_sale_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_point_of_sale_end_of_day_statements ...' 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 PointsOfSaleApi.get_point_of_sale_end_of_day_statements" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.get_point_of_sale_end_of_day_statements" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/endOfDayStatements'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].nil? 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 = {} # 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 = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResultListEndOfDayStatement') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#get_point_of_sale_end_of_day_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
returns the single point of sale-related receipt
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param receipt_id the id of the receipt @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @return [Receipt]
# File lib/korona_client/api/points_of_sale_api.rb, line 306 def get_point_of_sale_receipt(korona_account_id, point_of_sale_id, receipt_id, opts = {}) data, _status_code, _headers = get_point_of_sale_receipt_with_http_info(korona_account_id, point_of_sale_id, receipt_id, opts) data end
returns the single point of sale-related receipt
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param receipt_id the id of the receipt @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @return [Array<(Receipt
, Fixnum, Hash)>] Receipt
data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 319 def get_point_of_sale_receipt_with_http_info(korona_account_id, point_of_sale_id, receipt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_point_of_sale_receipt ...' 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 PointsOfSaleApi.get_point_of_sale_receipt" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.get_point_of_sale_receipt" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling PointsOfSaleApi.get_point_of_sale_receipt" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts/{receiptId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s).sub('{' + 'receiptId' + '}', receipt_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Receipt') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#get_point_of_sale_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all point of sale-related receipts
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @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 [Integer] :z_count z-count of the receipt @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; date, time and timezone) @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; date, time and timezone) @option opts [String] :number number of the related object @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; date, time and timezone) @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; date, time and timezone) @return [ResultListReceipt]
# File lib/korona_client/api/points_of_sale_api.rb, line 384 def get_point_of_sale_receipts(korona_account_id, point_of_sale_id, opts = {}) data, _status_code, _headers = get_point_of_sale_receipts_with_http_info(korona_account_id, point_of_sale_id, opts) data end
lists all point of sale-related receipts
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @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 [Integer] :z_count z-count of the receipt @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; date, time and timezone) @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; date, time and timezone) @option opts [String] :number number of the related object @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; date, time and timezone) @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; date, time and timezone) @return [Array<(ResultListReceipt
, Fixnum, Hash)>] ResultListReceipt
data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 406 def get_point_of_sale_receipts_with_http_info(korona_account_id, point_of_sale_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_point_of_sale_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 PointsOfSaleApi.get_point_of_sale_receipts" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.get_point_of_sale_receipts" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].nil? 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[:'zCount'] = opts[:'z_count'] if !opts[:'z_count'].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[:'number'] = opts[:'number'] if !opts[:'number'].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? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResultListReceipt') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#get_point_of_sale_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
returns the single point of sale
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id the number of the point of sale @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device. It can be set to check whether your coupling-id is correct or not (works only, if point of sale is external). @return [Array<(Pos
, Fixnum, Hash)>] Pos
data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 179 def get_point_of_sale_with_http_info(korona_account_id, point_of_sale_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_point_of_sale ...' 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 PointsOfSaleApi.get_point_of_sale" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.get_point_of_sale" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Pos') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#get_point_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all points of sale
@param korona_account_id 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 @option opts [BOOLEAN] :external indicates external/internal devices should be loaded (default: null (load all)) @option opts [BOOLEAN] :coupled indicates coupled/not coupled devices should be loaded (default: null (load all)) @return [ResultListPos]
# File lib/korona_client/api/points_of_sale_api.rb, line 473 def get_points_of_sale(korona_account_id, opts = {}) data, _status_code, _headers = get_points_of_sale_with_http_info(korona_account_id, opts) data end
lists all points of sale
@param korona_account_id 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 @option opts [BOOLEAN] :external indicates external/internal devices should be loaded (default: null (load all)) @option opts [BOOLEAN] :coupled indicates coupled/not coupled devices should be loaded (default: null (load all)) @return [Array<(ResultListPos
, Fixnum, Hash)>] ResultListPos
data, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 491 def get_points_of_sale_with_http_info(korona_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_points_of_sale ...' 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 PointsOfSaleApi.get_points_of_sale" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s) # query parameters 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? query_params[:'external'] = opts[:'external'] if !opts[:'external'].nil? query_params[:'coupled'] = opts[:'coupled'] if !opts[:'coupled'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResultListPos') if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#get_points_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
updates a point of sale (works only for coupling (attribute 'couplingId') or updating device information (attribute 'deviceInformation'))
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param body the properties to update of the point of sale ('couplingId' only) @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device (required if already coupled) @option opts [BOOLEAN] :decouple executes uncoupling, if set to true, device will be uncoupled if point of sale is already coupled @return [nil]
# File lib/korona_client/api/points_of_sale_api.rb, line 547 def update_point_of_sale(korona_account_id, point_of_sale_id, body, opts = {}) update_point_of_sale_with_http_info(korona_account_id, point_of_sale_id, body, opts) nil end
updates a point of sale (works only for coupling (attribute 'couplingId') or updating device information (attribute 'deviceInformation'))
@param korona_account_id account id of the KORONA.cloud account @param point_of_sale_id id of the related object (important: id should match the uuid-format) @param body the properties to update of the point of sale ('couplingId' only) @param [Hash] opts the optional parameters @option opts [String] :coupling_id the coupling-id of the device (required if already coupled) @option opts [BOOLEAN] :decouple executes uncoupling, if set to true, device will be uncoupled if point of sale is already coupled @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/korona_client/api/points_of_sale_api.rb, line 561 def update_point_of_sale_with_http_info(korona_account_id, point_of_sale_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.update_point_of_sale ...' 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 PointsOfSaleApi.update_point_of_sale" end # verify the required parameter 'point_of_sale_id' is set if @api_client.config.client_side_validation && point_of_sale_id.nil? fail ArgumentError, "Missing the required parameter 'point_of_sale_id' when calling PointsOfSaleApi.update_point_of_sale" 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 PointsOfSaleApi.update_point_of_sale" end # resource path local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'pointOfSaleId' + '}', point_of_sale_id.to_s) # query parameters query_params = {} query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].nil? query_params[:'decouple'] = opts[:'decouple'] if !opts[:'decouple'].nil? # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PointsOfSaleApi#update_point_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end