コード例 #1
0
        virtual public MpaAction PaymentMigration(string input)
        {
            MpaAction action = new MpaAction {
                Message = input, Action = Actions.PaymentMigration, Environment = GetEnviromentType()
            };
            var payment = new Invoice
            {
                Created  = DateTimeOffset.UtcNow,
                Currency = "BRL",
                DueTo    = DateTime.Now.AddDays(1),
                Items    =
                    new[]
                {
                    new InvoiceItem
                    {
                        Currency    = "BRL",
                        Unit        = 1.99M,
                        Description = "Plano Blip Premium",
                        Quantity    = 1,
                        Total       = 1.99M
                    }
                },
                Total = 1
            };

            action.Content = payment;
            return(action);
        }
コード例 #2
0
        public MpaAction CreateCheckPhoneAction(string input)
        {
            MpaAction action = new MpaAction {
                Message = input, Action = Actions.CheckPhone, Environment = GetEnviromentType(), Content = input
            };

            return(action);
        }
コード例 #3
0
        public MpaAction CreateSaveAtBucketAction(string input)
        {
            MpaAction action = new MpaAction {
                Message = input, Action = Actions.SaveAtBucket, Environment = GetEnviromentType(), Content = input
            };

            return(action);
        }
コード例 #4
0
        public MpaAction CreateUnsubscribeDLAction(string input)
        {
            MpaAction action = new MpaAction {
                Message = input, Action = Actions.UnsubscribeDL, Environment = GetEnviromentType(), Content = input
            };

            return(action);
        }
コード例 #5
0
        //virtual public MpaAction CreatePaymentMessage(string input)
        //{
        //    MpaAction action = new MpaAction { Message = input, Action = Actions.PaymentCard, Environment = GetEnviromentType() };
        //    var payment = new Invoice
        //    {
        //        Created = DateTimeOffset.UtcNow,
        //        Currency = "BRL",
        //        DueTo = DateTime.Now.AddDays(1),
        //        Items =
        //  new[]
        //  {
        //        new InvoiceItem
        //        {
        //            Currency = "BRL",
        //            Unit = 1,
        //            Description = "Pagamento Blip Ltda",
        //            Quantity = 1,
        //            Total = 1
        //        }
        //  },
        //        Total = 1
        //    };

        //    action.Content = payment;
        //    return action;
        //}

        virtual public MpaAction CreateTalkServiceAction(string input)
        {
            MpaAction action = new MpaAction {
                Message = input, Action = Actions.TalkService, Environment = GetEnviromentType(), Content = input
            };

            return(action);
        }
コード例 #6
0
        virtual public MpaAction CreateWaitAction(string input)
        {
            int       end     = input.Trim().IndexOf('#', 4);
            int       seconds = int.Parse(input.Trim().Substring(5, end - 5));
            MpaAction action  = new MpaAction {
                Action = Actions.Wait, Content = seconds, Environment = GetEnviromentType(), Message = input
            };

            return(action);
        }
コード例 #7
0
        virtual public MpaAction CreateTranshipment(string input)
        {
            MpaAction action = new MpaAction {
                Message = input, Action = Actions.Transhipment, Environment = GetEnviromentType()
            };
            Document doc = DocumentServices.CreateIrisWebLinkDocument(@"http://m.me/1008073892649026", input);

            ((WebLink)doc).PreviewType = new MediaType("image", "png");
            ((WebLink)doc).PreviewUri  = new Uri("http://s3-sa-east-1.amazonaws.com/i.imgtake.takenet.com.br/i7mur/i7mur.png");
            action.Content             = doc;
            return(action);
        }