예제 #1
0
        static void GetCounterparty_getSendTo()
        {
            var client = new CounterpartyService.CounterpartyClient();

            var request = new CounterpartyService.GetDocumentSendToRequest();
            request.tradingSystemCode = "tradingSystemCode";
            request.cptyShortName = "cptyShortName";
            request.documentTypeCode = "documentTypeCode";
            request.cdtyCode = "cdtyCode";
            request.settlementTypeCode = "settlementTypeCode";

            Logger.InfoFormat("GetCptyInfoService GetDocumentSendToRequest(" +
                    "tradingSystemCode={0}" +
                    ", cptyShortName={1}" +
                    ", documentType={2}" +
                    ", cdtyCode={3}" +
                    ", settlementType={4})",
                 request.tradingSystemCode == null ? "null" : request.tradingSystemCode,
                 request.cptyShortName == null ? "null" : request.cptyShortName,
                 request.documentTypeCode == null ? "null" : request.documentTypeCode,
                 request.cdtyCode == null ? "null" : request.cdtyCode,
                 request.settlementTypeCode == null ? "null" : request.settlementTypeCode
             );

            var response = client.getDocumentSendTo(request);

            Logger.InfoFormat("GetCptyInfoService: GetDocumentSendToResponse(sendTos={0})",
              String.Join(",", response.sendTos.ToList().Select( x =>
                  String.Format("transmitMethodInd={0}, {1})", x.transmitMethodInd, 
                    x.transmitMethodInd == CounterpartyService.TransmitMethodInd.EMAIL
                        ? String.Format( "email={0}", x.emailAddress )
                        : String.Format( "fax={0} {1} {2}", x.emailAddress, x.faxCountryCode, x.faxAreaCode, x.faxLocalNumber)) )
              ));
        }
예제 #2
0
        static void GetCounterparty_getAgreementList()
        {
            var client = new CounterpartyService.CounterpartyClient();

            var request = new CounterpartyService.GetAgreementListRequest();
            request.tradingSystemCode = "tradingSystemCode";
            request.bookingCompanyShortName = "bookingCompanyShortName";
            request.cptyShortName = "cptyShortName";

            Logger.InfoFormat("GetCptyInfo GetAgreementListRequest(" +
                "tradingSystemCode={0}" +
                ", bookingCompanyShortName={1}" +
                ", cptyShortName={2})",
                request.tradingSystemCode, request.bookingCompanyShortName, request.cptyShortName);

            var response = client.getAgreementList(request);

            Logger.InfoFormat("GetCptyInfo GetAgreementListResponse(agreements={0})",
                String.Join(",", response.agreements.ToList().Select(x => x.agreementTypeCode)));
        }
예제 #3
0
        static void GetCounterparty_storeDocumentSendTo()
        {
            var client = new CounterpartyService.CounterpartyClient();
            var request = new CounterpartyService.StoreDocumentSendToRequest();
            request.tradingSystemCode = "tradingSystemCode";
            request.cptyShortName = "cptyShortName ";
            request.documentTypeCode = "documentTypeCode";
            request.cdtyCode = "cdtyCode";
            request.settlementTypeCode = "settlementTypeCode";
            List<CounterpartyService.sendTo> sendTos = new List<CounterpartyService.sendTo>();

            var sendTo1 = new CounterpartyService.sendTo();
            sendTo1.transmitMethodInd = CounterpartyService.TransmitMethodInd.EMAIL;
            sendTo1.emailAddress = "*****@*****.**";
            sendTos.Add( sendTo1 );
            
            var response = client.storeDocumentSendTo( request );

            Logger.InfoFormat("GetCptyInfoService: StoreDocumentSendToResponse(success={0})", response.success );
        }