示例#1
0
        public async Task <MassiveBonusResponseContract> MassiveRemoveBonus(MassiveBonusRequestContract requestContract)
        {
            string urlRelative = GlobalConfig.API + "/RemoveMassiveBonus";
            MassiveBonusResponseContract responseContract;

            using (var client = new ApiClient(GlobalConfig.BASE_URL, _networkDependency, _preferences))
            {
                responseContract = await client.POSTAsync <MassiveBonusResponseContract>(urlRelative, requestContract, true);
            }

            return(responseContract);
        }
示例#2
0
        public async Task <MassiveBonusResponseModel> RemoveAllBonus(string userName, CucModel cucModel)
        {
            var allBonus = GetLocalBonus(userName);
            MassiveBonusRequestContract requestContract = new MassiveBonusRequestContract()
            {
                codigosBonos = allBonus.Select(pp => pp.codigoBono).ToList(),
                cuc          = cucModel.idPuntoVenta,
                idEmisorBono = userName
            };

            var response = await _wSValidBonoRepository.MassiveRemoveBonus(requestContract);

            DeleteLocalBonus(userName);

            return(_mapper.Map <MassiveBonusResponseModel>(response));
        }