Package com.wesabe.api.accounts.entities

Examples of com.wesabe.api.accounts.entities.Merchant


      savings.setCurrency(USD);
     
      inject(Account.class, checking, "accountBalances", Sets.newHashSet(new AccountBalance(checking, decimal("100.00"), new DateTime())));
      inject(Account.class, savings, "accountBalances", Sets.newHashSet(new AccountBalance(savings, decimal("100.00"), new DateTime())));
     
      this.starbucksMerchant = new Merchant("Starbucks");
      this.wholeFoodsMerchant = new Merchant("Whole Foods");
     
      starbucks.setStatus(TxactionStatus.ACTIVE);
      starbucks.setMerchant(starbucksMerchant);
      wholeFoods.setStatus(TxactionStatus.ACTIVE);
      wholeFoods.setMerchant(wholeFoodsMerchant);
View Full Code Here


      txaction.setAmount(new BigDecimal(amount).abs().negate());
      return this;
    }

    public TxactionBuilder at(String merchantName) {
      final Merchant merchant = new Merchant(merchantName);
      merchant.setId(merchantName.hashCode());
      txaction.setMerchant(merchant);
      return this;
    }
View Full Code Here

      savings.setCurrency(USD);
     
      inject(Account.class, checking, "accountBalances", Sets.newHashSet(new AccountBalance(checking, decimal("100.00"), new DateTime())));
      inject(Account.class, savings, "accountBalances", Sets.newHashSet(new AccountBalance(savings, decimal("100.00"), new DateTime())));
     
      this.starbucksMerchant = new Merchant("Starbucks");
      this.wholeFoodsMerchant = new Merchant("Whole Foods");
      this.transferMerchant = new Merchant("Transfer");
     
      untaggedStarbucks.setStatus(TxactionStatus.ACTIVE);
      untaggedStarbucks.setTagged(false);
      untaggedStarbucks.setMerchant(starbucksMerchant);
      taggedWholeFoods.setStatus(TxactionStatus.ACTIVE);
View Full Code Here

      assertEquals(ImmutableList.of(starbucks), list.getTxactions());
    }

    @Test
    public void itReturnsTxactionsWithMerchantNamesContainingTheQuery() throws Exception {
      starbucks.setMerchant(new Merchant("Starbucks"));
     
      final TxactionList list = buildTxactionList("Starbucks");
      assertEquals(ImmutableList.of(starbucks), list.getTxactions());
    }
View Full Code Here

  private List<Txaction> filterByMerchants(List<Txaction> txactions) {
    return Lists.newArrayList(
      Iterables.filter(txactions, new Predicate<Txaction>() {
        @Override
        public boolean apply(Txaction txaction) {
          final Merchant merchant = txaction.getMerchant();
          return (merchant != null) && merchantNames.contains(merchant.getName());
        }
      })
    );
  }
View Full Code Here

         
          if (note != null && note.toLowerCase().contains(lowerQuery)) {
            return true;
          }
         
          final Merchant merchant = txaction.getMerchant();
         
          if (merchant != null) {
            final String merchantName = merchant.getName();
           
            if (merchantName != null && merchantName.toLowerCase().contains(lowerQuery)) {
              return true;
            }
          }
View Full Code Here

TOP

Related Classes of com.wesabe.api.accounts.entities.Merchant

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.