Example #1
0
        public async Task <PaymentsModel> GetByNumber(int number)
        {
            PaymentsModel num = null;

            if (number < 0)
            {
                throw new InvalidOperationException("Number can't be 0");
            }

            num = await uploader.GetByNumber(number).ConfigureAwait(false);

            if (num == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            return(num);
        }