Class: KoronaCloudClient::PointsOfSaleApi

Inherits:
Object
  • Object
show all
Defined in:
lib/korona-cloud-client/api/points_of_sale_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PointsOfSaleApi

Returns a new instance of PointsOfSaleApi.



19
20
21
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_point_of_sale_end_of_day_statements(korona_account_id, point_of_sale_id, coupling_id, opts = {}) ⇒ Array<AddOrUpdateResult>

adds a batch of point of sale-related end-of-day-statements

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • coupling_id (String)

    the coupling-id of the device

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_of_day_statement (Array<EndOfDayStatement>)

    the end-of-day-statements to add

Returns:



29
30
31
32
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 29

def add_point_of_sale_end_of_day_statements(, point_of_sale_id, coupling_id, opts = {})
  data, _status_code, _headers = add_point_of_sale_end_of_day_statements_with_http_info(, point_of_sale_id, coupling_id, opts)
  data
end

#add_point_of_sale_end_of_day_statements_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds a batch of point of sale-related end-of-day-statements

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • coupling_id (String)

    the coupling-id of the device

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_of_day_statement (Array<EndOfDayStatement>)

    the end-of-day-statements to add

Returns:

  • (Array<(Array<AddOrUpdateResult>, Integer, Hash)>)

    Array<AddOrUpdateResult> data, response status code and response headers



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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 41

def add_point_of_sale_end_of_day_statements_with_http_info(, 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 && .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' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'couplingId'] = coupling_id

  # 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[:'end_of_day_statement'])

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.add_point_of_sale_end_of_day_statements",
    :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: 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

#add_point_of_sale_pos_balances(korona_account_id, point_of_sale_id, coupling_id, opts = {}) ⇒ Array<AddOrUpdateResult>

adds a batch of point of sale-related pos balances

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • coupling_id (String)

    the coupling-id of the device

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :pos_balance (Array<PosBalance>)

    the pos balances to add

Returns:



110
111
112
113
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 110

def add_point_of_sale_pos_balances(, point_of_sale_id, coupling_id, opts = {})
  data, _status_code, _headers = add_point_of_sale_pos_balances_with_http_info(, point_of_sale_id, coupling_id, opts)
  data
end

#add_point_of_sale_pos_balances_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds a batch of point of sale-related pos balances

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • coupling_id (String)

    the coupling-id of the device

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :pos_balance (Array<PosBalance>)

    the pos balances to add

Returns:

  • (Array<(Array<AddOrUpdateResult>, Integer, Hash)>)

    Array<AddOrUpdateResult> data, response status code and response headers



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 122

def add_point_of_sale_pos_balances_with_http_info(, point_of_sale_id, coupling_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.add_point_of_sale_pos_balances ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling PointsOfSaleApi.add_point_of_sale_pos_balances"
  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_pos_balances"
  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_pos_balances"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/posBalances'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'couplingId'] = coupling_id

  # 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[:'pos_balance'])

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.add_point_of_sale_pos_balances",
    :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: PointsOfSaleApi#add_point_of_sale_pos_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_point_of_sale_receipts(korona_account_id, point_of_sale_id, coupling_id, opts = {}) ⇒ Array<AddOrUpdateResult>

adds a batch of point of sale-related receipts

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • coupling_id (String)

    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).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :disable_receipt_number_prefix (Boolean)

    prevents setting a prefix at the receipt number

  • :receipt (Array<Receipt>)

    the receipts to add

Returns:



192
193
194
195
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 192

def add_point_of_sale_receipts(, point_of_sale_id, coupling_id, opts = {})
  data, _status_code, _headers = add_point_of_sale_receipts_with_http_info(, point_of_sale_id, coupling_id, opts)
  data
end

#add_point_of_sale_receipts_with_http_info(korona_account_id, point_of_sale_id, coupling_id, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds a batch of point of sale-related receipts

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • coupling_id (String)

    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).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :disable_receipt_number_prefix (Boolean)

    prevents setting a prefix at the receipt number

  • :receipt (Array<Receipt>)

    the receipts to add

Returns:

  • (Array<(Array<AddOrUpdateResult>, Integer, Hash)>)

    Array<AddOrUpdateResult> data, response status code and response headers



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
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
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 205

