コード例 #1
0
 public ProgrammableServiceResponse()
 {
     Item = new ProgrammableServicesResponseCartData(string.Empty, 0, decimal.Zero);
     Data = new List <ProgrammableServicesResponseData>();
 }
コード例 #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,
     });
 }
コード例 #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
            });
        }