Ejemplo n.º 1
0
 public void CloseSession(sessionType session, string publicKey, string secretKey)
 {
     closeSession closeSession1 = new closeSession();
       DateTime utcNow = DateTime.UtcNow;
       closeSession1.nonce = Signature.GetNonce();
       closeSession1.connectId = session.connectId;
       closeSession1.signature = Signature.SoapSignature(utcNow, secretKey, "connectservice", "closesession", closeSession1.nonce);
       closeSession1.timestamp = Signature.GetZDateTime(utcNow);
       closeSession1.publicKey = publicKey;
       this.connectService.closeSession(closeSession1);
 }
Ejemplo n.º 2
0
 public mediaSlotItem CreateMediaSlot(sessionType session, mediaSlotItem mediaSlot)
 {
     CreateMediaSlotRequest CreateMediaSlotRequest = new CreateMediaSlotRequest();
       DateTime utcNow = DateTime.UtcNow;
       CreateMediaSlotRequest.nonce = Signature.GetNonce();
       CreateMediaSlotRequest.connectId = session.connectId;
       CreateMediaSlotRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "createmediaslot", CreateMediaSlotRequest.nonce);
       CreateMediaSlotRequest.timestamp = Signature.GetZDateTime(utcNow);
       CreateMediaSlotRequest.mediaSlotItem = mediaSlot;
       CreateMediaSlotResponse mediaSlot1 = this.publisherService.CreateMediaSlot(CreateMediaSlotRequest);
       if (mediaSlot1 == null)
     return (mediaSlotItem) null;
       else
     return mediaSlot1.mediaSlotItem;
 }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
0
 public programApplicationItem CreateProgramApplication(sessionType session, int adspaceId, int programId, string comment)
 {
     CreateProgramApplicationRequest CreateProgramApplicationRequest = new CreateProgramApplicationRequest();
       DateTime utcNow = DateTime.UtcNow;
       CreateProgramApplicationRequest.nonce = Signature.GetNonce();
       CreateProgramApplicationRequest.connectId = session.connectId;
       CreateProgramApplicationRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "createprogramapplication", CreateProgramApplicationRequest.nonce);
       CreateProgramApplicationRequest.timestamp = Signature.GetZDateTime(utcNow);
       CreateProgramApplicationRequest.adspaceId = adspaceId;
       CreateProgramApplicationRequest.programId = programId;
       CreateProgramApplicationRequest.publisherComment = comment;
       CreateProgramApplicationResponse programApplication = this.publisherService.CreateProgramApplication(CreateProgramApplicationRequest);
       if (programApplication == null || programApplication.programApplicationItem == null)
     return (programApplicationItem) null;
       else
     return programApplication.programApplicationItem;
 }
Ejemplo n.º 5
0
 public programItem GetProgram(sessionType session, int programId)
 {
     GetProgramResponse program = this.publisherService.GetProgram(new GetProgramRequest()
       {
     connectId = session.connectId,
     programId = programId
       });
       if (program == null)
     return (programItem) null;
       else
     return program.programItem;
 }
Ejemplo n.º 6
0
 public IList<productCategoryType> GetProductCategories(sessionType session, string region, int? rootCategory, bool? includeChilds)
 {
     GetProductCategoriesRequest GetProductCategoriesRequest = new GetProductCategoriesRequest();
       GetProductCategoriesRequest.connectId = session.connectId;
       GetProductCategoriesRequest.region = region;
       if (rootCategory.HasValue)
       {
     GetProductCategoriesRequest.rootCategory = rootCategory.Value;
     GetProductCategoriesRequest.rootCategorySpecified = true;
       }
       if (includeChilds.HasValue)
       {
     GetProductCategoriesRequest.includeChilds = includeChilds.Value;
     GetProductCategoriesRequest.includeChildsSpecified = true;
       }
       GetProductCategoriesResponse productCategories = this.publisherService.GetProductCategories(GetProductCategoriesRequest);
       if (productCategories == null || productCategories.categories == null)
     return (IList<productCategoryType>) null;
       else
     return (IList<productCategoryType>) Enumerable.ToList<productCategoryType>((IEnumerable<productCategoryType>) productCategories.categories);
 }
