@Test public void shouldOnlineDebitRegister() throws IOException, ParseException { HttpResponse response = new HttpResponse(200, responseAsString); when(httpClient.execute(any(HttpMethod.class), anyString(), anyMap(), any(HttpRequestBody.class))).thenReturn(response); TransactionDetail transactionDetail = directPaymentRegisterResource.withOnlineDebit( new BankBuilder() .withName(BankName.Name.BANCO_DO_BRASIL)); assertTransaction(transactionDetail); }
public TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder) { return withOnlineDebit(bankBuilder.build()); }
DirectPaymentRegisterResource { public TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder) { return withOnlineDebit(bankBuilder.build()); } }
DirectPaymentRegisterResource { public TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder) { return withOnlineDebit(bankBuilder.build()); } DirectPaymentRegisterResource(PagSeguro pagSeguro,
                                       HttpClient httpClient,
                                       DirectPaymentRegistration directPaymentRegistration); }
DirectPaymentRegisterResource { public TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder) { return withOnlineDebit(bankBuilder.build()); } DirectPaymentRegisterResource(PagSeguro pagSeguro,
                                       HttpClient httpClient,
                                       DirectPaymentRegistration directPaymentRegistration); TransactionDetail withBankSlip(); TransactionDetail withCreditCard(CreditCard creditCard); TransactionDetail withCreditCard(Builder<CreditCard> creditCardBuilder); TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder); TransactionDetail withOnlineDebit(Bank bank); }
DirectPaymentRegisterResource { public TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder) { return withOnlineDebit(bankBuilder.build()); } DirectPaymentRegisterResource(PagSeguro pagSeguro,
                                       HttpClient httpClient,
                                       DirectPaymentRegistration directPaymentRegistration); TransactionDetail withBankSlip(); TransactionDetail withCreditCard(CreditCard creditCard); TransactionDetail withCreditCard(Builder<CreditCard> creditCardBuilder); TransactionDetail withOnlineDebit(Builder<Bank> bankBuilder); TransactionDetail withOnlineDebit(Bank bank);  }