Ejemplo n.º 1
0
        public ResultSrv <ServiceCallResultSrv <AIPlatformSrv <NLUMobilePhoneChargingContentSrv> > > NLUMobilePhoneCharging()
        {
            try
            {
                var output = new ResultSrv <ServiceCallResultSrv <AIPlatformSrv <NLUMobilePhoneChargingContentSrv> > >();

                var internalServiceCallVo = InternalServiceCallVo.ConcreteBuilder
                                            .SetToken("")
                                            .SetScApiKey("")
                                            //.SetScVoucherHash({Put your VoucherHash})
                                            .Build();

                var nLUVo = NLUVo.ConcreteBuilder
                            .SetServiceCallParameters(internalServiceCallVo)
                            .SetText("شماره موبایل 456456 را به مبلغ 1 تومان شارژ کن")
                            .Build();
                AIService.NLUMobilePhoneCharging(nLUVo, response => Listener.GetResult(response, out output));
                return(output);
            }
            catch (PodException podException)
            {
                Console.WriteLine(
                    $"-- {podException.Code}-an error has occured : {Environment.NewLine}{podException.Message}");
                throw;
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message);
                throw;
            }
        }