def add_point_of_sale_receipts_with_http_info(, 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 && .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' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'couplingId'] = coupling_id
  query_params[:'disableReceiptNumberPrefix'] = opts[:'disable_receipt_number_prefix'] if !opts[:'disable_receipt_number_prefix'].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[:'receipt'])

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.add_point_of_sale_receipts",
    :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: PointsOfSaleApi#add_point_of_sale_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_points_of_sale(korona_account_id, pos, opts = {}) ⇒ Array<AddOrUpdateResult>

adds a batch of new points of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • pos (Array<Pos>)

    array of new points of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :upsert (Boolean)

    when set to true, updates the object instead of generating a already-exists-error; deprecated, use writeMode ADD_OR_UPDATE instead

  • :write_mode (String)

    DEFAULT &#x3D; insert; ADD_OR_UPDATE &#x3D; insert or update, overwrite all non-null fields; ADD_OR_REPLACE &#x3D; insert or update, overwrite all fields

Returns:



275
276
277
278
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 275

def add_points_of_sale(, pos, opts = {})
  data, _status_code, _headers = add_points_of_sale_with_http_info(, pos, opts)
  data
end

#add_points_of_sale_with_http_info(korona_account_id, pos, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds a batch of new points of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • pos (Array<Pos>)

    array of new points of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :upsert (Boolean)

    when set to true, updates the object instead of generating a already-exists-error; deprecated, use writeMode ADD_OR_UPDATE instead

  • :write_mode (String)

    DEFAULT &#x3D; insert; ADD_OR_UPDATE &#x3D; insert or update, overwrite all non-null fields; ADD_OR_REPLACE &#x3D; insert or update, overwrite all fields

Returns:

  • (Array<(Array<AddOrUpdateResult>, Integer, Hash)>)

    Array<AddOrUpdateResult> data, response status code and response headers



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 287

