Пример #1
0
 public adspaceItem CreateAdspace(sessionType session, adspaceItem adspace)
 {
     CreateAdspaceRequest CreateAdspaceRequest = new CreateAdspaceRequest();
       DateTime utcNow = DateTime.UtcNow;
       CreateAdspaceRequest.nonce = Signature.GetNonce();
       CreateAdspaceRequest.connectId = session.connectId;
       CreateAdspaceRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "createadspace", CreateAdspaceRequest.nonce);
       CreateAdspaceRequest.timestamp = Signature.GetZDateTime(utcNow);
       CreateAdspaceRequest.adspaceItem = adspace;
       CreateAdspaceResponse adspace1 = this.publisherService.CreateAdspace(CreateAdspaceRequest);
       if (adspace1 == null)
     return (adspaceItem) null;
       else
     return adspace1.adspaceItem;
 }
Пример #2
0
 public adspaceItem UpdateAdspace(sessionType session, adspaceItem adspace)
 {
     UpdateAdspaceRequest UpdateAdspaceRequest = new UpdateAdspaceRequest();
       DateTime utcNow = DateTime.UtcNow;
       UpdateAdspaceRequest.nonce = Signature.GetNonce();
       UpdateAdspaceRequest.connectId = session.connectId;
       UpdateAdspaceRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "updateadspace", UpdateAdspaceRequest.nonce);
       UpdateAdspaceRequest.timestamp = Signature.GetZDateTime(utcNow);
       UpdateAdspaceRequest.adspaceItem = adspace;
       UpdateAdspaceResponse updateAdspaceResponse = this.publisherService.UpdateAdspace(UpdateAdspaceRequest);
       if (updateAdspaceResponse == null)
     return (adspaceItem) null;
       else
     return updateAdspaceResponse.adspaceItem;
 }