Class: Pos

Pos

App Enablement class for all functionalities related to GK POS like getting single item information, registering items, getting the current transaction

new Pos()

Since:
  • 2.0.0
Author:
  • sschreiner

Members


<static> createAddAdditionalTransactionReportRequest

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a request object for the function 'setAdditionalTransactionReport'

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createAddTransactionExtensionRequest

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a request object for the function 'addTransactionExtension'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createCancelCurrentTransactionRequest

*This function contains parameters that are a non-recommended interface and is therefore potentially subject to change in future releases. This function will create a request object for the function 'cancelCurrentTransaction'.

Since:
  • 2.1.0
Author:
  • mwessel (Last modified by: mwessel)

<static> createCancelCurrentTransactionRequest

*This function contains parameters that are a non-recommended interface and is therefore potentially subject to change in future releases. This function will create a request object for the function 'cancelCurrentTransaction'.

Since:
  • 2.0.0
Deprecated:
  • since version 2.1.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createDeleteTransactionExtensionRequest

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a request object for the function 'deleteTransactionExtension'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createEnterCouponRequest

This function will create a request object for the function 'enterCoupon'.

Since:
  • 2.1.0
Author:
  • nmankel (Last modified by: nmankel)

<static> createLineItemExtensionObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createPrintAdditionalLineItemTextLineObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerLineItem' and 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createRegisterCustomerRequest

*This function contains parameters that are a non-recommended interface and is therefore potentially subject to change in future releases. This function will create a request object for the function 'registerCustomer'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createRegisterExternalLineItemRequest

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createRetailPriceModifierObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createRetailTransactionLineItemAdditionalParameterObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createRetailTransactionLineItemI18NTextObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createRetailTransactionPriceDerivationRuleObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createSaleReturnLineItemCharacteristicObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createSaleReturnLineItemMerchandiseHierarchyGroupObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createSaleReturnLineItemPromotionTriggerObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createSaleReturnLineItemSalesOrderObject

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a sub-request object for the function 'registerExternalLineItem'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createUpdateTransactionExtensionRequest

*This function is a non-recommended interface and is potentially subject to change in future releases. This function will create a request object for the function 'updateTransactionExtension'.

Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

Methods


<static> addAdditionalTransactionReport(sResultFunction, sErrorFunction, oAdditionalTransactionReportRequest)

*This function is a non-recommended interface and is potentially subject to change in future releases. The function allows to set an additional report in the transaction for printing.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oAdditionalTransactionReportRequest string stringified object from the createAddAdditionalTransactionReportRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> addTransactionExtension(sResultFunction, sErrorFunction, oAddTransactionExtensionRequest)

*This function is a non-recommended interface and is potentially subject to change in future releases. The function allows to create extension data in the transaction of the POS,

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oAddTransactionExtensionRequest string stringified object from the createAddTransactionExtensionRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> cancelCurrentTransaction(sResultFunction, sErrorFunction, oCancelCurrentTransactionRequest)

*This function contains parameters that are a non-recommended interface and is therefore potentially subject to change in future releases. This function allows to cancel the current transaction in the POS.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oCancelCurrentTransactionRequest string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases. stringified object from the createCancelCurrentTransactionRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> createGetPOSItemInformationByIDRequest(sItemID)

This function will create a request object for the function 'getPOSItemInformationByID'.

Parameters:
Name Type Description
sItemID string Item ID to get the item information for GK POS items.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)
Returns:
(String) Returns a stringifi+ed Object for the getPOSItemInformationByID request.

<static> createRegisterLineItemRequest(sItemID, oContext, iQuantity, iActualUnitPrice, sCustomerOrderID, sCustomerOrderSequenceNumber, sSalesOrderTypeCode, sSalesOrderDeliveryTypeCode, sRequestedDeliveryDate, sItemType, aRetailPriceModifierList, aLineItemExtensionList, aPrintAdditionalLineItemTextLineList)

*This function contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases. This function will create a request object for the function 'registerLineItem'.

