コード例 #1
0
 public GetCardsRequestFactory()
 {
     request = new getCardsRequest()
     {
         requestHeader = CreateRequestHeader()
     };
 }
コード例 #2
0
        public getCardsResponse GetCards()
        {
            GetCardsClientService client   = new GetCardsClientService();
            getCardsRequest       request  = TestData();
            getCardsResponse      response = new getCardsResponse();

            // for SOAP
            //response = client.SoapClient(request);
            //Assert.IsNotNull(response);

            // for REST
            response = client.RestClient(Constants.GET_CARDS_URL, TestData());

            return(response);
        }
コード例 #3
0
        public getCardsRequest TestData()
        {
            getCardsRequest getCardsRequest = new getCardsRequest()
            {
                requestHeader = new requestHeader()
                {
                    applicationName     = "PORTALTEST",
                    applicationPwd      = "ZDyXmMLWE2z7OzJU",
                    clientIPAddress     = "10.252.187.81",
                    transactionDateTime = "20160309084056197",
                    transactionId       = "12345678901234567893"
                },

                msisdn = "905304018286"
            };

            return(getCardsRequest);
        }
コード例 #4
0
        private getCardsResponse GetCards(string msisdn)
        {
            GetCardsClientService client   = new GetCardsClientService();
            getCardsResponse      response = null;
            getCardsRequest       request  = null;

            GetCardsRequestFactory factory = new GetCardsRequestFactory();

            factory.request.msisdn = msisdn;

            try
            {
                request  = factory.Build();
                response = client.OptionalRequest(MySession.Current.requestFilter, request);
                return(response);
            } catch (Exception ex)
            {
                ShowMessage(ex.Message);
                return(null);
            }
        }