public ReminderSchedule ToSDKReminderSchedule() { if (sdk != null) { return(sdk); } else { ReminderSchedule result = new ReminderSchedule(); if (api.PackageId != null && !api.PackageId.Equals("")) { result.PackageId = new PackageId(api.PackageId); } if (api.StartInDaysDelay.HasValue) { result.DaysUntilFirstReminder = api.StartInDaysDelay.Value; } if (api.IntervalInDays.HasValue) { result.DaysBetweenReminders = api.IntervalInDays.Value; } if (api.RepetitionsCount.HasValue) { result.NumberOfRepetitions = api.RepetitionsCount.Value; } foreach (PackageReminder apiReminder in api.Reminders) { result.Reminders.Add(new ReminderConverter(apiReminder).ToSDKReminder()); } return(result); } }
public ReminderSchedule Build() { ReminderSchedule result = new ReminderSchedule(); result.PackageId = packageId; result.DaysBetweenReminders = daysBetweenReminders; result.DaysUntilFirstReminder = daysUntilFirstReminder; result.NumberOfRepetitions = numberOfRepetitions; return(result); }
public ReminderScheduleConverter(ReminderSchedule sdk) { this.api = null; this.sdk = sdk; }
public ReminderScheduleConverter(PackageReminderSchedule api) { this.api = api; this.sdk = null; }