Ejemplo n.º 7
0
 public adspaceItem GetAdspace(sessionType session, int adspaceId)
 {
     GetAdspaceRequest GetAdspaceRequest = new GetAdspaceRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetAdspaceRequest.nonce = Signature.GetNonce();
       GetAdspaceRequest.connectId = session.connectId;
       GetAdspaceRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getadspace", GetAdspaceRequest.nonce);
       GetAdspaceRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetAdspaceRequest.adspaceId = adspaceId;
       GetAdspaceResponse adspace = this.publisherService.GetAdspace(GetAdspaceRequest);
       if (adspace == null || adspace.adspaceItem == null)
     return (adspaceItem) null;
       else
     return adspace.adspaceItem;
 }
Ejemplo n.º 8
0
 public promoteSessionResponse PromoteSession(sessionType session, string publicKey, string secretKey, promoteTypeEnum promoteType)
 {
     promoteSessionRequest promoteSessionRequest = new promoteSessionRequest();
       DateTime utcNow = DateTime.UtcNow;
       promoteSessionRequest.nonce = Signature.GetNonce();
       promoteSessionRequest.connectId = session.connectId;
       promoteSessionRequest.signature = Signature.SoapSignature(utcNow, secretKey, "connectservice", "promotesession", promoteSessionRequest.nonce);
       promoteSessionRequest.timestamp = Signature.GetZDateTime(utcNow);
       promoteSessionRequest.publicKey = publicKey;
       promoteSessionRequest.promoteType = promoteType;
       return this.connectService.promoteSession(promoteSessionRequest);
 }
Ejemplo n.º 9
0
 public IList<applicationItem> GetApplications(sessionType session, applicationTypeEnum? applicationType, roleTypeEnum? role, string name, int items, int page, out int total)
 {
     GetApplicationsRequest GetApplicationsRequest = new GetApplicationsRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetApplicationsRequest.nonce = Signature.GetNonce();
       GetApplicationsRequest.connectId = session.connectId;
       GetApplicationsRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "mediaslotservice", "getapplications", GetApplicationsRequest.nonce);
       GetApplicationsRequest.timestamp = Signature.GetZDateTime(utcNow);
       if (applicationType.HasValue)
       {
     GetApplicationsRequest.applicationType = applicationType.Value;
     GetApplicationsRequest.applicationTypeSpecified = true;
       }
       if (role.HasValue)
       {
     GetApplicationsRequest.role = role.Value;
     GetApplicationsRequest.roleSpecified = true;
       }
       if (name != null && name != " ")
     GetApplicationsRequest.name = name;
       GetApplicationsRequest.items = items;
       GetApplicationsRequest.itemsSpecified = true;
       GetApplicationsRequest.page = page;
       GetApplicationsRequest.pageSpecified = true;
       GetApplicationsResponse applications = this.publisherService.GetApplications(GetApplicationsRequest);
       if (applications == null)
       {
     total = 0;
     return (IList<applicationItem>) null;
       }
       else if (applications.applicationItems == null)
       {
     total = 0;
     return (IList<applicationItem>) null;
       }
       else
       {
     List<applicationItem> list = Enumerable.ToList<applicationItem>((IEnumerable<applicationItem>) applications.applicationItems);
     total = (int) applications.total;
     return (IList<applicationItem>) list;
       }
 }
Ejemplo n.º 10
0
 public saleItem GetSale(sessionType session, string saleId)
 {
     GetSaleRequest GetSaleRequest = new GetSaleRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetSaleRequest.nonce = Signature.GetNonce();
       GetSaleRequest.connectId = session.connectId;
       GetSaleRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getsale", GetSaleRequest.nonce);
       GetSaleRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetSaleRequest.saleId = saleId;
       GetSaleResponse sale = this.publisherService.GetSale(GetSaleRequest);
       if (sale == null)
     return (saleItem) null;
       else
     return sale.saleItem;
 }
Ejemplo n.º 11
0
 public List<subStringIdentifierType> GetProgramCategories(sessionType session)
 {
     GetProgramCategoriesResponse programCategories = this.publisherService.GetProgramCategories(new GetProgramCategoriesRequest()
       {
     connectId = session.connectId
       });
       if (programCategories == null || programCategories == null || programCategories.categories == null)
     return (List<subStringIdentifierType>) null;
       else
     return Enumerable.ToList<subStringIdentifierType>((IEnumerable<subStringIdentifierType>) programCategories.categories);
 }
