Package com.xeiam.xchange.campbx.dto.account

Examples of com.xeiam.xchange.campbx.dto.account.MyFunds


  }

  @Override
  public AccountInfo getAccountInfo() throws IOException {

    MyFunds myFunds = getCampBXAccountInfo();
    logger.debug("myFunds = {}", myFunds);

    if (!myFunds.isError()) {
      // TODO move to adapter class
      return new AccountInfo(exchangeSpecification.getUserName(), Arrays.asList(new Wallet("BTC", myFunds.getTotalBTC()), new Wallet("USD", myFunds.getTotalUSD())));
    }
    else {
      throw new ExchangeException("Error calling getAccountInfo(): " + myFunds.getError());
    }
  }
View Full Code Here


public class MyFundsJSONTest {

  @Test
  public void testUnmarshal() throws IOException {

    MyFunds myFunds = new ObjectMapper().readValue(MyFundsJSONTest.class.getResourceAsStream("/account/myfunds.json"), MyFunds.class);

    // Verify that the example data was unmarshalled correctly
    assertThat(myFunds.getLiquidUSD()).isEqualTo(new BigDecimal("0.00"));
    assertThat(myFunds.getTotalBTC()).isEqualTo(new BigDecimal("0.10000000"));
  }
View Full Code Here

    this.campBX = RestProxyFactory.createProxy(CampBX.class, exchangeSpecification.getSslUri());
  }

  public MyFunds getCampBXAccountInfo() throws IOException {

    MyFunds myFunds = campBX.getMyFunds(exchangeSpecification.getUserName(), exchangeSpecification.getPassword());
    return myFunds;
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.campbx.dto.account.MyFunds

Copyright © 2018 www.massapicom. 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.