public static RiskV1DecisionsPost201Response Run()
        {
            string clientReferenceInformationCode = "54323007";
            Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(
                Code: clientReferenceInformationCode
                );

            string paymentInformationCardNumber          = "4444444444444448";
            string paymentInformationCardExpirationMonth = "12";
            string paymentInformationCardExpirationYear  = "2020";
            Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(
                Number: paymentInformationCardNumber,
                ExpirationMonth: paymentInformationCardExpirationMonth,
                ExpirationYear: paymentInformationCardExpirationYear
                );

            Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(
                Card: paymentInformationCard
                );

            string orderInformationAmountDetailsCurrency    = "USD";
            string orderInformationAmountDetailsTotalAmount = "144.14";
            Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(
                Currency: orderInformationAmountDetailsCurrency,
                TotalAmount: orderInformationAmountDetailsTotalAmount
                );

            string orderInformationBillToAddress1           = "96, powers street";
            string orderInformationBillToAdministrativeArea = "NH";
            string orderInformationBillToCountry            = "US";
            string orderInformationBillToLocality           = "Clearwater milford";
            string orderInformationBillToFirstName          = "James";
            string orderInformationBillToLastName           = "Smith";
            string orderInformationBillToPhoneNumber        = "7606160717";
            string orderInformationBillToEmail      = "*****@*****.**";
            string orderInformationBillToPostalCode = "03055";
            Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(
                Address1: orderInformationBillToAddress1,
                AdministrativeArea: orderInformationBillToAdministrativeArea,
                Country: orderInformationBillToCountry,
                Locality: orderInformationBillToLocality,
                FirstName: orderInformationBillToFirstName,
                LastName: orderInformationBillToLastName,
                PhoneNumber: orderInformationBillToPhoneNumber,
                Email: orderInformationBillToEmail,
                PostalCode: orderInformationBillToPostalCode
                );

            Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(
                AmountDetails: orderInformationAmountDetails,
                BillTo: orderInformationBillTo
                );

            string travelInformationCompleteRoute = "SFO-JFK:JFK-BLR";
            string travelInformationDepartureTime = "2011-03-20 11:30pm GMT";
            string travelInformationJourneyType   = "One way";

            List <Riskv1decisionsTravelInformationLegs> travelInformationLegs = new List <Riskv1decisionsTravelInformationLegs>();
            string travelInformationLegsOrigination1 = "SFO";
            string travelInformationLegsDestination1 = "JFK";

            travelInformationLegs.Add(new Riskv1decisionsTravelInformationLegs(
                                          Origination: travelInformationLegsOrigination1,
                                          Destination: travelInformationLegsDestination1
                                          ));

            string travelInformationLegsOrigination2 = "JFK";
            string travelInformationLegsDestination2 = "BLR";

            travelInformationLegs.Add(new Riskv1decisionsTravelInformationLegs(
                                          Origination: travelInformationLegsOrigination2,
                                          Destination: travelInformationLegsDestination2
                                          ));

            Riskv1decisionsTravelInformation travelInformation = new Riskv1decisionsTravelInformation(
                CompleteRoute: travelInformationCompleteRoute,
                DepartureTime: travelInformationDepartureTime,
                JourneyType: travelInformationJourneyType,
                Legs: travelInformationLegs
                );

            var requestObj = new CreateBundledDecisionManagerCaseRequest(
                ClientReferenceInformation: clientReferenceInformation,
                PaymentInformation: paymentInformation,
                OrderInformation: orderInformation,
                TravelInformation: travelInformation
                );

            try
            {
                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);

                var apiInstance = new DecisionManagerApi(clientConfig);
                RiskV1DecisionsPost201Response result = apiInstance.CreateBundledDecisionManagerCase(requestObj);
                Console.WriteLine(result);
                return(result);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API : " + e.Message);
                return(null);
            }
        }
        public static RiskV1DecisionsPost201Response Run()
        {
            var requestObj = new CreateDecisionManagerCaseRequest();

            var clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();

            clientReferenceInformation.Code       = "54323007";
            requestObj.ClientReferenceInformation = clientReferenceInformation;

            var paymentInformation = new Riskv1decisionsPaymentInformation();

            var card = new Riskv1decisionsPaymentInformationCard();

            card.Number             = "4444444444444448";
            card.ExpirationMonth    = "12";
            card.ExpirationYear     = "2020";
            paymentInformation.Card = card;

            requestObj.PaymentInformation = paymentInformation;

            var orderInformation = new Riskv1decisionsOrderInformation();

            var amountDetails = new Riskv1decisionsOrderInformationAmountDetails("USD");

            amountDetails.Currency         = "USD";
            amountDetails.TotalAmount      = "144.14";
            orderInformation.AmountDetails = amountDetails;

            var billTo = new Riskv1decisionsOrderInformationBillTo();

            billTo.Address1           = "96, powers street";
            billTo.AdministrativeArea = "NH";
            billTo.Country            = "US";
            billTo.Locality           = "Clearwater milford";
            billTo.FirstName          = "James";
            billTo.LastName           = "Smith";
            billTo.PhoneNumber        = "7606160717";
            billTo.Email            = "*****@*****.**";
            billTo.PostalCode       = "03055";
            orderInformation.BillTo = billTo;

            requestObj.OrderInformation = orderInformation;

            var travelInformation = new Riskv1decisionsTravelInformation();

            travelInformation.CompleteRoute = "SFO-JFK:JFK-BLR";
            travelInformation.DepartureTime = "2011-03-20 11:30pm GMT";
            travelInformation.JourneyType   = "One way";
            var legs = new List <Riskv1decisionsTravelInformationLegs>();

            var legs0 = new Riskv1decisionsTravelInformationLegs();

            legs0.Origination = "SFO";
            legs0.Destination = "JFK";
            legs.Add(legs0);

            var legs1 = new Riskv1decisionsTravelInformationLegs();

            legs1.Origination = "JFK";
            legs1.Destination = "BLR";
            legs.Add(legs1);

            travelInformation.Legs = legs;

            requestObj.TravelInformation = travelInformation;

            try
            {
                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);
                var apiInstance      = new DecisionManagerApi(clientConfig);

                var result = apiInstance.CreateDecisionManagerCase(requestObj);
                Console.WriteLine(result);
                return(result);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API : " + e.Message);
                return(null);
            }
        }