/// <summary>
        /// Initializes a new instance of the <see cref="CampaignEmailSendNowRequest" /> class.
        /// </summary>
        /// <param name="listId">listId (required).</param>
        /// <param name="segments">segments (required).</param>
        /// <param name="notify">Array of IDs of the users to notify.</param>
        /// <param name="destinationField">Destination field of this campaign, which must be an email field (email or extra field id).                         If not sent, defaults to the general email field.</param>
        /// <param name="uniqueContactsOnly">True to send the campaign only to unique contacts (default to false).</param>
        /// <param name="limitHour">limitHour.</param>
        public CampaignEmailSendNowRequest(int listId = default(int), EmailSendSegment segments = default(EmailSendSegment), List <int> notify = default(List <int>), string destinationField = default(string), bool uniqueContactsOnly = false, LimitHourActionSendLimitHour limitHour = default(LimitHourActionSendLimitHour))
        {
            // to ensure "listId" is required (not null)
            if (listId == null)
            {
                throw new InvalidDataException("listId is a required property for CampaignEmailSendNowRequest and cannot be null");
            }
            else
            {
                this.ListId = listId;
            }

            // to ensure "segments" is required (not null)
            if (segments == null)
            {
                throw new InvalidDataException("segments is a required property for CampaignEmailSendNowRequest and cannot be null");
            }
            else
            {
                this.Segments = segments;
            }

            this.Notify           = notify;
            this.DestinationField = destinationField;
            // use default value if no "uniqueContactsOnly" provided
            if (uniqueContactsOnly == null)
            {
                this.UniqueContactsOnly = false;
            }
            else
            {
                this.UniqueContactsOnly = uniqueContactsOnly;
            }
            this.LimitHour = limitHour;
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractSendEmail" /> class.
 /// </summary>
 /// <param name="listId">listId (required).</param>
 /// <param name="segments">segments (required).</param>
 /// <param name="notify">Array of IDs of the users to notify.</param>
 /// <param name="destinationField">Destination field of this campaign, which must be an email field (email or extra field id).                         If not sent, defaults to the general email field.</param>
 /// <param name="uniqueContactsOnly">True to send the campaign only to unique contacts (default to false).</param>
 public AbstractSendEmail(int?listId = default(int?), EmailSendSegment segments = default(EmailSendSegment), List <int?> notify = default(List <int?>), string destinationField = default(string), bool?uniqueContactsOnly = false)
 {
     // to ensure "listId" is required (not null)
     if (listId == null)
     {
         throw new InvalidDataException("listId is a required property for AbstractSendEmail and cannot be null");
     }
     else
     {
         this.ListId = listId;
     }
     // to ensure "segments" is required (not null)
     if (segments == null)
     {
         throw new InvalidDataException("segments is a required property for AbstractSendEmail and cannot be null");
     }
     else
     {
         this.Segments = segments;
     }
     this.Notify           = notify;
     this.DestinationField = destinationField;
     // use default value if no "uniqueContactsOnly" provided
     if (uniqueContactsOnly == null)
     {
         this.UniqueContactsOnly = false;
     }
     else
     {
         this.UniqueContactsOnly = uniqueContactsOnly;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CampaignEmailScheduleRequest" /> class.
 /// </summary>
 /// <param name="scheduleDate">The date and time.</param>
 public CampaignEmailScheduleRequest(DateTime?scheduleDate = default(DateTime?), int?listId = default(int?), EmailSendSegment segments = default(EmailSendSegment), List <int?> notify = default(List <int?>), string destinationField = default(string), bool?uniqueContactsOnly = false) : base(listId, segments, notify, destinationField, uniqueContactsOnly)
 {
     this.ScheduleDate = scheduleDate;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CampaignEmailSendNowRequest" /> class.
 /// </summary>
 public CampaignEmailSendNowRequest(int?listId = default(int?), EmailSendSegment segments = default(EmailSendSegment), List <int?> notify = default(List <int?>), string destinationField = default(string), bool?uniqueContactsOnly = false, LimitHourActionSendLimitHour limitHour = default(LimitHourActionSendLimitHour)) : base(listId, segments, notify, destinationField, uniqueContactsOnly)
 {
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CampaignEmailSendRequest" /> class.
 /// </summary>
 public CampaignEmailSendRequest(int?listId = default(int?), EmailSendSegment segments = default(EmailSendSegment), List <int?> notify = default(List <int?>), string destinationField = default(string), bool?uniqueContactsOnly = false, LimitHourActionSendLimitHour limitHour = default(LimitHourActionSendLimitHour), DateTime?scheduleDate = default(DateTime?))
 {
 }