com.cloudesire.platform.apiclient.api.SubscriptionApi Maven / Gradle / Ivy
The newest version!
package com.cloudesire.platform.apiclient.api;
import com.cloudesire.platform.apiclient.dto.model.dto.ApplicationCredentialInputDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.EndpointDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.NamedEntityDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.OneshotCostLineDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.PricedEntityDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.RecurringCostLineDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.SubscriptionDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.SubscriptionDeploymentDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.SubscriptionDetailDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.SubscriptionPatchDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.SubscriptionPatchResponseDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.VendorOrderLineDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.changelog.ChangelogDTO;
import com.cloudesire.platform.apiclient.dto.model.enums.CustomInvoiceType;
import com.cloudesire.platform.apiclient.query.CostsQuery;
import com.cloudesire.platform.apiclient.query.SubscriptionQuery;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.HEAD;
import retrofit2.http.Headers;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import java.util.List;
import java.util.Map;
public interface SubscriptionApi
{
@HEAD( "subscription" )
Call getAllPagedHead();
@HEAD( "subscription" )
Call getAllPagedHead( @QueryMap SubscriptionQuery query );
@GET( "subscription" )
Call> getAll();
@GET( "subscription" )
@Headers( "Prefer: response=minimal" )
Call> getAllMinimal( @QueryMap SubscriptionQuery query );
@GET( "subscription" )
@Headers( "Prefer: response=priced" )
Call> getAllPriced( @QueryMap SubscriptionQuery subscriptionQuery, @QueryMap CostsQuery costsQuery );
@GET( "subscription" )
@Headers( "Prefer: response=deployment" )
Call> getAllDeployment( @QueryMap SubscriptionQuery query );
@GET( "subscription" )
Call> getAll( @QueryMap SubscriptionQuery query );
@POST( "subscription/{id}/invoice/oneshot" )
Call addOneshotCosts( @Path( "id" ) int id, @Body List lines );
@POST( "subscription/{id}/invoice/recurring" )
Call addRecurringCosts( @Path( "id" ) int id, @Body List lines );
@DELETE( "subscription/{id}" )
Call delete( @Path( "id" ) Integer id );
@PATCH( "subscription/{id}" )
Call partialUpdate( @Path( "id" ) int id, @Body SubscriptionPatchDTO input );
@PATCH( "subscription/{id}" )
Call partialUpdate( @Path( "id" ) int id, @Body SubscriptionPatchDTO input,
@Query( "language" ) String language );
@GET( "subscription/expiring" )
Call> getExpiring();
@GET( "subscription/{id}" )
Call get( @Path( "id" ) Integer id );
@GET( "subscription/{id}" )
Call get( @Path( "id" ) Integer id, @Query( "language" ) String language );
@GET( "subscription/{id}" )
@Headers( "Prefer: response=minimal" )
Call getMinimal( @Path( "id" ) int id );
@GET( "subscription/{id}/changelog" )
Call getChangelog( @Path( "id" ) int id );
@POST( "subscription/{id}/invoice" )
Call customInvoice( @Path( "id" ) int id,
@Body List lines,
@Query( "type" ) CustomInvoiceType type );
/**
* @deprecated by {@link #customInvoice(int, List, CustomInvoiceType)}
*/
@Deprecated
@POST( "subscription/{id}/invoice" )
Call postOrderLines( @Path( "id" ) int id, @Body List lines,
@Query( "cashed" ) Boolean cashed );
@POST( "subscription/{id}/credentials" )
Call setApplicationCredentials( @Path( "id" ) int id, @Body List credentials );
@POST( "subscription/{id}/instructions" )
Call setEndUserInstructions( @Path( "id" ) int id, @Body Map instructions );
@POST( "subscription/{id}/endpoints" )
Call setSyndicatedEndpoints( @Path( "id" ) int id, @Body List endpointsDTO );
@GET( "subscription/{id}/metadata" )
Call