Пример #1
0
 public IAsyncResult BeginGetPayments(GetPaymentsRequest GetPaymentsRequest, AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetPayments", new object[1]
       {
     (object) GetPaymentsRequest
       }, callback, asyncState);
 }
Пример #2
0
 public IList<paymentItem> GetPayments(sessionType session, int items, int page, out int total)
 {
     GetPaymentsRequest GetPaymentsRequest = new GetPaymentsRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetPaymentsRequest.nonce = Signature.GetNonce();
       GetPaymentsRequest.connectId = session.connectId;
       GetPaymentsRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getpayments", GetPaymentsRequest.nonce);
       GetPaymentsRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetPaymentsRequest.items = items;
       GetPaymentsRequest.itemsSpecified = true;
       GetPaymentsRequest.page = page;
       GetPaymentsRequest.pageSpecified = true;
       GetPaymentsResponse payments = this.publisherService.GetPayments(GetPaymentsRequest);
       if (payments == null)
       {
     total = 0;
     return (IList<paymentItem>) null;
       }
       else if (payments.paymentItems == null)
       {
     total = 0;
     return (IList<paymentItem>) null;
       }
       else
       {
     total = (int) payments.total;
     return (IList<paymentItem>) Enumerable.ToList<paymentItem>((IEnumerable<paymentItem>) payments.paymentItems);
       }
 }