コード例 #1
0
ファイル: ECashService.cs プロジェクト: KeshavConnex/eCashAPI
 public Task<Enrollment> SelectBankAccount(SelectBankAccountRequest request)
 {
     try
     {
         var accessToken = request != null && request.Credentials != null ? request.Credentials.AccessToken : null;
         var bimRequest = ECashToApiConverter.ParseSelectAccountRequest(request);
         var bimService = RestService.For<IBIMService>(Constants.CLIENT_URI);
         var accountResponse = bimService.SelectBankByGUIDAsync(accessToken, bimRequest).Result;
         var response = ApiToECashConverter.ParseEnrollment(accountResponse);
         return Task.FromResult(response);
     }
     catch (Exception e)
     {
         return Task.FromResult<Enrollment>(new Enrollment() { Result = CommonFunction.ParseException(e) });
     }
 }
コード例 #2
0
 public static DTO.BIM.SelectBankByGUIDRequest ParseSelectAccountRequest(SelectBankAccountRequest request)
 {
     return new DTO.BIM.SelectBankByGUIDRequest()
     {
         bankaccount_guid = request !=null && request.Account !=null ? request.Account.Guid : null
     };
 }