Skip to content

Latest commit

 

History

History
executable file
·
137 lines (96 loc) · 4.57 KB

ReceiptsApi.md

File metadata and controls

executable file
·
137 lines (96 loc) · 4.57 KB

KoronacloudApiV3.ReceiptsApi

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

Method HTTP request Description
getReceipt GET /accounts/{koronaAccountId}/receipts/{receiptId} returns the single receipt
getReceipts GET /accounts/{koronaAccountId}/receipts lists all receipts

getReceipt

Receipt getReceipt(receiptId, koronaAccountId)

returns the single 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.ReceiptsApi();

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

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


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

Parameters

Name Type Description Notes
receiptId String id of the receipt
koronaAccountId String account id of the korona.cloud account

Return type

Receipt

Authorization

basicAuth

HTTP request headers

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

getReceipts

ResultListReceipt getReceipts(koronaAccountId, opts)

lists all 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.ReceiptsApi();

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
  'pointOfSale': "pointOfSale_example", // String | point of sale
  'organizationalUnit': "organizationalUnit_example", // String | organizational unit
  '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.getReceipts(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]
pointOfSale String point of sale [optional]
organizationalUnit String organizational unit [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