public async Task Test_Idempotency_ClientCreateBankwireDirect() { string key = DateTime.Now.Ticks.ToString(); var bankwireDirectPost = new ClientBankWireDirectPostDTO("CREDIT_EUR", new Money { Amount = 1000, Currency = CurrencyIso.EUR }); await Api.Clients.CreateBankWireDirect(key, bankwireDirectPost); var result = await Api.Idempotency.Get(key); Assert.IsInstanceOf <PayInBankWireDirectDTO>(result.Resource); }
public void Test_Client_CreateBankWireDirect() { try { ClientBankWireDirectPostDTO bankwireDirectPost = new ClientBankWireDirectPostDTO("CREDIT_EUR", new Money { Amount = 1000, Currency = CurrencyIso.EUR }); PayInDTO result = this.Api.Clients.CreateBankWireDirect(bankwireDirectPost); Assert.IsTrue(result.Id.Length > 0); Assert.AreEqual("CREDIT_EUR", result.CreditedWalletId); Assert.AreEqual(PayInPaymentType.BANK_WIRE, result.PaymentType); Assert.AreEqual(PayInExecutionType.DIRECT, result.ExecutionType); Assert.AreEqual(TransactionStatus.CREATED, result.Status); Assert.AreEqual(TransactionType.PAYIN, result.Type); Assert.IsNotNull(((PayInBankWireDirectDTO)result).WireReference); Assert.AreEqual(((PayInBankWireDirectDTO)result).BankAccount.Type, BankAccountType.IBAN); } catch (Exception ex) { Assert.Fail(ex.Message); } }
/// <summary>Creates new bankwire direct for client.</summary> /// <param name="idempotencyKey">Idempotency key for this request.</param> /// <param name="bankWireDirect">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public async Task <PayInBankWireDirectDTO> CreateBankWireDirect(String idempotencyKey, ClientBankWireDirectPostDTO bankWireDirect) { return(await this.CreateObject <PayInBankWireDirectDTO, ClientBankWireDirectPostDTO>(idempotencyKey, MethodKey.ClientCreateBankwireDirect, bankWireDirect)); }
/// <summary>Creates new bankwire direct for client.</summary> /// <param name="bankWireDirect">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public async Task <PayInBankWireDirectDTO> CreateBankWireDirect(ClientBankWireDirectPostDTO bankWireDirect) { return(await CreateBankWireDirect(null, bankWireDirect)); }
/// <summary>Creates new bankwire direct for client.</summary> /// <param name="bankWireDirect">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public PayInBankWireDirectDTO CreateBankWireDirect(ClientBankWireDirectPostDTO bankWireDirect) { return(CreateBankWireDirect(null, bankWireDirect)); }
/// <summary> /// Creates new bankwire direct for client. /// </summary> /// <param name="idempotencyKey">Idempotency key for this request.</param> /// <param name="bankWireDirect">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public async Task <PayInBankWireDirectDTO> CreateBankWireDirect(string idempotencyKey, ClientBankWireDirectPostDTO bankWireDirect) { var targetUrl = $"{_baseUrl}/clients/payins/bankwire/direct"; return(await CreateEntity <PayInBankWireDirectDTO, ClientBankWireDirectPostDTO>(targetUrl, bankWireDirect, idempotencyKey)); }