/// <summary> /// Initializes a new instance of the <see cref="CreateSmsCampaign" /> class. /// </summary> /// <param name="name">Name of the campaign (required).</param> /// <param name="sender">Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** (required).</param> /// <param name="content">Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS (required).</param> /// <param name="recipients">recipients.</param> /// <param name="scheduledAt">UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result..</param> public CreateSmsCampaign(string name = default(string), string sender = default(string), string content = default(string), CreateSmsCampaignRecipients recipients = default(CreateSmsCampaignRecipients), DateTime?scheduledAt = default(DateTime?)) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for CreateSmsCampaign and cannot be null"); } else { this.Name = name; } // to ensure "sender" is required (not null) if (sender == null) { throw new InvalidDataException("sender is a required property for CreateSmsCampaign and cannot be null"); } else { this.Sender = sender; } // to ensure "content" is required (not null) if (content == null) { throw new InvalidDataException("content is a required property for CreateSmsCampaign and cannot be null"); } else { this.Content = content; } this.Recipients = recipients; this.ScheduledAt = scheduledAt; }
/// <summary> /// Initializes a new instance of the <see cref="CreateSmsCampaign" /> class. /// </summary> /// <param name="name">Name of the campaign (required).</param> /// <param name="sender">Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** (required).</param> /// <param name="content">Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS (required).</param> /// <param name="recipients">recipients.</param> /// <param name="scheduledAt">UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result..</param> /// <param name="unicodeEnabled">Format of the message. It indicates whether the content should be treated as unicode or not. (default to false).</param> public CreateSmsCampaign(string name = default(string), string sender = default(string), string content = default(string), CreateSmsCampaignRecipients recipients = default(CreateSmsCampaignRecipients), string scheduledAt = default(string), bool?unicodeEnabled = false) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for CreateSmsCampaign and cannot be null"); } else { this.Name = name; } // to ensure "sender" is required (not null) if (sender == null) { throw new InvalidDataException("sender is a required property for CreateSmsCampaign and cannot be null"); } else { this.Sender = sender; } // to ensure "content" is required (not null) if (content == null) { throw new InvalidDataException("content is a required property for CreateSmsCampaign and cannot be null"); } else { this.Content = content; } this.Recipients = recipients; this.ScheduledAt = scheduledAt; // use default value if no "unicodeEnabled" provided if (unicodeEnabled == null) { this.UnicodeEnabled = false; } else { this.UnicodeEnabled = unicodeEnabled; } }
/// <summary> /// Initializes a new instance of the <see cref="UpdateSmsCampaign" /> class. /// </summary> /// <param name="name">Name of the campaign.</param> /// <param name="sender">Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**.</param> /// <param name="content">Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS.</param> /// <param name="recipients">recipients.</param> /// <param name="scheduledAt">UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result..</param> public UpdateSmsCampaign(string name = default(string), string sender = default(string), string content = default(string), CreateSmsCampaignRecipients recipients = default(CreateSmsCampaignRecipients), DateTime?scheduledAt = default(DateTime?)) { this.Name = name; this.Sender = sender; this.Content = content; this.Recipients = recipients; this.ScheduledAt = scheduledAt; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateSmsCampaign" /> class. /// </summary> /// <param name="name">Name of the campaign.</param> /// <param name="sender">Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**.</param> /// <param name="content">Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS.</param> /// <param name="recipients">recipients.</param> /// <param name="scheduledAt">UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result..</param> /// <param name="unicodeEnabled">Format of the message. It indicates whether the content should be treated as unicode or not. (default to false).</param> public UpdateSmsCampaign(string name = default(string), string sender = default(string), string content = default(string), CreateSmsCampaignRecipients recipients = default(CreateSmsCampaignRecipients), string scheduledAt = default(string), bool?unicodeEnabled = false) { this.Name = name; this.Sender = sender; this.Content = content; this.Recipients = recipients; this.ScheduledAt = scheduledAt; // use default value if no "unicodeEnabled" provided if (unicodeEnabled == null) { this.UnicodeEnabled = false; } else { this.UnicodeEnabled = unicodeEnabled; } }