Ejemplo n.º 1
0
        public void makeCall()
        {
            CallcreditBsbAndCreditReport apiProxy = InitializeApiProxy();

            UserInfo            user      = InitializeUser();
            CT_SearchDefinition apiSD     = InitializeApiRequest(user);
            CT_SearchResult     apiresult = new CT_SearchResult();

            apiresult = apiProxy.Search07a(apiSD);
            apiProxy.Dispose();
        }
Ejemplo n.º 2
0
        public CallCreditGetData(CT_searchapplicant searchApplicant)
        {
            try {
                apiProxy = InitializeApiProxy();

                apiSD = InitializeApiRequest(searchApplicant);
            } catch (Exception e) {
                Console.WriteLine(e);
                //throw;
            }
        }
Ejemplo n.º 3
0
        private CT_SearchDefinition InitializeApiRequest(UserInfo user)
        {
            CT_SearchDefinition searchDef = new CT_SearchDefinition();

            CT_searchrequest srequest = new CT_searchrequest();

            srequest.purpose            = "DS";
            srequest.score              = 1;
            srequest.scoreSpecified     = true;
            srequest.transient          = 0;
            srequest.transientSpecified = true;
            srequest.schemaversion      = "7.2";
            srequest.datasets           = 511;
            //srequest.credittype = this.cboCreditType.SelectedValue.ToString();
            searchDef.creditrequest = srequest;

            /* Create a new request applicant object and attach it to the credit request object. */
            CT_searchapplicant apiApplicant = new CT_searchapplicant();

            apiApplicant.dob          = user.dob;
            apiApplicant.dobSpecified = true;

            srequest.applicant = new CT_searchapplicant[] { apiApplicant };

            /* Create a new name object and attach it to the request applicant object. */
            CT_inputname apiName = new CT_inputname();

            apiName.title      = user.title;
            apiName.forename   = user.forename;
            apiName.othernames = user.othernames;
            apiName.surname    = user.surname;

            apiApplicant.name = new CT_inputname[] { apiName };

            /* Create a new input current address object */
            CT_inputaddress apiInputCurrentAddress = new CT_inputaddress();

            apiInputCurrentAddress.buildingno = user.buildingno;
            apiInputCurrentAddress.street1    = user.street;
            apiInputCurrentAddress.postcode   = user.postcode;

            apiApplicant.address = new CT_inputaddress[] { apiInputCurrentAddress };

            return(searchDef);
        }
Ejemplo n.º 4
0
        private static CT_SearchDefinition InitializeApiRequest(CT_searchapplicant searchApplicant)
        {
            CT_SearchDefinition searchDef = new CT_SearchDefinition();

            CT_searchrequest srequest = new CT_searchrequest();

            srequest.purpose            = "BS";
            srequest.score              = 1;
            srequest.scoreSpecified     = true;
            srequest.transient          = 0;
            srequest.transientSpecified = true;
            srequest.schemaversion      = "7.2";
            srequest.datasets           = 511;
            //srequest.credittype = this.cboCreditType.SelectedValue.ToString();
            searchDef.creditrequest = srequest;
            srequest.applicant      = new CT_searchapplicant[] { searchApplicant };

            return(searchDef);
        }
        public static void Main()
        {
            try {
                CallcreditBsbAndCreditReport apiProxy = InitializeApiProxy();

                UserInfo            user      = InitializeUser();
                CT_SearchDefinition apiSD     = InitializeApiRequest(user);
                CT_SearchResult     apiresult = new CT_SearchResult();

                apiresult = apiProxy.Search07a(apiSD);

                var builder = new CallCreditModelBuilder();

                builder.Build(apiresult);

                Console.WriteLine("====" + apiresult.creditrequest.applicant.Length);
                Console.WriteLine("====" + apiresult.creditrequest.applicant[0].dob);
            } catch (Exception e) {
                Console.WriteLine(e);
                //throw;
            }

            /*apiProxy.Dispose();*/
        }         // Main