public async Task <ActionResult <ApiResponse <PaymentMethod> > > Get(string paymentMethodId)
        {
            try
            {
                var paymentMethod = await _paymentMethodService.GetById(paymentMethodId);

                return(paymentMethod.CreateSuccessResponse());
            }
            catch (Exception exception)
            {
                return(BadRequest(exception.CreateErrorResponse()));
            }
        }
Exemple #2
0
        public async Task <IActionResult> GetByID(int id)
        {
            var result = await _paymentService.GetById(id);

            return(Ok(result));
        }
Exemple #3
0
 public PaymentMethod Get(int id)
 {
     return(service.GetById(id));
 }