Created
          March 13, 2018 13:56 
        
      - 
      
 - 
        
Save hishaamn/23d3a71ce4fafc85fa440e9d9469b5f1 to your computer and use it in GitHub Desktop.  
    Agent to import offers
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class OfferImport | |
| { | |
| public string CouponPath { get; set; } | |
| public string[] Databases { get; set; } | |
| public string SiteName { get; set; } | |
| public void Process(Item[] items, CommandItem command, ScheduleItem schedule) | |
| { | |
| var offersCommandItem = new OffersImportCommandItem(command.InnerItem); | |
| this.SiteName = offersCommandItem.Sitename; | |
| this.Databases = offersCommandItem.Database.Split(new[] { ',', '|' }, StringSplitOptions.RemoveEmptyEntries); | |
| this.CouponPath = offersCommandItem.CouponPath; | |
| // Your logic for the processing goes here | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment