コード例 #1
0
        /// <summary>
        /// <see cref="BankingRestService"/>
        /// </summary>
        public TransferResponse Transfer(TransferData transferData)
        {
            try
            {
                _inputValidator.Validate(transferData);
            }
            catch (FaultException exception)
            {
                SetResponseCode(HttpStatusCode.BadRequest);
                return(new TransferResponse(exception.Message));
            }
            var response = _bank.RestTransfer(transferData);

            SetResponseCode(HttpStatusCode.Created);
            return(response.ResponseStatus == ResponseStatus.Success ? new TransferResponse() : new TransferResponse(response.ResponseStatus.ToString()));
        }
コード例 #2
0
 /// <summary>
 /// <see cref="IBankingService"/>
 /// </summary>
 public PaymentResponse Deposit(DepositData paymentData)
 {
     _inputValidator.Validate(paymentData);
     return(_bank.Deposit(paymentData));
 }