コード例 #1
0
 public static BankAccountRef CreateAccount(APIClient client, string userId)
 {
     var accounts = client.GetBankAccounts(userId);
     var result = accounts.FirstOrDefault(e => e.Iban == IBAN);
     if (result == null)
     {
         var account = new BankAccount
                       {
                           Bic = BIC,
                           Iban = IBAN,
                           DisplayName = "Smoney default account",
                           IsMine = true
                       };
         result = client.PostBankAccount(account, userId);
     }
     return new BankAccountRef
            {
                Id = result.Id.Value
            };
 }
コード例 #2
0
 public BankAccount PutBankAccount(BankAccount bankAccount, string userId = null)
 {
     var uri = CreateUri(userId, bankaccounts);
     return PostAsync(uri, bankAccount);
 }