public ProgrammableServiceResponse() { Item = new ProgrammableServicesResponseCartData(string.Empty, 0, decimal.Zero); Data = new List <ProgrammableServicesResponseData>(); }
internal static ProgrammableServiceResponse AddToCartForCheckout(string message, ProgrammableServicesResponseCartData data, bool isUssd) { return(new ProgrammableServiceResponse() { Type = isUssd? ProgrammableServiceActionType.Release.ToString("G"): ProgrammableServiceActionType.AddToCart.ToString("G"), Message = message, Item = data, DataType = ProgrammableServiceDataTypes.Display, }); }
internal static ProgrammableServiceResponse Render(string message, List <ProgrammableServicesResponseData> dataItems = null, ProgrammableServicesResponseCartData cartItem = null, string label = null, string dataType = null, string fieldType = "text", string fieldName = "", bool persistAsFavoriteStep = false, string nextRoute = null) { var type = string.IsNullOrWhiteSpace(nextRoute) ? ProgrammableServiceActionType.Release.ToString() : ProgrammableServiceActionType.Response.ToString(); return(new ProgrammableServiceResponse() { Type = type, Message = message, NextRoute = nextRoute, Data = dataItems, DataType = dataType, Item = cartItem, Label = label, FieldType = fieldType, PersistAsFavoriteStep = persistAsFavoriteStep, FieldName = fieldName }); }