@Test public void getDownloadUrl_freeContent() { mockServer.expect(requestTo("https: .andExpect(method(POST)) .andRespond(withResponse(jsonResource("data/iap-temporary-url"), responseHeaders)); String downloadUrl = urbanAirship.inAppPurchaseOperations().getDownloadUrl("12345"); assertEquals("https: mockServer.verify(); }
public String getDownloadUrl(String productId) { DownloadUrl downloadUrl = restOperations.postForObject(IAP_URL + "content/" + productId + "/download", "", DownloadUrl.class); return downloadUrl.getContentUrl(); }
InAppPurchaseTemplate implements InAppPurchaseOperations { public String getDownloadUrl(String productId) { DownloadUrl downloadUrl = restOperations.postForObject(IAP_URL + "content/" + productId + "/download", "", DownloadUrl.class); return downloadUrl.getContentUrl(); } }
InAppPurchaseTemplate implements InAppPurchaseOperations { public String getDownloadUrl(String productId) { DownloadUrl downloadUrl = restOperations.postForObject(IAP_URL + "content/" + productId + "/download", "", DownloadUrl.class); return downloadUrl.getContentUrl(); } InAppPurchaseTemplate(RestOperations restOperations); }
InAppPurchaseTemplate implements InAppPurchaseOperations { public String getDownloadUrl(String productId) { DownloadUrl downloadUrl = restOperations.postForObject(IAP_URL + "content/" + productId + "/download", "", DownloadUrl.class); return downloadUrl.getContentUrl(); } InAppPurchaseTemplate(RestOperations restOperations); List<InventoryItem> getInventory(); String getDownloadUrl(String productId); String getDownloadUrl(String productId, ContentReceipt receipt); List<Product> checkForUpdates(List<Product> products); }
InAppPurchaseTemplate implements InAppPurchaseOperations { public String getDownloadUrl(String productId) { DownloadUrl downloadUrl = restOperations.postForObject(IAP_URL + "content/" + productId + "/download", "", DownloadUrl.class); return downloadUrl.getContentUrl(); } InAppPurchaseTemplate(RestOperations restOperations); List<InventoryItem> getInventory(); String getDownloadUrl(String productId); String getDownloadUrl(String productId, ContentReceipt receipt); List<Product> checkForUpdates(List<Product> products);  }