/// <summary>
            /// Charge and unlock gift card.
            /// </summary>
            /// <param name="giftCardId">Gift card identifier.</param>
            /// <param name="amount">Amount to pay.</param>
            /// <param name="paymentCurrencyCode">Currency code to use for payment.</param>
            /// <param name="channelId">Channel identifier.</param>
            /// <param name="terminalId">Terminal identifier.</param>
            /// <param name="staffId">Staff identifier.</param>
            /// <param name="transactionId">Transaction identifier.</param>
            /// <param name="receiptId">Receipt identifier.</param>
            /// <param name="cardCurrencyCode">Currency code of the gift card.</param>
            /// <param name="balance">New gift card balance.</param>
            public void PayGiftCard(
                string giftCardId,
                decimal amount,
                string paymentCurrencyCode,
                long channelId,
                string terminalId,
                string staffId,
                string transactionId,
                string receiptId,
                out string cardCurrencyCode,
                out decimal balance)
            {
                ThrowIf.NullOrWhiteSpace(giftCardId, "giftCardId");
                ThrowIf.Null(paymentCurrencyCode, "paymentCurrencyCode");
                ThrowIf.Null(terminalId, "terminalId");
                ThrowIf.Null(staffId, "staffId");
                ThrowIf.Null(transactionId, "transactionId");
                ThrowIf.Null(receiptId, "receiptId");

                if (channelId <= 0)
                {
                    throw new ArgumentOutOfRangeException("channelId", "A valid channel identifier must be specified.");
                }

                DateTimeOffset timeStamp  = this.context.GetNowInChannelTimeZone();
                string         dateString = SerializationHelper.ConvertDateTimeToAXDateString(timeStamp, AxDateSequence);
                string         timeString = SerializationHelper.ConvertDateTimeToAXTimeString(timeStamp);

                object[] parameters =
                {
                    giftCardId,
                    string.Empty,       // Store is replaced by Channel id. Prameter is left for N-1 support.
                    terminalId,
                    staffId,
                    transactionId,
                    receiptId,
                    paymentCurrencyCode,
                    amount,
                    dateString,
                    timeString,
                    AxDateSequence,
                    channelId
                };

                var data = this.InvokeMethod(
                    GiftCardPaymentMethodName,
                    parameters);

                // Parse response data
                cardCurrencyCode = (string)data[0];
                balance          = (decimal)data[1];
            }
            /// <summary>
            /// Add funds to gift card.
            /// </summary>
            /// <param name="giftCardId">Gift card identifier.</param>
            /// <param name="amount">Amount to deposit.</param>
            /// <param name="depositCurrencyCode">Currency code to use for deposit.</param>
            /// <param name="channelId">Channel identifier.</param>
            /// <param name="terminalId">Terminal identifier.</param>
            /// <param name="staffId">Staff identifier.</param>
            /// <param name="transactionId">Transaction identifier.</param>
            /// <param name="receiptId">Receipt identifier.</param>
            /// <param name="cardCurrencyCode">Currency code of the gift card.</param>
            /// <param name="balance">New gift card balance.</param>
            public void AddToGiftCard(
                string giftCardId,
                decimal amount,
                string depositCurrencyCode,
                long channelId,
                string terminalId,
                string staffId,
                string transactionId,
                string receiptId,
                out string cardCurrencyCode,
                out decimal balance)
            {
                ThrowIf.NullOrWhiteSpace(giftCardId, "giftCardId");
                ThrowIf.Null(terminalId, "terminalId");
                ThrowIf.Null(staffId, "staffId");
                ThrowIf.Null(terminalId, "transactionId");
                ThrowIf.Null(terminalId, "receiptId");

                DateTime timeStamp  = this.context.GetNowInChannelTimeZone().DateTime;
                string   dateString = SerializationHelper.ConvertDateTimeToAXDateString(timeStamp, AxDateSequence);
                string   timeString = SerializationHelper.ConvertDateTimeToAXTimeString(timeStamp);

                object[] parameters =
                {
                    giftCardId,
                    string.Empty,       // Store is replaced by Channel id. Prameter is left for N-1 support.
                    terminalId,
                    staffId,
                    transactionId,
                    receiptId,
                    depositCurrencyCode,
                    amount,
                    dateString,
                    timeString,
                    AxDateSequence,
                    channelId
                };

                var serviceResponse = this.InvokeMethod(
                    AddToGiftCardMethodName,
                    parameters);

                // Parse response data
                cardCurrencyCode = (string)serviceResponse[0];
                balance          = (decimal)serviceResponse[1];
            }
            /// <summary>
            /// Issue new credit memo.
            /// </summary>
            /// <param name="storeId">Store identifier.</param>
            /// <param name="terminalId">Terminal identifier.</param>
            /// <param name="staffId">Staff identifier.</param>
            /// <param name="transactionId">Transaction identifier.</param>
            /// <param name="receiptId">Receipt identifier.</param>
            /// <param name="currencyCode">Currency code.</param>
            /// <param name="amount">Amount of the credit memo.</param>
            /// <returns>Identifier of issued credit memo.</returns>
            public string IssueCreditMemo(
                string storeId,
                string terminalId,
                string staffId,
                string transactionId,
                string receiptId,
                string currencyCode,
                decimal amount)
            {
                ThrowIf.Null(storeId, "storeId");
                ThrowIf.Null(terminalId, "terminalId");
                ThrowIf.Null(staffId, "staffId");
                ThrowIf.Null(receiptId, "receiptId");
                ThrowIf.Null(transactionId, "transactionId");
                ThrowIf.Null(currencyCode, "currencyCode");

                DateTime timeStamp  = this.context.GetNowInChannelTimeZone().DateTime;
                string   dateString = SerializationHelper.ConvertDateTimeToAXDateString(timeStamp, AxDateSequence);
                string   timeString = SerializationHelper.ConvertDateTimeToAXTimeString(timeStamp);

                object[] parameters =
                {
                    storeId,
                    terminalId,
                    staffId,
                    transactionId,
                    receiptId,
                    "1", // LineNum parameter, EPOS always passing hardcoded "1" value.
                    currencyCode,
                    amount,
                    dateString,
                    timeString,
                    AxDateSequence
                };

                var serviceResponse = this.InvokeMethod(
                    IssueCreditMemoMethodName,
                    parameters);

                // Parse response data
                string creditMemoId = (string)serviceResponse[0];

                return(creditMemoId);
            }
            /// <summary>
            /// Pay with credit memo.
            /// </summary>
            /// <param name="creditMemoId">Identifier of issued credit memo.</param>
            /// <param name="storeId">Store identifier.</param>
            /// <param name="terminalId">Terminal identifier.</param>
            /// <param name="staffId">Staff identifier.</param>
            /// <param name="transactionId">Transaction identifier.</param>
            /// <param name="receiptId">Receipt identifier.</param>
            /// <param name="currencyCode">Currency code.</param>
            /// <param name="amount">Amount of the credit memo.</param>
            public void PayCreditMemo(
                string creditMemoId,
                string storeId,
                string terminalId,
                string staffId,
                string transactionId,
                string receiptId,
                string currencyCode,
                decimal amount)
            {
                ThrowIf.NullOrWhiteSpace(creditMemoId, "creditMemoId");
                ThrowIf.Null(storeId, "storeId");
                ThrowIf.Null(terminalId, "terminalId");
                ThrowIf.Null(staffId, "staffId");
                ThrowIf.Null(transactionId, "transactionId");
                ThrowIf.Null(receiptId, "receiptId");
                ThrowIf.Null(currencyCode, "currencyCode");

                DateTime timeStamp  = this.context.GetNowInChannelTimeZone().DateTime;
                string   dateString = SerializationHelper.ConvertDateTimeToAXDateString(timeStamp, AxDateSequence);
                string   timeString = SerializationHelper.ConvertDateTimeToAXTimeString(timeStamp);

                object[] parameters =
                {
                    creditMemoId,
                    storeId,
                    terminalId,
                    staffId,
                    transactionId,
                    receiptId,
                    "1", // LineNum parameter, EPOS always passing hardcoded "1" value.
                    amount,
                    dateString,
                    timeString,
                    AxDateSequence
                };

                this.InvokeMethodNoDataReturn(
                    UpdateCreditMemoMethodName,
                    parameters);
            }