Ejemplo n.º 1
0
 public ProgrammableServiceResponse()
 {
     Item = new ProgrammableServicesResponseCartData(string.Empty, 0, decimal.Zero);
     Data = new List <ProgrammableServicesResponseData>();
 }
Ejemplo n.º 2
0
 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,
     });
 }
Ejemplo n.º 3
0
        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
            });
        }