コード例 #1
0
        public Pricing(JToken jPricing)
            : this()
        {
            JToken[] jFares = jPricing["fare"].ToArray();
            JToken[] jSegmentPricings = jPricing["segmentPricing"].ToArray();
            JToken jPassengers = jPricing["passengers"];
            JToken[] jTaxes = jPricing["tax"].ToArray();

            Kind = (string)jPricing["kind"];
            SaleFareTotal = (string)jPricing["saleFareTotal"];
            SaleTaxTotal = (string)jPricing["saleTaxTotal"];
            SaleTotal = (string)jPricing["saleTotal"];
            FareCalculation = (string)jPricing["fareCalculation"];
            LatestTicketingTime = (string)jPricing["latestTicketingTime"];
            Ptc = (string)jPricing["ptc"];
            Refundable = (bool)jPricing["refundable"];

            foreach (var jFare in jFares)
            {
                Fare.Add(new Fare(jFare));
            }

            foreach (var jSegmentPricing in jSegmentPricings)
            {
                SegmentPricing.Add(new SegmentPricing(jSegmentPricing));
            }

            Passengers = new Passengers(jPassengers);

            foreach (var jTax in jTaxes)
            {
                Tax.Add(new Tax(jTax));
            }
        }
コード例 #2
0
 public Pricing()
 {
     Kind = "qpxexpress#pricingInfo";
     Fare = new List<Fare>();
     SegmentPricing = new List<SegmentPricing>();
     Passengers = new Passengers();
     Tax = new List<Tax>();
 }
コード例 #3
0
 public Pricing(
     string kind, string saleFareTotal, string saleTaxTotal, string saleTotal,
     string fareCalculation, string latestTicketingTime, string ptc,
     bool refundable, List<Fare> fare,
     List<SegmentPricing> segmentPricing,
     Passengers passengers, List<Tax> tax)
     : this()
 {
     Kind = kind;
     SaleFareTotal = saleFareTotal;
     SaleTaxTotal = saleTaxTotal;
     SaleTotal = saleTotal;
     FareCalculation = fareCalculation;
     LatestTicketingTime = latestTicketingTime;
     Ptc = ptc;
     Refundable = refundable;
     Fare = fare;
     SegmentPricing = segmentPricing;
     Passengers = passengers;
     Tax = tax;
 }