Skip to content

Latest commit

 

History

History
executable file
·
530 lines (370 loc) · 19.7 KB

File metadata and controls

executable file
·
530 lines (370 loc) · 19.7 KB

KoronacloudApiV3.PointsOfSaleApi

All URIs are relative to https://www.koronacloud.com/web/api/v3

Method HTTP request Description
addPointOfSaleEndOfDayStatements POST /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/endOfDayStatements adds a batch of point of sale-related end-of-day-statements
addPointOfSaleReceipts POST /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts adds a batch of point of sale-related receipts
getPointOfSale GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId} returns the single point of sale
getPointOfSaleEndOfDayStatements GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/endOfDayStatements lists all point of sale-related end-of-day-statements
getPointOfSaleReceipt GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts/{receiptId} returns the single point of sale-related receipt
getPointOfSaleReceipts GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts lists all point of sale-related receipts
getPointsOfSale GET /accounts/{koronaAccountId}/pointsOfSale lists all points of sale
updatePointOfSale PATCH /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId} updates a point of sale (works only for coupling (attribute 'couplingId') or updating device information (attribute 'deviceInformation'))

addPointOfSaleEndOfDayStatements

[AddOrUpdateResult] addPointOfSaleEndOfDayStatements(pointOfSaleId, couplingId, koronaAccountId, opts)

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

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | id of the related object (important: id should match the uuid-format)

