예제 #1
0
        public static string SerializeJson(GeoITDPurchaseRequest purchaseReq_)
        {
            string retVal = "";

            retVal = JsonSerializer.Serialize <GeoITDPurchaseRequest>(purchaseReq_, SerializerOptions.Options);
            return(retVal);
        }
예제 #2
0
        public static PurchaseRefundRequest ToPurchaseRefundRequest(GeoITDPurchaseRequest src_)
        {
            PurchaseRefundRequest retVal = new PurchaseRefundRequest();

            try
            {
                retVal = new PurchaseRefundRequest()
                {
                    PosID       = src_.PosID,
                    SystemId    = src_.SystemID,
                    Branch      = src_.Branch,
                    ClientAppId = src_.ClientAppId,
                    UserId      = src_.UserId,
                    OriginalTransactionDateyyMMdd = src_.OriginalTransactionDate,
                    TicketNumber  = src_.OriginalTicket,
                    Amount        = src_.Amount,
                    Quotas        = src_.Installment,
                    Plan          = src_.Plan,
                    Currency      = src_.Currency,
                    TaxRefund     = src_.TaxRefund,
                    TaxableAmount = src_.TaxableAmount,
                    InvoiceAmount = src_.InvoiceAmount,
                    InvoiceNumber = src_.InvoiceNumber,
                };
            }
            catch
            {
            }

            return(retVal);
        }
예제 #3
0
        public static GeoITDPurchaseRequest DeserializeJson(string jsonString_)
        {
            GeoITDPurchaseRequest retVal = null;

            if (jsonString_ != null)
            {
                retVal = JsonSerializer.Deserialize <GeoITDPurchaseRequest>(jsonString_);
                retVal.NormalizeStrings();
            }

            return(retVal);
        }
예제 #4
0
        public static PurchaseVoidRequest ToPurchaseVoidRequest(GeoITDPurchaseRequest src_)
        {
            PurchaseVoidRequest retVal = new PurchaseVoidRequest();

            try
            {
                retVal = new PurchaseVoidRequest()
                {
                    PosID        = src_.PosID,
                    SystemId     = src_.SystemID,
                    Branch       = src_.Branch,
                    ClientAppId  = src_.ClientAppId,
                    UserId       = src_.UserId,
                    TicketNumber = src_.OriginalTicket,
                };
            }
            catch
            {
            }

            return(retVal);
        }