Ejemplo n.º 12
0
 public mediaSlotItem GetMediaSlot(sessionType session, string mediaslotId)
 {
     GetMediaSlotRequest GetMediaSlotRequest = new GetMediaSlotRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetMediaSlotRequest.nonce = Signature.GetNonce();
       GetMediaSlotRequest.connectId = session.connectId;
       GetMediaSlotRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getmediaslot", GetMediaSlotRequest.nonce);
       GetMediaSlotRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetMediaSlotRequest.mediaSlotId = mediaslotId;
       GetMediaSlotResponse mediaSlot = this.publisherService.GetMediaSlot(GetMediaSlotRequest);
       if (mediaSlot == null)
     return (mediaSlotItem) null;
       else
     return mediaSlot.mediaSlotItem;
 }
Ejemplo n.º 13
0
 public leadItem GetLead(sessionType session, string leadId)
 {
     GetLeadRequest GetLeadRequest = new GetLeadRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetLeadRequest.nonce = Signature.GetNonce();
       GetLeadRequest.connectId = session.connectId;
       GetLeadRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getlead", GetLeadRequest.nonce);
       GetLeadRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetLeadRequest.leadId = leadId;
       GetLeadResponse lead = this.publisherService.GetLead(GetLeadRequest);
       if (lead == null)
     return (leadItem) null;
       else
     return lead.leadItem;
 }
Ejemplo n.º 14
0
 public incentiveItem GetIncentive(sessionType session, string incentiveId, int? adspaceId)
 {
     GetIncentiveRequest GetIncentiveRequest = new GetIncentiveRequest();
       GetIncentiveRequest.connectId = session.connectId;
       GetIncentiveRequest.incentiveId = incentiveId;
       if (adspaceId.HasValue)
       {
     GetIncentiveRequest.adspaceId = adspaceId.Value;
     GetIncentiveRequest.adspaceIdSpecified = true;
       }
       GetIncentiveResponse incentive = this.publisherService.GetIncentive(GetIncentiveRequest);
       if (incentive == null)
     return (incentiveItem) null;
       else
     return incentive.incentiveItem;
 }
Ejemplo n.º 15
0
 public IList<incentiveItem> GetExclusiveIncentives(sessionType session, string region, incentiveTypeEnum? incentiveType, int? programId, int? adspaceId, int page, int items, out int total)
 {
     SearchExclusiveIncentivesRequest SearchExclusiveIncentivesRequest = new SearchExclusiveIncentivesRequest();
       DateTime utcNow = DateTime.UtcNow;
       SearchExclusiveIncentivesRequest.nonce = Signature.GetNonce();
       SearchExclusiveIncentivesRequest.connectId = session.connectId;
       SearchExclusiveIncentivesRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "searchexclusiveincentives", SearchExclusiveIncentivesRequest.nonce);
       SearchExclusiveIncentivesRequest.timestamp = Signature.GetZDateTime(utcNow);
       if (adspaceId.HasValue)
       {
     SearchExclusiveIncentivesRequest.adspaceId = adspaceId.Value;
     SearchExclusiveIncentivesRequest.adspaceIdSpecified = true;
       }
       if (programId.HasValue)
       {
     SearchExclusiveIncentivesRequest.programId = programId.Value;
     SearchExclusiveIncentivesRequest.programIdSpecified = true;
       }
       if (incentiveType.HasValue)
       {
     SearchExclusiveIncentivesRequest.incentiveType = incentiveType.Value;
     SearchExclusiveIncentivesRequest.incentiveTypeSpecified = true;
       }
       if (!string.IsNullOrEmpty(region))
     SearchExclusiveIncentivesRequest.region = region;
       SearchExclusiveIncentivesRequest.page = page;
       SearchExclusiveIncentivesRequest.pageSpecified = true;
       SearchExclusiveIncentivesRequest.items = items;
       SearchExclusiveIncentivesRequest.itemsSpecified = true;
       SearchExclusiveIncentivesResponse incentivesResponse = this.publisherService.SearchExclusiveIncentives(SearchExclusiveIncentivesRequest);
       if (incentivesResponse == null)
       {
     total = 0;
     return (IList<incentiveItem>) null;
       }
       else if (incentivesResponse.incentiveItems == null)
       {
     total = 0;
     return (IList<incentiveItem>) null;
       }
       else
       {
     total = (int) incentivesResponse.total;
     return (IList<incentiveItem>) Enumerable.ToList<incentiveItem>((IEnumerable<incentiveItem>) incentivesResponse.incentiveItems);
       }
 }
