public HttpResponseMessage UpdateSmsStatus(TwilioSmsStatus twilioSmsStatus) { Check.If(twilioSmsStatus).IsNotNull(); var result = _externalSmsService.UpdateSmsStatus(SmsFactory.CreateCoreSmsUpdate(twilioSmsStatus)); return Request.CreateResponse(HttpStatusCode.OK, new TwilioResponse().Element, new XmlMediaTypeFormatter()); }
public static SmsStatusUpdate CreateCoreSmsUpdate(TwilioSmsStatus twilioSmsStatus) { return new SmsStatusUpdate { MessageSid = twilioSmsStatus.MessageSid, Status = EnumHelper<Status>.Parse(twilioSmsStatus.MessageStatus), ErrorCode = twilioSmsStatus.ErrorCode.IsNotNullOrEmpty() ? int.Parse(twilioSmsStatus.ErrorCode) : 0, }; }