Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ protected ServiceOrganizationUsage createService(Retrofit retrofit) {
*
* @param query the criteria to narrow down the search result.
* @return {@link CMAUsage} result instance
* @deprecated The {@code GET /organizations/{organization_id}/organization_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
public CMAArray<CMAUsage> fetchAll(
String organizationId,
Map<String, String> query) {
Expand Down Expand Up @@ -66,7 +70,11 @@ public class Async {


* @return {@link CMAUsage} result callback.
* @deprecated The {@code GET /organizations/{organization_id}/organization_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
public CMACallback<CMAArray<CMAUsage>> fetchAll(
String organizationId,
Map<String, String> query,
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/contentful/java/cma/ModuleSpaceUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ protected ServiceSpaceUsage createService(Retrofit retrofit) {
* @param organizationId organization id for the request.
* @param query the criteria to narrow down the search result.
* @return {@link CMAUsage} result instance
* @deprecated The {@code GET /organizations/{organization_id}/space_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
public CMAArray<CMAUsage> fetchAll(
String organizationId,
Map<String, String> query) {
Expand Down Expand Up @@ -66,7 +70,11 @@ public class Async {
* @param organizationId organization id for the request.
* @param query possible parameters of the request.
* @return {@link CMAUsage} result callback.
* @deprecated The {@code GET /organizations/{organization_id}/space_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
public CMACallback<CMAArray<CMAUsage>> fetchAll(
String organizationId,
Map<String, String> query,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@

public interface ServiceOrganizationUsage {

/**
* @deprecated The {@code GET /organizations/{organization_id}/organization_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
@GET("organizations/{organization_id}/organization_periodic_usages")
Flowable<CMAArray<CMAUsage>> fetchAll(
@Path("organization_id") String organizationId
);

/**
* @deprecated The {@code GET /organizations/{organization_id}/organization_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
@GET("organizations/{organization_id}/organization_periodic_usages")
Flowable<CMAArray<CMAUsage>> fetchAll(
@Path("organization_id") String organizationId,
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/contentful/java/cma/ServiceSpaceUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,23 @@
import java.util.Map;

public interface ServiceSpaceUsage {
/**
* @deprecated The {@code GET /organizations/{organization_id}/space_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
@GET("organizations/{organization_id}/space_periodic_usages")
Flowable<CMAArray<CMAUsage>> fetchAll(
@Path("organization_id") String organizationId
);

/**
* @deprecated The {@code GET /organizations/{organization_id}/space_periodic_usages}
* endpoint is deprecated in favor of the new Usage API. It will be removed on
* 2027-02-28, after which requests will return 410 Gone.
*/
@Deprecated
@GET("organizations/{organization_id}/space_periodic_usages")
Flowable<CMAArray<CMAUsage>> fetchAll(
@Path("organization_id") String organizationId,
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/contentful/java/cma/model/CMAUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

import java.util.LinkedHashMap;

/**
* @deprecated The {@code GET /organizations/{organization_id}/organization_periodic_usages}
* and {@code GET /organizations/{organization_id}/space_periodic_usages} endpoints are
* deprecated in favor of the new Usage API. They will be removed on 2027-02-28, after
* which requests will return 410 Gone.
*/
@Deprecated
public class CMAUsage extends CMAResource {
private String unitOfMeasure;
private UsageMetric metric;
Expand Down
Loading