Ejemplo n.º 16
0
 public incentiveItem GetExclusiveIncentive(sessionType session, string incentiveId, int? adspaceId)
 {
     GetExclusiveIncentiveRequest GetExclusiveIncentiveRequest = new GetExclusiveIncentiveRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetExclusiveIncentiveRequest.nonce = Signature.GetNonce();
       GetExclusiveIncentiveRequest.connectId = session.connectId;
       GetExclusiveIncentiveRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getexclusiveincentive", GetExclusiveIncentiveRequest.nonce);
       GetExclusiveIncentiveRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetExclusiveIncentiveRequest.incentiveId = incentiveId;
       if (adspaceId.HasValue)
       {
     GetExclusiveIncentiveRequest.adspaceId = adspaceId.Value;
     GetExclusiveIncentiveRequest.adspaceIdSpecified = true;
       }
       GetExclusiveIncentiveResponse exclusiveIncentive = this.publisherService.GetExclusiveIncentive(GetExclusiveIncentiveRequest);
       if (exclusiveIncentive == null)
     return (incentiveItem) null;
       else
     return exclusiveIncentive.incentiveItem;
 }
Ejemplo n.º 17
0
 public balanceItem GetBalance(sessionType session, string currency)
 {
     GetBalanceRequest GetBalanceRequest = new GetBalanceRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetBalanceRequest.nonce = Signature.GetNonce();
       GetBalanceRequest.connectId = session.connectId;
       GetBalanceRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getbalance", GetBalanceRequest.nonce);
       GetBalanceRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetBalanceRequest.currency = currency;
       GetBalanceResponse balance = this.publisherService.GetBalance(GetBalanceRequest);
       if (balance == null)
     return (balanceItem) null;
       else
     return balance.balanceItem;
 }
Ejemplo n.º 18
0
 public List<programApplicationItem> GetProgramApplications(sessionType session, int? adspaceId, int? programId, programApplicationStatusEnum? status, int items, int page, out int total)
 {
     GetProgramApplicationsRequest GetProgramApplicationsRequest = new GetProgramApplicationsRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetProgramApplicationsRequest.nonce = Signature.GetNonce();
       GetProgramApplicationsRequest.connectId = session.connectId;
       GetProgramApplicationsRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getprogramapplications", GetProgramApplicationsRequest.nonce);
       GetProgramApplicationsRequest.timestamp = Signature.GetZDateTime(utcNow);
       if (adspaceId.HasValue)
       {
     GetProgramApplicationsRequest.adspaceId = adspaceId.Value;
     GetProgramApplicationsRequest.adspaceIdSpecified = true;
       }
       if (programId.HasValue)
       {
     GetProgramApplicationsRequest.programId = programId.Value;
     GetProgramApplicationsRequest.programIdSpecified = true;
       }
       if (status.HasValue)
       {
     GetProgramApplicationsRequest.status = status.Value;
     GetProgramApplicationsRequest.statusSpecified = true;
       }
       GetProgramApplicationsRequest.page = page;
       GetProgramApplicationsRequest.pageSpecified = true;
       GetProgramApplicationsRequest.items = items;
       GetProgramApplicationsRequest.itemsSpecified = true;
       GetProgramApplicationsResponse programApplications = this.publisherService.GetProgramApplications(GetProgramApplicationsRequest);
       if (programApplications == null)
       {
     total = 0;
     return (List<programApplicationItem>) null;
       }
       else if (programApplications.programApplicationItems == null)
       {
     total = 0;
     return (List<programApplicationItem>) null;
       }
       else
       {
     total = (int) programApplications.total;
     return Enumerable.ToList<programApplicationItem>((IEnumerable<programApplicationItem>) programApplications.programApplicationItems);
       }
 }