var couplingId = "couplingId_example"; // String | the coupling-id of the device

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'body': [new KoronacloudApiV3.EndOfDayStatement()] // [EndOfDayStatement] | the end-of-day-statements to add
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addPointOfSaleEndOfDayStatements(pointOfSaleId, couplingId, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String id of the related object (important: id should match the uuid-format)
couplingId String the coupling-id of the device
koronaAccountId String account id of the korona.cloud account
body [EndOfDayStatement] the end-of-day-statements to add [optional]

Return type

[AddOrUpdateResult]

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

addPointOfSaleReceipts

[AddOrUpdateResult] addPointOfSaleReceipts(pointOfSaleId, couplingId, koronaAccountId, opts)

adds a batch of point of sale-related receipts

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | id of the related object (important: id should match the uuid-format)

var couplingId = "couplingId_example"; // String | the coupling-id of the device

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'body': [new KoronacloudApiV3.Receipt()] // [Receipt] | the receipts to add
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addPointOfSaleReceipts(pointOfSaleId, couplingId, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String id of the related object (important: id should match the uuid-format)
couplingId String the coupling-id of the device
koronaAccountId String account id of the korona.cloud account
body [Receipt] the receipts to add [optional]

Return type

[AddOrUpdateResult]

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getPointOfSale

Pos getPointOfSale(pointOfSaleId, koronaAccountId, opts)

returns the single point of sale

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | the number of the point of sale

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'couplingId': "couplingId_example" // 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).
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPointOfSale(pointOfSaleId, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String the number of the point of sale
koronaAccountId String account id of the korona.cloud account
couplingId 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). [optional]

Return type

Pos

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getPointOfSaleEndOfDayStatements

ResultListEndOfDayStatement getPointOfSaleEndOfDayStatements(pointOfSaleId, couplingId, koronaAccountId, opts)

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

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | id of the related object (important: id should match the uuid-format)

var couplingId = "couplingId_example"; // String | the coupling-id of the device

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'page': 56, // Number | number of the page to fetch
  'size': 56, // Number | amount of objects to return per page
  'sort': "sort_example", // String | attribute to sort by (multiple separated by comma; max. 5)
  'revision': 789 // Number | last revision number, objects with a greater revision than this will be returned
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPointOfSaleEndOfDayStatements(pointOfSaleId, couplingId, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String id of the related object (important: id should match the uuid-format)
couplingId String the coupling-id of the device
koronaAccountId String account id of the korona.cloud account
page Number number of the page to fetch [optional]
size Number amount of objects to return per page [optional]
sort String attribute to sort by (multiple separated by comma; max. 5) [optional]
revision Number last revision number, objects with a greater revision than this will be returned [optional]

Return type

ResultListEndOfDayStatement

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getPointOfSaleReceipt

Receipt getPointOfSaleReceipt(pointOfSaleId, receiptId, koronaAccountId, opts)

returns the single point of sale-related receipt

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | id of the related object (important: id should match the uuid-format)

var receiptId = "receiptId_example"; // String | the id of the receipt

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'couplingId': "couplingId_example" // 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).
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPointOfSaleReceipt(pointOfSaleId, receiptId, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String id of the related object (important: id should match the uuid-format)
receiptId String the id of the receipt
koronaAccountId String account id of the korona.cloud account
couplingId 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). [optional]

Return type

Receipt

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getPointOfSaleReceipts

ResultListReceipt getPointOfSaleReceipts(pointOfSaleId, koronaAccountId, opts)

lists all point of sale-related receipts

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | id of the related object (important: id should match the uuid-format)

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'couplingId': "couplingId_example", // 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': 56, // Number | number of the page to fetch
  'size': 56, // Number | amount of objects to return per page
  'sort': "sort_example", // String | attribute to sort by (multiple separated by comma; max. 5)
  'revision': 789, // Number | last revision number, objects with a greater revision than this will be returned
  'zCount': 789, // Number | z-count of the receipt
  'minCreateTime': new Date("2013-10-20T19:20:30+01:00"), // Date | min (inclusive) create time of the receipt (ISO 8601; date, time and timezone)
  'maxCreateTime': new Date("2013-10-20T19:20:30+01:00") // Date | max (inclusive) create time of the receipt (ISO 8601; date, time and timezone)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPointOfSaleReceipts(pointOfSaleId, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String id of the related object (important: id should match the uuid-format)
koronaAccountId String account id of the korona.cloud account
couplingId 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). [optional]
page Number number of the page to fetch [optional]
size Number amount of objects to return per page [optional]
sort String attribute to sort by (multiple separated by comma; max. 5) [optional]
revision Number last revision number, objects with a greater revision than this will be returned [optional]
zCount Number z-count of the receipt [optional]
minCreateTime Date min (inclusive) create time of the receipt (ISO 8601; date, time and timezone) [optional]
maxCreateTime Date max (inclusive) create time of the receipt (ISO 8601; date, time and timezone) [optional]

Return type

ResultListReceipt

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getPointsOfSale

ResultListPos getPointsOfSale(koronaAccountId, opts)

lists all points of sale

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'page': 56, // Number | number of the page to fetch
  'size': 56, // Number | amount of objects to return per page
  'sort': "sort_example", // String | attribute to sort by (multiple separated by comma; max. 5)
  'revision': 789, // Number | last revision number, objects with a greater revision than this will be returned
  'includeDeleted': true // Boolean | indicates deleted objects should be loaded or not (default: false)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPointsOfSale(koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
koronaAccountId String account id of the korona.cloud account
page Number number of the page to fetch [optional]
size Number amount of objects to return per page [optional]
sort String attribute to sort by (multiple separated by comma; max. 5) [optional]
revision Number last revision number, objects with a greater revision than this will be returned [optional]
includeDeleted Boolean indicates deleted objects should be loaded or not (default: false) [optional]

Return type

ResultListPos

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updatePointOfSale

updatePointOfSale(pointOfSaleId, body, koronaAccountId, opts)

updates a point of sale (works only for coupling (attribute 'couplingId') or updating device information (attribute 'deviceInformation'))

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.PointsOfSaleApi();

var pointOfSaleId = "pointOfSaleId_example"; // String | id of the related object (important: id should match the uuid-format)

var body = new KoronacloudApiV3.Pos(); // Pos | the properties to update of the point of sale ('couplingId' only)

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'couplingId': "couplingId_example", // String | the coupling-id of the device (required if already coupled)
  'decouple': true // Boolean | executes uncoupling, if set to true, device will be uncoupled if point of sale is already coupled
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updatePointOfSale(pointOfSaleId, body, koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
pointOfSaleId String id of the related object (important: id should match the uuid-format)
body Pos the properties to update of the point of sale ('couplingId' only)
koronaAccountId String account id of the korona.cloud account
couplingId String the coupling-id of the device (required if already coupled) [optional]
decouple Boolean executes uncoupling, if set to true, device will be uncoupled if point of sale is already coupled [optional]

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json