def add_points_of_sale_with_http_info(, pos, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.add_points_of_sale ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling PointsOfSaleApi.add_points_of_sale"
  end
  # verify the required parameter 'pos' is set
  if @api_client.config.client_side_validation && pos.nil?
    fail ArgumentError, "Missing the required parameter 'pos' when calling PointsOfSaleApi.add_points_of_sale"
  end
  allowable_values = ["DEFAULT", "ADD_OR_UPDATE", "ADD_OR_REPLACE"]
  if @api_client.config.client_side_validation && opts[:'write_mode'] && !allowable_values.include?(opts[:'write_mode'])
    fail ArgumentError, "invalid value for \"write_mode\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/pointsOfSale'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'upsert'] = opts[:'upsert'] if !opts[:'upsert'].nil?
  query_params[:'writeMode'] = opts[:'write_mode'] if !opts[:'write_mode'].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(pos)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.add_points_of_sale",
    :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: PointsOfSaleApi#add_points_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_point_of_sale(korona_account_id, point_of_sale_id, opts = {}) ⇒ Pos

returns the single point of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    the number of the point of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

Returns:



356
357
358
359
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 356

def get_point_of_sale(, point_of_sale_id, opts = {})
  data, _status_code, _headers = get_point_of_sale_with_http_info(, point_of_sale_id, opts)
  data
end

#get_point_of_sale_balances(korona_account_id, point_of_sale_id, opts = {}) ⇒ ResultListPosBalance

lists all point of sale-related pos balances

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    point of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :z_count (Integer)

    z-count of the pos balance

  • :cashier (String)

    cashier id to filter by

Returns:



431
432
433
434
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 431

def get_point_of_sale_balances(, point_of_sale_id, opts = {})
  data, _status_code, _headers = get_point_of_sale_balances_with_http_info(, point_of_sale_id, opts)
  data
end

#get_point_of_sale_balances_with_http_info(korona_account_id, point_of_sale_id, opts = {}) ⇒ Array<(ResultListPosBalance, Integer, Hash)>

lists all point of sale-related pos balances

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    point of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :z_count (Integer)

    z-count of the pos balance

  • :cashier (String)

    cashier id to filter by

Returns:

  • (Array<(ResultListPosBalance, Integer, Hash)>)

    ResultListPosBalance data, response status code and response headers



447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 447

def get_point_of_sale_balances_with_http_info(, point_of_sale_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_point_of_sale_balances ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling PointsOfSaleApi.get_point_of_sale_balances"
  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_balances"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/balances'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_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[:'zCount'] = opts[:'z_count'] if !opts[:'z_count'].nil?
  query_params[:'cashier'] = opts[:'cashier'] if !opts[:'cashier'].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] || 'ResultListPosBalance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_point_of_sale_balances",
    :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: PointsOfSaleApi#get_point_of_sale_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_point_of_sale_end_of_day_statements(korona_account_id, point_of_sale_id, opts = {}) ⇒ ResultListEndOfDayStatement

lists all point of sale-related end-of-day-statements

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :min_finish_time (Time)

    min (inclusive) finish time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_finish_time (Time)

    max (inclusive) finish time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :cashier (String)

    cashier id to filter by

  • :z_count (Integer)

    z-count of the receipt

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

Returns:



519
520
521
522
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 519

def get_point_of_sale_end_of_day_statements(, point_of_sale_id, opts = {})
  data, _status_code, _headers = get_point_of_sale_end_of_day_statements_with_http_info(, point_of_sale_id, opts)
  data
end

#get_point_of_sale_end_of_day_statements_with_http_info(korona_account_id, point_of_sale_id, opts = {}) ⇒ Array<(ResultListEndOfDayStatement, Integer, Hash)>

lists all point of sale-related end-of-day-statements

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :min_finish_time (Time)

    min (inclusive) finish time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_finish_time (Time)

    max (inclusive) finish time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :cashier (String)

    cashier id to filter by

  • :z_count (Integer)

    z-count of the receipt

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

Returns:

  • (Array<(ResultListEndOfDayStatement, Integer, Hash)>)

    ResultListEndOfDayStatement data, response status code and response headers



538
539
540
541
542
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
595
596
597
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 538

def get_point_of_sale_end_of_day_statements_with_http_info(, 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 && .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' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[: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[:'minFinishTime'] = opts[:'min_finish_time'] if !opts[:'min_finish_time'].nil?
  query_params[:'maxFinishTime'] = opts[:'max_finish_time'] if !opts[:'max_finish_time'].nil?
  query_params[:'cashier'] = opts[:'cashier'] if !opts[:'cashier'].nil?
  query_params[:'zCount'] = opts[:'z_count'] if !opts[:'z_count'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ResultListEndOfDayStatement'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_point_of_sale_end_of_day_statements",
    :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: 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

#get_point_of_sale_max_numbers(korona_account_id, point_of_sale_id, opts = {}) ⇒ PosMaxNumbers

returns the single point of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    point of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

Returns:



605
606
607
608
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 605

def get_point_of_sale_max_numbers(, point_of_sale_id, opts = {})
  data, _status_code, _headers = get_point_of_sale_max_numbers_with_http_info(, point_of_sale_id, opts)
  data
end

#get_point_of_sale_max_numbers_with_http_info(korona_account_id, point_of_sale_id, opts = {}) ⇒ Array<(PosMaxNumbers, Integer, Hash)>

returns the single point of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    point of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

Returns:

  • (Array<(PosMaxNumbers, Integer, Hash)>)

    PosMaxNumbers data, response status code and response headers



616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 616

def get_point_of_sale_max_numbers_with_http_info(, point_of_sale_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.get_point_of_sale_max_numbers ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling PointsOfSaleApi.get_point_of_sale_max_numbers"
  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_max_numbers"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/maxNumbers'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].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] || 'PosMaxNumbers'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_point_of_sale_max_numbers",
    :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: PointsOfSaleApi#get_point_of_sale_max_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_point_of_sale_receipt(korona_account_id, point_of_sale_id, receipt_id, opts = {}) ⇒ Receipt

returns the single point of sale-related receipt

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • receipt_id (String)

    the id of the receipt

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

  • :voided_items (Boolean)

    when set to true, voided items will included in response

Returns:



677
678
679
680
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 677

def get_point_of_sale_receipt(, point_of_sale_id, receipt_id, opts = {})
  data, _status_code, _headers = get_point_of_sale_receipt_with_http_info(, point_of_sale_id, receipt_id, opts)
  data
end

#get_point_of_sale_receipt_with_http_info(korona_account_id, point_of_sale_id, receipt_id, opts = {}) ⇒ Array<(Receipt, Integer, Hash)>

returns the single point of sale-related receipt

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • receipt_id (String)

    the id of the receipt

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

  • :voided_items (Boolean)

    when set to true, voided items will included in response

Returns:

  • (Array<(Receipt, Integer, Hash)>)

    Receipt data, response status code and response headers



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
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
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 690

def get_point_of_sale_receipt_with_http_info(, 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 && .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' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s)).sub('{' + 'receiptId' + '}', CGI.escape(receipt_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].nil?
  query_params[:'voidedItems'] = opts[:'voided_items'] if !opts[:'voided_items'].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] || 'Receipt'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_point_of_sale_receipt",
    :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: PointsOfSaleApi#get_point_of_sale_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_point_of_sale_receipts(korona_account_id, point_of_sale_id, opts = {}) ⇒ ResultListReceipt

lists all point of sale-related receipts

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :z_count (Integer)

    z-count of the receipt

  • :min_create_time (Time)

    min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_create_time (Time)

    max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :number (String)

    number of the related object

  • :min_booking_time (Time)

    min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_booking_time (Time)

    max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :cashier (String)

    cashier id to filter by

  • :voided_items (Boolean)

    when set to true, voided items will included in response

  • :order_number (String)

    order number

Returns:



767
768
769
770
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 767

def get_point_of_sale_receipts(, point_of_sale_id, opts = {})
  data, _status_code, _headers = get_point_of_sale_receipts_with_http_info(, point_of_sale_id, opts)
  data
end

#get_point_of_sale_receipts_with_http_info(korona_account_id, point_of_sale_id, opts = {}) ⇒ Array<(ResultListReceipt, Integer, Hash)>

lists all point of sale-related receipts

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :z_count (Integer)

    z-count of the receipt

  • :min_create_time (Time)

    min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_create_time (Time)

    max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :number (String)

    number of the related object

  • :min_booking_time (Time)

    min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_booking_time (Time)

    max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :cashier (String)

    cashier id to filter by

  • :voided_items (Boolean)

    when set to true, voided items will included in response

  • :order_number (String)

    order number

Returns:

  • (Array<(ResultListReceipt, Integer, Hash)>)

    ResultListReceipt data, response status code and response headers



791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 791

def get_point_of_sale_receipts_with_http_info(, 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 && .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' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[: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?
  query_params[:'cashier'] = opts[:'cashier'] if !opts[:'cashier'].nil?
  query_params[:'voidedItems'] = opts[:'voided_items'] if !opts[:'voided_items'].nil?
  query_params[:'orderNumber'] = opts[:'order_number'] if !opts[:'order_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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ResultListReceipt'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_point_of_sale_receipts",
    :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: PointsOfSaleApi#get_point_of_sale_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_point_of_sale_with_http_info(korona_account_id, point_of_sale_id, opts = {}) ⇒ Array<(Pos, Integer, Hash)>

returns the single point of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    the number of the point of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    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).

Returns:

  • (Array<(Pos, Integer, Hash)>)

    Pos data, response status code and response headers



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 367

def get_point_of_sale_with_http_info(, 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 && .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' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'couplingId'] = opts[:'coupling_id'] if !opts[:'coupling_id'].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] || 'Pos'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_point_of_sale",
    :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: PointsOfSaleApi#get_point_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_points_of_sale(korona_account_id, opts = {}) ⇒ ResultListPos

lists all points of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :include_deleted (Boolean)

    indicates deleted objects should be loaded or not (default: false)

  • :number (String)

    number of the related object

  • :external (Boolean)

    indicates external/internal devices should be loaded (default: null (load all))

  • :coupled (Boolean)

    indicates coupled/not coupled devices should be loaded (default: null (load all))

  • :organizational_unit (String)

    organizational unit

Returns:



870
871
872
873
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 870

def get_points_of_sale(, opts = {})
  data, _status_code, _headers = get_points_of_sale_with_http_info(, opts)
  data
end

#get_points_of_sale_with_http_info(korona_account_id, opts = {}) ⇒ Array<(ResultListPos, Integer, Hash)>

lists all points of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :include_deleted (Boolean)

    indicates deleted objects should be loaded or not (default: false)

  • :number (String)

    number of the related object

  • :external (Boolean)

    indicates external/internal devices should be loaded (default: null (load all))

  • :coupled (Boolean)

    indicates coupled/not coupled devices should be loaded (default: null (load all))

  • :organizational_unit (String)

    organizational unit

Returns:

  • (Array<(ResultListPos, Integer, Hash)>)

    ResultListPos data, response status code and response headers



888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
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
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 888

def get_points_of_sale_with_http_info(, 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 && .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' + '}', CGI.escape(.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?
  query_params[:'external'] = opts[:'external'] if !opts[:'external'].nil?
  query_params[:'coupled'] = opts[:'coupled'] if !opts[:'coupled'].nil?
  query_params[:'organizationalUnit'] = opts[:'organizational_unit'] if !opts[:'organizational_unit'].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] || 'ResultListPos'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.get_points_of_sale",
    :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: PointsOfSaleApi#get_points_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_point_of_sale(korona_account_id, point_of_sale_id, pos, opts = {}) ⇒ nil

updates the point of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • pos (Pos)

    the properties to update of the point of sale (&#39;couplingId&#39; only)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    the coupling-id of the device (required if already coupled)

  • :decouple (Boolean)

    executes uncoupling, if set to true, device will be uncoupled if point of sale is already coupled

Returns:

  • (nil)


953
954
955
956
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 953

def update_point_of_sale(, point_of_sale_id, pos, opts = {})
  update_point_of_sale_with_http_info(, point_of_sale_id, pos, opts)
  nil
end

#update_point_of_sale_with_http_info(korona_account_id, point_of_sale_id, pos, opts = {}) ⇒ Array<(nil, Integer, Hash)>

updates the point of sale

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • point_of_sale_id (String)

    id of the related object (important: id should match the uuid-format)

  • pos (Pos)

    the properties to update of the point of sale (&#39;couplingId&#39; only)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :coupling_id (String)

    the coupling-id of the device (required if already coupled)

  • :decouple (Boolean)

    executes uncoupling, if set to true, device will be uncoupled if point of sale is already coupled

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
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
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 966

def update_point_of_sale_with_http_info(, point_of_sale_id, pos, 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 && .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 'pos' is set
  if @api_client.config.client_side_validation && pos.nil?
    fail ArgumentError, "Missing the required parameter 'pos' when calling PointsOfSaleApi.update_point_of_sale"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'pointOfSaleId' + '}', CGI.escape(point_of_sale_id.to_s))

  # query parameters
  query_params = opts[: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 = 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(pos)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.update_point_of_sale",
    :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: PointsOfSaleApi#update_point_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_points_of_sale(korona_account_id, pos, opts = {}) ⇒ Array<AddOrUpdateResult>

updates a batch of points of sale; [number] must be set in the objects, otherwise the object cannot be updated

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • pos (Array<Pos>)

    an array of existing points of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1034
1035
1036
1037
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 1034

def update_points_of_sale(, pos, opts = {})
  data, _status_code, _headers = update_points_of_sale_with_http_info(, pos, opts)
  data
end

#update_points_of_sale_with_http_info(korona_account_id, pos, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

updates a batch of points of sale; [number] must be set in the objects, otherwise the object cannot be updated

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • pos (Array<Pos>)

    an array of existing points of sale

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<AddOrUpdateResult>, Integer, Hash)>)

    Array<AddOrUpdateResult> data, response status code and response headers



1044
1045
1046
1047
1048
1049
1050
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
1096
1097
1098
1099
# File 'lib/korona-cloud-client/api/points_of_sale_api.rb', line 1044

def update_points_of_sale_with_http_info(, pos, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PointsOfSaleApi.update_points_of_sale ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling PointsOfSaleApi.update_points_of_sale"
  end
  # verify the required parameter 'pos' is set
  if @api_client.config.client_side_validation && pos.nil?
    fail ArgumentError, "Missing the required parameter 'pos' when calling PointsOfSaleApi.update_points_of_sale"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/pointsOfSale'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(pos)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"PointsOfSaleApi.update_points_of_sale",
    :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: PointsOfSaleApi#update_points_of_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end