@Test public void testGetMonthlyStorageCostsForAllTiers() throws Exception { List<Product> products = s3PriceList.getMonthlyStorageCostForAllTiers(AwsRegion.EU_WEST_1, StorageType.STANDARD); System.out.println("Storage type: " + StorageType.STANDARD.getName()); for(Product product : products){ System.out.println(product.getDescription() + ": " + product.getPrice()); } assert 0 < products.size(); }
public List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType) throws IOException { List<Product> products = new ArrayList<Product>(); List<Map<String, Object>> tiers = getTiers(region); if(tiers != null){ for (Map<String, Object> tier : tiers) { String tierId = (String) tier.get("name"); Price price = getStoragePrice(getSubList(tier, "storageTypes"), storageType); products.add(new Product(DataTier.getTierById(tierId).getName(), price)); } } return products; }
S3PriceList extends AbstractPriceList { public List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType) throws IOException { List<Product> products = new ArrayList<Product>(); List<Map<String, Object>> tiers = getTiers(region); if(tiers != null){ for (Map<String, Object> tier : tiers) { String tierId = (String) tier.get("name"); Price price = getStoragePrice(getSubList(tier, "storageTypes"), storageType); products.add(new Product(DataTier.getTierById(tierId).getName(), price)); } } return products; } }
S3PriceList extends AbstractPriceList { public List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType) throws IOException { List<Product> products = new ArrayList<Product>(); List<Map<String, Object>> tiers = getTiers(region); if(tiers != null){ for (Map<String, Object> tier : tiers) { String tierId = (String) tier.get("name"); Price price = getStoragePrice(getSubList(tier, "storageTypes"), storageType); products.add(new Product(DataTier.getTierById(tierId).getName(), price)); } } return products; }  }
S3PriceList extends AbstractPriceList { public List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType) throws IOException { List<Product> products = new ArrayList<Product>(); List<Map<String, Object>> tiers = getTiers(region); if(tiers != null){ for (Map<String, Object> tier : tiers) { String tierId = (String) tier.get("name"); Price price = getStoragePrice(getSubList(tier, "storageTypes"), storageType); products.add(new Product(DataTier.getTierById(tierId).getName(), price)); } } return products; }  List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType); Product getMonthlyStorageCostForTier(AwsRegion region, StorageType storageType, DataTier dataTier); Product getRequestCostByType(AwsRegion region, RequestType requestType); }
S3PriceList extends AbstractPriceList { public List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType) throws IOException { List<Product> products = new ArrayList<Product>(); List<Map<String, Object>> tiers = getTiers(region); if(tiers != null){ for (Map<String, Object> tier : tiers) { String tierId = (String) tier.get("name"); Price price = getStoragePrice(getSubList(tier, "storageTypes"), storageType); products.add(new Product(DataTier.getTierById(tierId).getName(), price)); } } return products; }  List<Product> getMonthlyStorageCostForAllTiers(AwsRegion region, StorageType storageType); Product getMonthlyStorageCostForTier(AwsRegion region, StorageType storageType, DataTier dataTier); Product getRequestCostByType(AwsRegion region, RequestType requestType);  }