Ejemplo n.º 19
0
 public IList<mediaSlotItem> GetMediaSlots(sessionType session, int? adspaceId, int? width, int? height, int? format, int items, int page, out int total)
 {
     GetMediaSlotsRequest GetMediaSlotsRequest = new GetMediaSlotsRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetMediaSlotsRequest.nonce = Signature.GetNonce();
       GetMediaSlotsRequest.connectId = session.connectId;
       GetMediaSlotsRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getmediaslots", GetMediaSlotsRequest.nonce);
       GetMediaSlotsRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetMediaSlotsRequest.items = items;
       GetMediaSlotsRequest.itemsSpecified = true;
       GetMediaSlotsRequest.page = page;
       GetMediaSlotsRequest.adspaceIdSpecified = true;
       if (adspaceId.HasValue)
       {
     GetMediaSlotsRequest.adspaceId = adspaceId.Value;
     GetMediaSlotsRequest.adspaceIdSpecified = true;
       }
       GetMediaSlotsRequest.size = new sizeType();
       if (height.HasValue)
       {
     GetMediaSlotsRequest.size.height = height.Value;
     GetMediaSlotsRequest.size.heightSpecified = true;
       }
       if (width.HasValue)
       {
     GetMediaSlotsRequest.size.width = width.Value;
     GetMediaSlotsRequest.size.widthSpecified = true;
       }
       if (format.HasValue)
       {
     GetMediaSlotsRequest.size.format = new subStringIdentifierType();
     GetMediaSlotsRequest.size.format.id = format.Value;
       }
       GetMediaSlotsResponse mediaSlots = this.publisherService.GetMediaSlots(GetMediaSlotsRequest);
       if (mediaSlots == null)
       {
     total = 0;
     return (IList<mediaSlotItem>) null;
       }
       else if (mediaSlots.mediaSlotItems == null)
       {
     total = 0;
     return (IList<mediaSlotItem>) null;
       }
       else
       {
     total = (int) mediaSlots.total;
     return (IList<mediaSlotItem>) Enumerable.ToList<mediaSlotItem>((IEnumerable<mediaSlotItem>) mediaSlots.mediaSlotItems);
       }
 }
Ejemplo n.º 20
0
 public settingItem GetSetting(sessionType session, string mediaSlotId, string applicationId, string key)
 {
     GetSettingResponse setting = this.publisherService.GetSetting(new GetSettingRequest()
       {
     connectId = session.connectId,
     mediaSlotId = mediaSlotId,
     applicationId = applicationId,
     key = key
       });
       if (setting == null)
     return (settingItem) null;
       else
     return setting.settingItem;
 }
Ejemplo n.º 21
0
 public IList<reportItem> GetReportBasic(sessionType session, DateTime fromDate, DateTime toDate, string currency, groupByEnum[] groupBy, int? adspaceId, int? programId, int? admediumId, reviewStateEnum? reviewState)
 {
     GetReportBasicRequest GetReportBasicRequest = new GetReportBasicRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetReportBasicRequest.nonce = Signature.GetNonce();
       GetReportBasicRequest.connectId = session.connectId;
       GetReportBasicRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetReportBasicRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getreportbasic", GetReportBasicRequest.nonce);
       GetReportBasicRequest.groupBy = groupBy;
       GetReportBasicRequest.fromDate = fromDate;
       GetReportBasicRequest.toDate = toDate;
       GetReportBasicRequest.currency = currency;
       if (programId.HasValue)
       {
     GetReportBasicRequest.programId = programId.Value;
     GetReportBasicRequest.programIdSpecified = true;
       }
       if (reviewState.HasValue)
       {
     GetReportBasicRequest.reviewState = reviewState.Value;
     GetReportBasicRequest.reviewStateSpecified = true;
       }
       if (adspaceId.HasValue)
       {
     GetReportBasicRequest.adspaceId = adspaceId.Value;
     GetReportBasicRequest.adspaceIdSpecified = true;
       }
       if (admediumId.HasValue)
       {
     GetReportBasicRequest.admediumId = admediumId.Value;
     GetReportBasicRequest.admediumIdSpecified = true;
       }
       GetReportBasicResponse reportBasic = this.publisherService.GetReportBasic(GetReportBasicRequest);
       if (reportBasic == null || reportBasic.reportItems == null)
     return (IList<reportItem>) null;
       else
     return (IList<reportItem>) Enumerable.ToList<reportItem>((IEnumerable<reportItem>) reportBasic.reportItems);
 }
