PaymentsRequestBuilder extends RequestBuilder { public PaymentsRequestBuilder forAccount(KeyPair account) { account = checkNotNull(account, "account cannot be null"); this.setSegments("accounts", account.getAccountId(), "payments"); return this; } PaymentsRequestBuilder(OkHttpClient httpClient, URI serverURI); PaymentsRequestBuilder forAccount(KeyPair account); PaymentsRequestBuilder forLedger(long ledgerSeq); PaymentsRequestBuilder forTransaction(String transactionId); static Page<OperationResponse> execute(OkHttpClient httpClient, URI uri); @Override ServerSentEvent stream(EventListener<ListenerType> listener); Page<OperationResponse> execute(); @Override PaymentsRequestBuilder cursor(String token); @Override PaymentsRequestBuilder limit(int number); @Override PaymentsRequestBuilder order(Order direction);  }
@Test public void testForAccount() { Server server = new Server("https: URI uri = server.payments() .forAccount(KeyPair.fromAccountId("GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H")) .limit(200) .order(RequestBuilder.Order.DESC) .buildUri(); assertEquals("https: }