Examples of Balance


Examples of com.datasift.client.core.Balance

     * @return The balance on the account being used to make API calls
     */
    public FutureData<Balance> balance() {
        FutureData<Balance> future = new FutureData<Balance>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(BALANCE));
        Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Balance(), config)));
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of com.datasift.client.core.Balance

     * @return The balance on the account being used to make API calls
     */
    public FutureData<Balance> balance() {
        FutureData<Balance> future = new FutureData<Balance>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(BALANCE));
        Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Balance(), config)));
        performRequest(future, request);
        return future;
    }
View Full Code Here

Examples of com.datasift.client.core.Balance

        assertEquals(dpu.getDpu(), this.dpu, 0.00000001);
    }

    @Test
    public void testIfUserCanCalculateBalance() {
        Balance balance = datasift.balance().sync();
        assertTrue(balance.isSuccessful());

        assertEquals(balance.credit(), credit, 0.00000001);
        assertEquals(balance.pricePlan(), plan);
        assertEquals(balance.remainingDpus(), remaining_dpus, 0.00000001);
    }
View Full Code Here

Examples of com.datasift.client.core.Balance

        Usage usage = datasift.usage().sync();

        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");
        Dpu dpu = datasift.dpu(stream).sync();

        Balance balance = datasift.balance().sync();
        //synchronously validate a CSDL
        Validation validation = datasift.validate(csdl).sync();
        if (!validation.isSuccessful()) {
            //if true an exception may have caused the request to fail, inspect the cause if available
            if (validation.failureCause() != null) { //may not be an exception
View Full Code Here

Examples of com.datasift.client.core.Balance

     * @return The balance on the account being used to make API calls
     */
    public FutureData<Balance> balance() {
        FutureData<Balance> future = new FutureData<Balance>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(BALANCE));
        Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Balance(), config)));
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of com.datasift.client.core.Balance

        Usage usage = datasift.usage().sync();

        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");
        Dpu dpu = datasift.dpu(stream).sync();

        Balance balance = datasift.balance().sync();
        //synchronously validate a CSDL
        Validation validation = datasift.validate(csdl).sync();
        if (!validation.isSuccessful()) {
            //if true an exception may have caused the request to fail, inspect the cause if available
            if (validation.failureCause() != null) { //may not be an exception
View Full Code Here

Examples of com.datasift.client.core.Balance

     * @return The balance on the account being used to make API calls
     */
    public FutureData<Balance> balance() {
        FutureData<Balance> future = new FutureData<Balance>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(BALANCE));
        Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Balance(), config)));
        performRequest(future, request);
        return future;
    }
View Full Code Here

Examples of com.dgwave.osrs.model.Balance

      req.setRegistrantIp(null);     
      OsrsResponse response = client.sendReceive(req);
      assertNotNull(response);
      System.out.println(response);
     
      Balance balance = ((BalanceResponse)response).getBalance();
      System.out.println("Balance is: " + balance.getBalance());
      System.out.println("Hold Balance is: " + balance.getHoldBalance());
     
    } catch (OsrsException e) {
      e.printStackTrace();
      fail ("Error while creating string from request");
    }
View Full Code Here

Examples of com.kellerkindt.scs.interfaces.Balance

            returnMessage = Term.ERROR_UNDO_TWICE.get();
            return false;
        }
           
       
        Balance     balance = ShowCaseStandalone.get().getBalanceHandler();
        List<String>  msg;
       
//        switch(activity){
//            case BUY:
//                //Player sold something.  So check:
View Full Code Here

Examples of com.kellerkindt.scs.interfaces.Balance

    /**
     * Displays info about the last transaction.
     */
    public List<String> info(){
        List<String> msg = new ArrayList<String>();
        Balance balance = ShowCaseStandalone.get().getBalanceHandler();
        if(quantity == 0){
            msg.add(Term.INFO_UNDO_1.get());
        } else {
            long curTime = System.currentTimeMillis();
            long timeLeft = Properties.maxUndoTime - (curTime - time);
           
            msg.add(Term.INFO_UNDO_2.get());
            msg.add(Term.INFO_UNDO_3.get());
            msg.add(Term.INFO_UNDO_4.get(player.getName(),       shop.getOwner()));
//            msg.add(Term.INFO_UNDO_5.get(activity.toString(),     shop.getItemName(), String.valueOf(quantity)));
            msg.add(Term.INFO_UNDO_6.get(balance.format(price),    balance.format(price * quantity)));
           
            if(timeLeft > 0) {
              msg.add(Term.INFO_UNDO_7.get(String.valueOf((Properties.maxUndoTime - (curTime - time)) / 1000)));
            } else {
              msg.add(Term.INFO_UNDO_8.get());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.