Ejemplo n.º 22
0
 public static IEnumerable GetZanoxSales(DateTime Fecha)
 {
     ArrayList arrayList1 = new ArrayList();
     try
     {
         PublisherAPI publisherApi = new PublisherAPI();
         sessionType session = new sessionType()
         {
             connectId = "375C4284CB3A326CBEAD",
             secretKey = "1a1c9584c3e447+0A89472b0bEaa53/726c08c4b"
         };
         int total = 0;
         IList<saleItem> sales = publisherApi.GetSales(session, Fecha, dateTypeEnum.trackingDate, new int?(), new int?(), new reviewStateEnum?(), 50, 0, out total);
         if (sales != null)
         {
             foreach (saleItem saleItem in (IEnumerable<saleItem>)sales)
             {
                 ArrayList arrayList2 = arrayList1;
                 SqlString trackingDate = (SqlString)saleItem.trackingDate.ToString();
                 SqlString trackingCategory = (SqlString)(saleItem.trackingCategory != null ? saleItem.trackingCategory.Value : "");
                 SqlString program = (SqlString)saleItem.program.Value;
                 double num = saleItem.amount;
                 SqlString amount = (SqlString)num.ToString();
                 num = saleItem.commission;
                 SqlString commission = (SqlString)num.ToString();
                 SqlString currency = (SqlString)saleItem.currency;
                 SqlString adSpace = (SqlString)saleItem.adspace.Value;
                 SqlString reviewState = (SqlString)((object)saleItem.reviewState).ToString();
                 SqlString clickDate = (SqlString)saleItem.clickDate.ToString();
                 SqlString modifiedDate = (SqlString)saleItem.modifiedDate.ToString();
                 UserDefinedFunctions.ZanoxResults zanoxResults = new UserDefinedFunctions.ZanoxResults(trackingDate, trackingCategory, program, amount, commission, currency, adSpace, reviewState, clickDate, modifiedDate);
                 arrayList2.Add((object)zanoxResults);
             }
         }
         return (IEnumerable)arrayList1;
     }
     catch (Exception ex)
     {
         return (IEnumerable)new ArrayList()
       {
     (object) new UserDefinedFunctions.ZanoxResults((SqlString) DateTime.Now.ToString(), (SqlString) ex.Message, (SqlString) ex.InnerException.Message, (SqlString) ex.Source, (SqlString) ex.StackTrace, (SqlString) "", (SqlString) "", (SqlString) "", (SqlString) "", (SqlString) "")
       };
     }
 }
Ejemplo n.º 23
0
 public IList<saleItem> GetSales(sessionType session, DateTime date, dateTypeEnum dateType, int? adSpaceId, int? programId, reviewStateEnum? reviewState, int items, int page, out int total)
 {
     GetSalesRequest GetSalesRequest = new GetSalesRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetSalesRequest.nonce = Signature.GetNonce();
       GetSalesRequest.connectId = session.connectId;
       GetSalesRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getsales", GetSalesRequest.nonce);
       GetSalesRequest.timestamp = Signature.GetZDateTime(utcNow);
       if (adSpaceId.HasValue)
       {
     GetSalesRequest.adspaceId = adSpaceId.Value;
     GetSalesRequest.adspaceIdSpecified = true;
       }
       if (programId.HasValue)
       {
     GetSalesRequest.programId = programId.Value;
     GetSalesRequest.programIdSpecified = true;
       }
       if (reviewState.HasValue)
       {
     GetSalesRequest.reviewState = reviewState.Value;
     GetSalesRequest.reviewStateSpecified = true;
       }
       GetSalesRequest.date = date;
       GetSalesRequest.dateType = dateType;
       GetSalesRequest.items = items;
       GetSalesRequest.itemsSpecified = true;
       GetSalesRequest.page = page;
       GetSalesRequest.pageSpecified = true;
       GetSalesResponse sales = this.publisherService.GetSales(GetSalesRequest);
       if (sales == null)
       {
     total = 0;
     return (IList<saleItem>) null;
       }
       else if (sales.saleItems == null)
       {
     total = 0;
     return (IList<saleItem>) null;
       }
       else
       {
     total = (int) sales.total;
     return (IList<saleItem>) Enumerable.ToList<saleItem>((IEnumerable<saleItem>) sales.saleItems);
       }
 }