Parameters:
Name Type Description
sItemID string Item ID to get the item information for GK POS items.
oContext string Provides the session context. For example currency, language. Data type is string but internal data type is Object. The internally used object should look like the following example: { businessUnitGroupID: "100000000000000001", businessUnitID: "9090", // Equivalent to store ID isoCurrencyCode: "USD", storeLanguage: "en_US", tenantID: "004", userLanguage: "zh_CN", workstationID: "107" }
iQuantity integer *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
iActualUnitPrice integer *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
sCustomerOrderID string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
sCustomerOrderSequenceNumber string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
sSalesOrderTypeCode string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
sSalesOrderDeliveryTypeCode string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
sRequestedDeliveryDate string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
sItemType string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
aRetailPriceModifierList Array.<Object> *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
aLineItemExtensionList Array.<Object> *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
aPrintAdditionalLineItemTextLineList Array.<Object> *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)
Returns:
(String) Returns a stringified object for the registerLineItem request.

<static> deleteTransactionExtension(sResultFunction, sErrorFunction, oDeleteTransactionExtensionRequest)

*This function is a non-recommended interface and is potentially subject to change in future releases. The function allows to delete extension data in the transaction of the POS,

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oDeleteTransactionExtensionRequest string stringified object from the createDeleteTransactionExtensionRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> enterCoupon(sResultFunction, sErrorFunction, oEnterCouponRequest)

This function allows to enter a coupon within the current transaction in the POS.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oEnterCouponRequest string This object is a stringified object from the createEnterCouponRequest.
Since:
  • 2.1.0
Author:
  • nmankel (Last modified by: nmankel)

<static> getCurrentTransaction(sResultFunction, sErrorFunction)

This function will return the current GK Pos transaction

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> getCurrentTransaction(sResultFunction, sErrorFunction)

This function will return the current customer list of the current GK Pos transaction

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> getLastNotVoidedTransaction(sResultFunction, sErrorFunction)

This function will return the last not voided transaction.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
Since:
  • 5.6.1
Author:
  • mfedorenko (Last modified by: mfedorenko)

<static> getPOSItemInformationByID(sResultFunction, sErrorFunction, oGetPOSItemInformationByIDRequest)

This function will provide GK Pos item information for a given item ID.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oGetPOSItemInformationByIDRequest string stringified object from the createGetPOSItemInformationByIDRequest. Data type is string but internal data type is Object. The internally used object should look like the following example: { itemID: "030039" }
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> onLineItemRegistrationFinished()

This function signals the host implementation that LineItem registrations have been completed.

Since:
  • 5.6.1
Author:
  • jsaade (Last modified by: jsaade)

<static> printReport(sResultFunction, sErrorFunction, the)

This function will print the given transaction.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
the Array.<Object> transaction to print
Since:
  • 5.6.1
Author:
  • mfedorenko (Last modified by: mfedorenko)

<static> registerCustomer(sResultFunction, sErrorFunction, oRegisterCustomerRequest)

*This function contains parameters that are a non-recommended interface and is therefore potentially subject to change in future releases. This function allows to register a customer within the current transaction in the POS.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oRegisterCustomerRequest string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases. This object is a stringified object from the createRegisterCustomerRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> registerExternalLineItem(sResultFunction, sErrorFunction, oRegisterExternalLineItemRequest)

*This function is a non-recommended interface and is potentially subject to change in future releases. The function allows to propagate an ExternalRegisterLineItemRequest directly into POS, while specifying directly all relevant item data,

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oRegisterExternalLineItemRequest string stringified object from the createRegisterExternalLineItemRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> registerLineItem(sResultFunction, sErrorFunction, oRegisterLineItemRequest)

*This function contains parameters that are a non-recommended interface and is therefore potentially subject to change in future releases. This function will register a GK Pos item in the current transaction of the Pos

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oRegisterLineItemRequest string *This object parameter contains parameter that are a non-recommended interface and is therefore potentially subject to change in future releases. stringified object from the createRegisterCustomerRequest. stringified object from the createRegisterLineItemRequest. Data type is string but internal data type is Object. The internally used object should look like the following example: { itemID: "030039", language: "en_US", isoCurrencyCode: "USD", quantity: 1 }
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)

<static> updateTransactionExtension(sResultFunction, sErrorFunction, oUpdateTransactionExtensionRequest)

*This function is a non-recommended interface and is potentially subject to change in future releases. The function allows to update extension data in the transaction of the POS,

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oUpdateTransactionExtensionRequest string stringified object from the createUpdateTransactionExtensionRequest.
Since:
  • 2.0.0
Author:
  • sschreiner (Last modified by: sschreiner)