/* 
 * GK application - OmniPOS Service API
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 5.21.1-b03
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */

using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;

namespace IO.Swagger.Model
{
    /// <summary>
    /// RetailTransaction &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoRetailTransaction :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoRetailTransaction>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoRetailTransaction" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoRetailTransaction() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoRetailTransaction" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="retailTransactionTypeCode">A retailer assigned code denoting a type of RetailTransaction. .</param>
        /// <param name="tillID">The unique identifier of the till.</param>
        /// <param name="receiptDateTime">The date and time when the receipt for this transaction was printed. ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone) (required).</param>
        /// <param name="receiptPrintoutFlag">Determines whether for this sales transaction a receipt was printed  (required).</param>
        /// <param name="promotionTimestamp">The timestamp used for promotion validity checks and calculation ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="frequentShopperLostPointsCount">The number of frequent shopper points that HAD been awarded for the purchase in case the customer HAD presented a loyalty card&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(11, 3). Be aware of this and round value!.</param>
        /// <param name="retailTransactionLineItemList">list of line items.</param>
        /// <param name="retailTransactionTotalList">list of total amounts.</param>
        /// <param name="retailTransactionPromotionTriggerList">list of promotion triggers.</param>
        /// <param name="retailTransactionExternalTriggerList">list of external triggers.</param>
        /// <param name="retailTransactionCustomerList">list of customers.</param>
        /// <param name="retailTransactionCouponSummaryList">list of coupons.</param>
        /// <param name="retailTransactionPromotionPriceDerivationRuleList">list of conditions.</param>
        /// <param name="retailTransactionModifierCouponList">list of used coupons.</param>
        /// <param name="tenderAuthorizationList">terminal authorization list.</param>
        /// <param name="retailTransactionManufacturerCouponSummaryList">list of manufacturer coupons.</param>
        /// <param name="emailRequestedFlag">send receipt as mail is activated (required).</param>
        /// <param name="emailAddressLocalPart">local part of entered e-mail address.</param>
        /// <param name="emailAddressDomainPart">domain part of entered e-mail address.</param>
        /// <param name="invoicePrintoutTypeCode">invoice printout is activated.</param>
        /// <param name="invoiceNumber">number of the invoice.</param>
        /// <param name="receiptDateTimeUTC0">The UTC0 timestamp corresponding to the date and time that was printed on the receipt for this transaction. ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone) (required).</param>
        /// <param name="promotionTimestampUTC0">The UTC0 timestamp used for promotion validity checks and calculation ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone).</param>
        /// <param name="tableName">The name (identifier) for a particular table, at which customers sit to eat food purchased in a RetailTransaction. It may be a table &#39;number&#39; like &#39;10&#39; or &#39;10.1&#39; or the name of the customer party like &#39;Mr Mustermann&#39;..</param>
        /// <param name="retailTransactionGenericAttributeList">list of generic attributes being valid for the transaction.</param>
        /// <param name="retailTransactionPromotionRecommendationGroup">A status of the promotion recommendation evaluation and a list of promotions being recommended for a transaction. In order to get those promotions applied the customer would have to extend his purchase..</param>
        /// <param name="xxcustom05">Customizable information.</param>
        /// <param name="xxcustom03">Customizable information.</param>
        /// <param name="xxcustom02">Customizable information.</param>
        /// <param name="xxcustom04">Customizable information.</param>
        /// <param name="retailTransactionTaxExemptTriggerList">tax exempt data.</param>
        /// <param name="xxcustom01">Customizable information.</param>
        public ComGkSoftwareGkrApiTxpoolDtoRetailTransaction(ComGkSoftwareGkrApiTxpoolDtoRetailTransactionKey key = default(ComGkSoftwareGkrApiTxpoolDtoRetailTransactionKey), string retailTransactionTypeCode = default(string), string tillID = default(string), string receiptDateTime = default(string), bool? receiptPrintoutFlag = default(bool?), string promotionTimestamp = default(string), double? frequentShopperLostPointsCount = default(double?), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionLineItem> retailTransactionLineItemList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionLineItem>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionTotal> retailTransactionTotalList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionTotal>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionTrigger> retailTransactionPromotionTriggerList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionTrigger>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionExternalTrigger> retailTransactionExternalTriggerList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionExternalTrigger>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomer> retailTransactionCustomerList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomer>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCouponSummary> retailTransactionCouponSummaryList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCouponSummary>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionPriceDerivationRule> retailTransactionPromotionPriceDerivationRuleList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionPriceDerivationRule>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionModifierCoupon> retailTransactionModifierCouponList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionModifierCoupon>), List<ComGkSoftwareGkrApiTxpoolDtoTenderAuthorization> tenderAuthorizationList = default(List<ComGkSoftwareGkrApiTxpoolDtoTenderAuthorization>), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionManufacturerCouponSummary> retailTransactionManufacturerCouponSummaryList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionManufacturerCouponSummary>), bool? emailRequestedFlag = default(bool?), string emailAddressLocalPart = default(string), string emailAddressDomainPart = default(string), string invoicePrintoutTypeCode = default(string), string invoiceNumber = default(string), DateTime? receiptDateTimeUTC0 = default(DateTime?), DateTime? promotionTimestampUTC0 = default(DateTime?), string tableName = default(string), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionGenericAttribute> retailTransactionGenericAttributeList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionGenericAttribute>), ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionRecommendationGroup retailTransactionPromotionRecommendationGroup = default(ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionRecommendationGroup), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionTaxExemptTrigger> retailTransactionTaxExemptTriggerList = default(List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionTaxExemptTrigger>), string xxcustom01 = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiTxpoolDtoRetailTransaction and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "receiptDateTime" is required (not null)
            if (receiptDateTime == null)
            {
                throw new InvalidDataException("receiptDateTime is a required property for ComGkSoftwareGkrApiTxpoolDtoRetailTransaction and cannot be null");
            }
            else
            {
                this.ReceiptDateTime = receiptDateTime;
            }
            // to ensure "receiptPrintoutFlag" is required (not null)
            if (receiptPrintoutFlag == null)
            {
                throw new InvalidDataException("receiptPrintoutFlag is a required property for ComGkSoftwareGkrApiTxpoolDtoRetailTransaction and cannot be null");
            }
            else
            {
                this.ReceiptPrintoutFlag = receiptPrintoutFlag;
            }
            // to ensure "emailRequestedFlag" is required (not null)
            if (emailRequestedFlag == null)
            {
                throw new InvalidDataException("emailRequestedFlag is a required property for ComGkSoftwareGkrApiTxpoolDtoRetailTransaction and cannot be null");
            }
            else
            {
                this.EmailRequestedFlag = emailRequestedFlag;
            }
            // to ensure "receiptDateTimeUTC0" is required (not null)
            if (receiptDateTimeUTC0 == null)
            {
                throw new InvalidDataException("receiptDateTimeUTC0 is a required property for ComGkSoftwareGkrApiTxpoolDtoRetailTransaction and cannot be null");
            }
            else
            {
                this.ReceiptDateTimeUTC0 = receiptDateTimeUTC0;
            }
            this.RetailTransactionTypeCode = retailTransactionTypeCode;
            this.TillID = tillID;
            this.PromotionTimestamp = promotionTimestamp;
            this.FrequentShopperLostPointsCount = frequentShopperLostPointsCount;
            this.RetailTransactionLineItemList = retailTransactionLineItemList;
            this.RetailTransactionTotalList = retailTransactionTotalList;
            this.RetailTransactionPromotionTriggerList = retailTransactionPromotionTriggerList;
            this.RetailTransactionExternalTriggerList = retailTransactionExternalTriggerList;
            this.RetailTransactionCustomerList = retailTransactionCustomerList;
            this.RetailTransactionCouponSummaryList = retailTransactionCouponSummaryList;
            this.RetailTransactionPromotionPriceDerivationRuleList = retailTransactionPromotionPriceDerivationRuleList;
            this.RetailTransactionModifierCouponList = retailTransactionModifierCouponList;
            this.TenderAuthorizationList = tenderAuthorizationList;
            this.RetailTransactionManufacturerCouponSummaryList = retailTransactionManufacturerCouponSummaryList;
            this.EmailAddressLocalPart = emailAddressLocalPart;
            this.EmailAddressDomainPart = emailAddressDomainPart;
            this.InvoicePrintoutTypeCode = invoicePrintoutTypeCode;
            this.InvoiceNumber = invoiceNumber;
            this.PromotionTimestampUTC0 = promotionTimestampUTC0;
            this.TableName = tableName;
            this.RetailTransactionGenericAttributeList = retailTransactionGenericAttributeList;
            this.RetailTransactionPromotionRecommendationGroup = retailTransactionPromotionRecommendationGroup;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.RetailTransactionTaxExemptTriggerList = retailTransactionTaxExemptTriggerList;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <summary>
        /// &lt;p&gt;Getter for inner key class.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Getter for inner key class.&lt;/p&gt;</value>
        [DataMember(Name="key", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiTxpoolDtoRetailTransactionKey Key { get; set; }

        /// <summary>
        /// A retailer assigned code denoting a type of RetailTransaction. 
        /// </summary>
        /// <value>A retailer assigned code denoting a type of RetailTransaction. </value>
        [DataMember(Name="retailTransactionTypeCode", EmitDefaultValue=false)]
        public string RetailTransactionTypeCode { get; set; }

        /// <summary>
        /// The unique identifier of the till
        /// </summary>
        /// <value>The unique identifier of the till</value>
        [DataMember(Name="tillID", EmitDefaultValue=false)]
        public string TillID { get; set; }

        /// <summary>
        /// The date and time when the receipt for this transaction was printed. ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>The date and time when the receipt for this transaction was printed. ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="receiptDateTime", EmitDefaultValue=false)]
        public string ReceiptDateTime { get; set; }

        /// <summary>
        /// Determines whether for this sales transaction a receipt was printed 
        /// </summary>
        /// <value>Determines whether for this sales transaction a receipt was printed </value>
        [DataMember(Name="receiptPrintoutFlag", EmitDefaultValue=false)]
        public bool? ReceiptPrintoutFlag { get; set; }

        /// <summary>
        /// The timestamp used for promotion validity checks and calculation ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>The timestamp used for promotion validity checks and calculation ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="promotionTimestamp", EmitDefaultValue=false)]
        public string PromotionTimestamp { get; set; }

        /// <summary>
        /// The number of frequent shopper points that HAD been awarded for the purchase in case the customer HAD presented a loyalty card&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(11, 3). Be aware of this and round value!
        /// </summary>
        /// <value>The number of frequent shopper points that HAD been awarded for the purchase in case the customer HAD presented a loyalty card&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(11, 3). Be aware of this and round value!</value>
        [DataMember(Name="frequentShopperLostPointsCount", EmitDefaultValue=false)]
        public double? FrequentShopperLostPointsCount { get; set; }

        /// <summary>
        /// list of line items
        /// </summary>
        /// <value>list of line items</value>
        [DataMember(Name="retailTransactionLineItemList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionLineItem> RetailTransactionLineItemList { get; set; }

        /// <summary>
        /// list of total amounts
        /// </summary>
        /// <value>list of total amounts</value>
        [DataMember(Name="retailTransactionTotalList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionTotal> RetailTransactionTotalList { get; set; }

        /// <summary>
        /// list of promotion triggers
        /// </summary>
        /// <value>list of promotion triggers</value>
        [DataMember(Name="retailTransactionPromotionTriggerList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionTrigger> RetailTransactionPromotionTriggerList { get; set; }

        /// <summary>
        /// list of external triggers
        /// </summary>
        /// <value>list of external triggers</value>
        [DataMember(Name="retailTransactionExternalTriggerList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionExternalTrigger> RetailTransactionExternalTriggerList { get; set; }

        /// <summary>
        /// list of customers
        /// </summary>
        /// <value>list of customers</value>
        [DataMember(Name="retailTransactionCustomerList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomer> RetailTransactionCustomerList { get; set; }

        /// <summary>
        /// list of coupons
        /// </summary>
        /// <value>list of coupons</value>
        [DataMember(Name="retailTransactionCouponSummaryList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCouponSummary> RetailTransactionCouponSummaryList { get; set; }

        /// <summary>
        /// list of conditions
        /// </summary>
        /// <value>list of conditions</value>
        [DataMember(Name="retailTransactionPromotionPriceDerivationRuleList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionPriceDerivationRule> RetailTransactionPromotionPriceDerivationRuleList { get; set; }

        /// <summary>
        /// list of used coupons
        /// </summary>
        /// <value>list of used coupons</value>
        [DataMember(Name="retailTransactionModifierCouponList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionModifierCoupon> RetailTransactionModifierCouponList { get; set; }

        /// <summary>
        /// terminal authorization list
        /// </summary>
        /// <value>terminal authorization list</value>
        [DataMember(Name="tenderAuthorizationList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoTenderAuthorization> TenderAuthorizationList { get; set; }

        /// <summary>
        /// list of manufacturer coupons
        /// </summary>
        /// <value>list of manufacturer coupons</value>
        [DataMember(Name="retailTransactionManufacturerCouponSummaryList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionManufacturerCouponSummary> RetailTransactionManufacturerCouponSummaryList { get; set; }

        /// <summary>
        /// send receipt as mail is activated
        /// </summary>
        /// <value>send receipt as mail is activated</value>
        [DataMember(Name="emailRequestedFlag", EmitDefaultValue=false)]
        public bool? EmailRequestedFlag { get; set; }

        /// <summary>
        /// local part of entered e-mail address
        /// </summary>
        /// <value>local part of entered e-mail address</value>
        [DataMember(Name="emailAddressLocalPart", EmitDefaultValue=false)]
        public string EmailAddressLocalPart { get; set; }

        /// <summary>
        /// domain part of entered e-mail address
        /// </summary>
        /// <value>domain part of entered e-mail address</value>
        [DataMember(Name="emailAddressDomainPart", EmitDefaultValue=false)]
        public string EmailAddressDomainPart { get; set; }

        /// <summary>
        /// invoice printout is activated
        /// </summary>
        /// <value>invoice printout is activated</value>
        [DataMember(Name="invoicePrintoutTypeCode", EmitDefaultValue=false)]
        public string InvoicePrintoutTypeCode { get; set; }

        /// <summary>
        /// number of the invoice
        /// </summary>
        /// <value>number of the invoice</value>
        [DataMember(Name="invoiceNumber", EmitDefaultValue=false)]
        public string InvoiceNumber { get; set; }

        /// <summary>
        /// The UTC0 timestamp corresponding to the date and time that was printed on the receipt for this transaction. ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)
        /// </summary>
        /// <value>The UTC0 timestamp corresponding to the date and time that was printed on the receipt for this transaction. ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)</value>
        [DataMember(Name="receiptDateTimeUTC0", EmitDefaultValue=false)]
        public DateTime? ReceiptDateTimeUTC0 { get; set; }

        /// <summary>
        /// The UTC0 timestamp used for promotion validity checks and calculation ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)
        /// </summary>
        /// <value>The UTC0 timestamp used for promotion validity checks and calculation ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)</value>
        [DataMember(Name="promotionTimestampUTC0", EmitDefaultValue=false)]
        public DateTime? PromotionTimestampUTC0 { get; set; }

        /// <summary>
        /// The name (identifier) for a particular table, at which customers sit to eat food purchased in a RetailTransaction. It may be a table &#39;number&#39; like &#39;10&#39; or &#39;10.1&#39; or the name of the customer party like &#39;Mr Mustermann&#39;.
        /// </summary>
        /// <value>The name (identifier) for a particular table, at which customers sit to eat food purchased in a RetailTransaction. It may be a table &#39;number&#39; like &#39;10&#39; or &#39;10.1&#39; or the name of the customer party like &#39;Mr Mustermann&#39;.</value>
        [DataMember(Name="tableName", EmitDefaultValue=false)]
        public string TableName { get; set; }

        /// <summary>
        /// list of generic attributes being valid for the transaction
        /// </summary>
        /// <value>list of generic attributes being valid for the transaction</value>
        [DataMember(Name="retailTransactionGenericAttributeList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionGenericAttribute> RetailTransactionGenericAttributeList { get; set; }

        /// <summary>
        /// A status of the promotion recommendation evaluation and a list of promotions being recommended for a transaction. In order to get those promotions applied the customer would have to extend his purchase.
        /// </summary>
        /// <value>A status of the promotion recommendation evaluation and a list of promotions being recommended for a transaction. In order to get those promotions applied the customer would have to extend his purchase.</value>
        [DataMember(Name="retailTransactionPromotionRecommendationGroup", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiTxpoolDtoRetailTransactionPromotionRecommendationGroup RetailTransactionPromotionRecommendationGroup { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom03", EmitDefaultValue=false)]
        public string Xxcustom03 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom02", EmitDefaultValue=false)]
        public string Xxcustom02 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom04", EmitDefaultValue=false)]
        public string Xxcustom04 { get; set; }

        /// <summary>
        /// tax exempt data
        /// </summary>
        /// <value>tax exempt data</value>
        [DataMember(Name="retailTransactionTaxExemptTriggerList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionTaxExemptTrigger> RetailTransactionTaxExemptTriggerList { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom01", EmitDefaultValue=false)]
        public string Xxcustom01 { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class ComGkSoftwareGkrApiTxpoolDtoRetailTransaction {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  RetailTransactionTypeCode: ").Append(RetailTransactionTypeCode).Append("\n");
            sb.Append("  TillID: ").Append(TillID).Append("\n");
            sb.Append("  ReceiptDateTime: ").Append(ReceiptDateTime).Append("\n");
            sb.Append("  ReceiptPrintoutFlag: ").Append(ReceiptPrintoutFlag).Append("\n");
            sb.Append("  PromotionTimestamp: ").Append(PromotionTimestamp).Append("\n");
            sb.Append("  FrequentShopperLostPointsCount: ").Append(FrequentShopperLostPointsCount).Append("\n");
            sb.Append("  RetailTransactionLineItemList: ").Append(RetailTransactionLineItemList).Append("\n");
            sb.Append("  RetailTransactionTotalList: ").Append(RetailTransactionTotalList).Append("\n");
            sb.Append("  RetailTransactionPromotionTriggerList: ").Append(RetailTransactionPromotionTriggerList).Append("\n");
            sb.Append("  RetailTransactionExternalTriggerList: ").Append(RetailTransactionExternalTriggerList).Append("\n");
            sb.Append("  RetailTransactionCustomerList: ").Append(RetailTransactionCustomerList).Append("\n");
            sb.Append("  RetailTransactionCouponSummaryList: ").Append(RetailTransactionCouponSummaryList).Append("\n");
            sb.Append("  RetailTransactionPromotionPriceDerivationRuleList: ").Append(RetailTransactionPromotionPriceDerivationRuleList).Append("\n");
            sb.Append("  RetailTransactionModifierCouponList: ").Append(RetailTransactionModifierCouponList).Append("\n");
            sb.Append("  TenderAuthorizationList: ").Append(TenderAuthorizationList).Append("\n");
            sb.Append("  RetailTransactionManufacturerCouponSummaryList: ").Append(RetailTransactionManufacturerCouponSummaryList).Append("\n");
            sb.Append("  EmailRequestedFlag: ").Append(EmailRequestedFlag).Append("\n");
            sb.Append("  EmailAddressLocalPart: ").Append(EmailAddressLocalPart).Append("\n");
            sb.Append("  EmailAddressDomainPart: ").Append(EmailAddressDomainPart).Append("\n");
            sb.Append("  InvoicePrintoutTypeCode: ").Append(InvoicePrintoutTypeCode).Append("\n");
            sb.Append("  InvoiceNumber: ").Append(InvoiceNumber).Append("\n");
            sb.Append("  ReceiptDateTimeUTC0: ").Append(ReceiptDateTimeUTC0).Append("\n");
            sb.Append("  PromotionTimestampUTC0: ").Append(PromotionTimestampUTC0).Append("\n");
            sb.Append("  TableName: ").Append(TableName).Append("\n");
            sb.Append("  RetailTransactionGenericAttributeList: ").Append(RetailTransactionGenericAttributeList).Append("\n");
            sb.Append("  RetailTransactionPromotionRecommendationGroup: ").Append(RetailTransactionPromotionRecommendationGroup).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  Xxcustom03: ").Append(Xxcustom03).Append("\n");
            sb.Append("  Xxcustom02: ").Append(Xxcustom02).Append("\n");
            sb.Append("  Xxcustom04: ").Append(Xxcustom04).Append("\n");
            sb.Append("  RetailTransactionTaxExemptTriggerList: ").Append(RetailTransactionTaxExemptTriggerList).Append("\n");
            sb.Append("  Xxcustom01: ").Append(Xxcustom01).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }
  
        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return JsonConvert.SerializeObject(this, Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as ComGkSoftwareGkrApiTxpoolDtoRetailTransaction);
        }

        /// <summary>
        /// Returns true if ComGkSoftwareGkrApiTxpoolDtoRetailTransaction instances are equal
        /// </summary>
        /// <param name="input">Instance of ComGkSoftwareGkrApiTxpoolDtoRetailTransaction to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComGkSoftwareGkrApiTxpoolDtoRetailTransaction input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.RetailTransactionTypeCode == input.RetailTransactionTypeCode ||
                    (this.RetailTransactionTypeCode != null &&
                    this.RetailTransactionTypeCode.Equals(input.RetailTransactionTypeCode))
                ) && 
                (
                    this.TillID == input.TillID ||
                    (this.TillID != null &&
                    this.TillID.Equals(input.TillID))
                ) && 
                (
                    this.ReceiptDateTime == input.ReceiptDateTime ||
                    (this.ReceiptDateTime != null &&
                    this.ReceiptDateTime.Equals(input.ReceiptDateTime))
                ) && 
                (
                    this.ReceiptPrintoutFlag == input.ReceiptPrintoutFlag ||
                    (this.ReceiptPrintoutFlag != null &&
                    this.ReceiptPrintoutFlag.Equals(input.ReceiptPrintoutFlag))
                ) && 
                (
                    this.PromotionTimestamp == input.PromotionTimestamp ||
                    (this.PromotionTimestamp != null &&
                    this.PromotionTimestamp.Equals(input.PromotionTimestamp))
                ) && 
                (
                    this.FrequentShopperLostPointsCount == input.FrequentShopperLostPointsCount ||
                    (this.FrequentShopperLostPointsCount != null &&
                    this.FrequentShopperLostPointsCount.Equals(input.FrequentShopperLostPointsCount))
                ) && 
                (
                    this.RetailTransactionLineItemList == input.RetailTransactionLineItemList ||
                    this.RetailTransactionLineItemList != null &&
                    this.RetailTransactionLineItemList.SequenceEqual(input.RetailTransactionLineItemList)
                ) && 
                (
                    this.RetailTransactionTotalList == input.RetailTransactionTotalList ||
                    this.RetailTransactionTotalList != null &&
                    this.RetailTransactionTotalList.SequenceEqual(input.RetailTransactionTotalList)
                ) && 
                (
                    this.RetailTransactionPromotionTriggerList == input.RetailTransactionPromotionTriggerList ||
                    this.RetailTransactionPromotionTriggerList != null &&
                    this.RetailTransactionPromotionTriggerList.SequenceEqual(input.RetailTransactionPromotionTriggerList)
                ) && 
                (
                    this.RetailTransactionExternalTriggerList == input.RetailTransactionExternalTriggerList ||
                    this.RetailTransactionExternalTriggerList != null &&
                    this.RetailTransactionExternalTriggerList.SequenceEqual(input.RetailTransactionExternalTriggerList)
                ) && 
                (
                    this.RetailTransactionCustomerList == input.RetailTransactionCustomerList ||
                    this.RetailTransactionCustomerList != null &&
                    this.RetailTransactionCustomerList.SequenceEqual(input.RetailTransactionCustomerList)
                ) && 
                (
                    this.RetailTransactionCouponSummaryList == input.RetailTransactionCouponSummaryList ||
                    this.RetailTransactionCouponSummaryList != null &&
                    this.RetailTransactionCouponSummaryList.SequenceEqual(input.RetailTransactionCouponSummaryList)
                ) && 
                (
                    this.RetailTransactionPromotionPriceDerivationRuleList == input.RetailTransactionPromotionPriceDerivationRuleList ||
                    this.RetailTransactionPromotionPriceDerivationRuleList != null &&
                    this.RetailTransactionPromotionPriceDerivationRuleList.SequenceEqual(input.RetailTransactionPromotionPriceDerivationRuleList)
                ) && 
                (
                    this.RetailTransactionModifierCouponList == input.RetailTransactionModifierCouponList ||
                    this.RetailTransactionModifierCouponList != null &&
                    this.RetailTransactionModifierCouponList.SequenceEqual(input.RetailTransactionModifierCouponList)
                ) && 
                (
                    this.TenderAuthorizationList == input.TenderAuthorizationList ||
                    this.TenderAuthorizationList != null &&
                    this.TenderAuthorizationList.SequenceEqual(input.TenderAuthorizationList)
                ) && 
                (
                    this.RetailTransactionManufacturerCouponSummaryList == input.RetailTransactionManufacturerCouponSummaryList ||
                    this.RetailTransactionManufacturerCouponSummaryList != null &&
                    this.RetailTransactionManufacturerCouponSummaryList.SequenceEqual(input.RetailTransactionManufacturerCouponSummaryList)
                ) && 
                (
                    this.EmailRequestedFlag == input.EmailRequestedFlag ||
                    (this.EmailRequestedFlag != null &&
                    this.EmailRequestedFlag.Equals(input.EmailRequestedFlag))
                ) && 
                (
                    this.EmailAddressLocalPart == input.EmailAddressLocalPart ||
                    (this.EmailAddressLocalPart != null &&
                    this.EmailAddressLocalPart.Equals(input.EmailAddressLocalPart))
                ) && 
                (
                    this.EmailAddressDomainPart == input.EmailAddressDomainPart ||
                    (this.EmailAddressDomainPart != null &&
                    this.EmailAddressDomainPart.Equals(input.EmailAddressDomainPart))
                ) && 
                (
                    this.InvoicePrintoutTypeCode == input.InvoicePrintoutTypeCode ||
                    (this.InvoicePrintoutTypeCode != null &&
                    this.InvoicePrintoutTypeCode.Equals(input.InvoicePrintoutTypeCode))
                ) && 
                (
                    this.InvoiceNumber == input.InvoiceNumber ||
                    (this.InvoiceNumber != null &&
                    this.InvoiceNumber.Equals(input.InvoiceNumber))
                ) && 
                (
                    this.ReceiptDateTimeUTC0 == input.ReceiptDateTimeUTC0 ||
                    (this.ReceiptDateTimeUTC0 != null &&
                    this.ReceiptDateTimeUTC0.Equals(input.ReceiptDateTimeUTC0))
                ) && 
                (
                    this.PromotionTimestampUTC0 == input.PromotionTimestampUTC0 ||
                    (this.PromotionTimestampUTC0 != null &&
                    this.PromotionTimestampUTC0.Equals(input.PromotionTimestampUTC0))
                ) && 
                (
                    this.TableName == input.TableName ||
                    (this.TableName != null &&
                    this.TableName.Equals(input.TableName))
                ) && 
                (
                    this.RetailTransactionGenericAttributeList == input.RetailTransactionGenericAttributeList ||
                    this.RetailTransactionGenericAttributeList != null &&
                    this.RetailTransactionGenericAttributeList.SequenceEqual(input.RetailTransactionGenericAttributeList)
                ) && 
                (
                    this.RetailTransactionPromotionRecommendationGroup == input.RetailTransactionPromotionRecommendationGroup ||
                    (this.RetailTransactionPromotionRecommendationGroup != null &&
                    this.RetailTransactionPromotionRecommendationGroup.Equals(input.RetailTransactionPromotionRecommendationGroup))
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.Xxcustom03 == input.Xxcustom03 ||
                    (this.Xxcustom03 != null &&
                    this.Xxcustom03.Equals(input.Xxcustom03))
                ) && 
                (
                    this.Xxcustom02 == input.Xxcustom02 ||
                    (this.Xxcustom02 != null &&
                    this.Xxcustom02.Equals(input.Xxcustom02))
                ) && 
                (
                    this.Xxcustom04 == input.Xxcustom04 ||
                    (this.Xxcustom04 != null &&
                    this.Xxcustom04.Equals(input.Xxcustom04))
                ) && 
                (
                    this.RetailTransactionTaxExemptTriggerList == input.RetailTransactionTaxExemptTriggerList ||
                    this.RetailTransactionTaxExemptTriggerList != null &&
                    this.RetailTransactionTaxExemptTriggerList.SequenceEqual(input.RetailTransactionTaxExemptTriggerList)
                ) && 
                (
                    this.Xxcustom01 == input.Xxcustom01 ||
                    (this.Xxcustom01 != null &&
                    this.Xxcustom01.Equals(input.Xxcustom01))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.Key != null)
                    hashCode = hashCode * 59 + this.Key.GetHashCode();
                if (this.RetailTransactionTypeCode != null)
                    hashCode = hashCode * 59 + this.RetailTransactionTypeCode.GetHashCode();
                if (this.TillID != null)
                    hashCode = hashCode * 59 + this.TillID.GetHashCode();
                if (this.ReceiptDateTime != null)
                    hashCode = hashCode * 59 + this.ReceiptDateTime.GetHashCode();
                if (this.ReceiptPrintoutFlag != null)
                    hashCode = hashCode * 59 + this.ReceiptPrintoutFlag.GetHashCode();
                if (this.PromotionTimestamp != null)
                    hashCode = hashCode * 59 + this.PromotionTimestamp.GetHashCode();
                if (this.FrequentShopperLostPointsCount != null)
                    hashCode = hashCode * 59 + this.FrequentShopperLostPointsCount.GetHashCode();
                if (this.RetailTransactionLineItemList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionLineItemList.GetHashCode();
                if (this.RetailTransactionTotalList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionTotalList.GetHashCode();
                if (this.RetailTransactionPromotionTriggerList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionPromotionTriggerList.GetHashCode();
                if (this.RetailTransactionExternalTriggerList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionExternalTriggerList.GetHashCode();
                if (this.RetailTransactionCustomerList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionCustomerList.GetHashCode();
                if (this.RetailTransactionCouponSummaryList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionCouponSummaryList.GetHashCode();
                if (this.RetailTransactionPromotionPriceDerivationRuleList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionPromotionPriceDerivationRuleList.GetHashCode();
                if (this.RetailTransactionModifierCouponList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionModifierCouponList.GetHashCode();
                if (this.TenderAuthorizationList != null)
                    hashCode = hashCode * 59 + this.TenderAuthorizationList.GetHashCode();
                if (this.RetailTransactionManufacturerCouponSummaryList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionManufacturerCouponSummaryList.GetHashCode();
                if (this.EmailRequestedFlag != null)
                    hashCode = hashCode * 59 + this.EmailRequestedFlag.GetHashCode();
                if (this.EmailAddressLocalPart != null)
                    hashCode = hashCode * 59 + this.EmailAddressLocalPart.GetHashCode();
                if (this.EmailAddressDomainPart != null)
                    hashCode = hashCode * 59 + this.EmailAddressDomainPart.GetHashCode();
                if (this.InvoicePrintoutTypeCode != null)
                    hashCode = hashCode * 59 + this.InvoicePrintoutTypeCode.GetHashCode();
                if (this.InvoiceNumber != null)
                    hashCode = hashCode * 59 + this.InvoiceNumber.GetHashCode();
                if (this.ReceiptDateTimeUTC0 != null)
                    hashCode = hashCode * 59 + this.ReceiptDateTimeUTC0.GetHashCode();
                if (this.PromotionTimestampUTC0 != null)
                    hashCode = hashCode * 59 + this.PromotionTimestampUTC0.GetHashCode();
                if (this.TableName != null)
                    hashCode = hashCode * 59 + this.TableName.GetHashCode();
                if (this.RetailTransactionGenericAttributeList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionGenericAttributeList.GetHashCode();
                if (this.RetailTransactionPromotionRecommendationGroup != null)
                    hashCode = hashCode * 59 + this.RetailTransactionPromotionRecommendationGroup.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.Xxcustom03 != null)
                    hashCode = hashCode * 59 + this.Xxcustom03.GetHashCode();
                if (this.Xxcustom02 != null)
                    hashCode = hashCode * 59 + this.Xxcustom02.GetHashCode();
                if (this.Xxcustom04 != null)
                    hashCode = hashCode * 59 + this.Xxcustom04.GetHashCode();
                if (this.RetailTransactionTaxExemptTriggerList != null)
                    hashCode = hashCode * 59 + this.RetailTransactionTaxExemptTriggerList.GetHashCode();
                if (this.Xxcustom01 != null)
                    hashCode = hashCode * 59 + this.Xxcustom01.GetHashCode();
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