Ejemplo n.º 24
0
 public applicationItem GetApplication(sessionType session, string applicationId)
 {
     GetApplicationRequest GetApplicationRequest = new GetApplicationRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetApplicationRequest.nonce = Signature.GetNonce();
       GetApplicationRequest.connectId = session.connectId;
       GetApplicationRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getapplication", GetApplicationRequest.nonce);
       GetApplicationRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetApplicationRequest.applicationId = applicationId;
       GetApplicationResponse application = this.publisherService.GetApplication(GetApplicationRequest);
       if (application == null)
     return (applicationItem) null;
       else
     return application.applicationItem;
 }
Ejemplo n.º 25
0
 public IList<settingItem> GetSettings(sessionType session, string mediaSlotId, string applicationId, int items, int page, out int total)
 {
     GetSettingsResponse settings = this.publisherService.GetSettings(new GetSettingsRequest()
       {
     connectId = session.connectId,
     mediaSlotId = mediaSlotId,
     applicationId = applicationId,
     items = items,
     itemsSpecified = true,
     page = page,
     pageSpecified = true
       });
       if (settings == null)
       {
     total = 0;
     return (IList<settingItem>) null;
       }
       else if (settings.settingItems == null)
       {
     total = 0;
     return (IList<settingItem>) null;
       }
       else
       {
     total = (int) settings.total;
     return (IList<settingItem>) Enumerable.ToList<settingItem>((IEnumerable<settingItem>) settings.settingItems);
       }
 }
Ejemplo n.º 26
0
 public paymentItem GetPayment(sessionType session, string paymentId)
 {
     GetPaymentRequest GetPaymentRequest = new GetPaymentRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetPaymentRequest.nonce = Signature.GetNonce();
       GetPaymentRequest.connectId = session.connectId;
       GetPaymentRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getpayment", GetPaymentRequest.nonce);
       GetPaymentRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetPaymentRequest.paymentId = paymentId;
       GetPaymentResponse payment = this.publisherService.GetPayment(GetPaymentRequest);
       if (payment == null)
     return (paymentItem) null;
       else
     return payment.paymentItem;
 }
Ejemplo n.º 27
0
 public string GetZanoxUIUrl(sessionType session)
 {
     getUiUrl getUiUrl1 = new getUiUrl();
       DateTime utcNow = DateTime.UtcNow;
       getUiUrl1.nonce = Signature.GetNonce();
       getUiUrl1.connectId = session.connectId;
       getUiUrl1.timestamp = Signature.GetZDateTime(utcNow);
       getUiUrl1.signature = Signature.SoapSignature(utcNow, session.secretKey, "connectservice", "getuiurl", getUiUrl1.nonce);
       getUiUrl1.sessionKey = session.secretKey;
       getUiUrlResponse uiUrl = this.connectService.getUiUrl(getUiUrl1);
       if (uiUrl == null)
     return (string) null;
       else
     return uiUrl.url;
 }
Ejemplo n.º 28
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);
       }
 }
Ejemplo n.º 29
0
 public productItem GetProduct(sessionType session, string productId, int? adspaceId)
 {
     GetProductRequest GetProductRequest = new GetProductRequest();
       GetProductRequest.connectId = session.connectId;
       GetProductRequest.zupId = productId;
       if (adspaceId.HasValue)
       {
     GetProductRequest.adspaceId = adspaceId.Value;
     GetProductRequest.adspaceIdSpecified = true;
       }
       GetProductResponse product = this.publisherService.GetProduct(GetProductRequest);
       if (product == null)
     return (productItem) null;
       else
     return product.productItem;
 }
Ejemplo n.º 30
0
 public IList<subStringIdentifierType> GetAdmediumCategories(sessionType session, int programId)
 {
     List<admediumItem> list = new List<admediumItem>();
       GetAdmediumCategoriesResponse admediumCategories = this.publisherService.GetAdmediumCategories(new GetAdmediumCategoriesRequest()
       {
     connectId = session.connectId,
     programId = programId
       });
       if (admediumCategories == null)
     return (IList<subStringIdentifierType>) null;
       else
     return (IList<subStringIdentifierType>) admediumCategories.categories;
 }