Class AppStoreApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert intput to byte arrayget ApiClientstatic AppStoreApigetInstance(ApiClient apiClient) AppStoreApi getInstancegetSubscription(String accessToken, UUID subscriptionId) Retrieves a subscription for a given subscriptionIdcom.google.api.client.http.HttpResponsegetSubscriptionForHttpResponse(String accessToken, UUID subscriptionId) Retrieves a subscription for a given subscriptionIdgetUsageRecords(String accessToken, UUID subscriptionId) Gets all usage records related to the subscriptioncom.google.api.client.http.HttpResponsegetUsageRecordsForHttpResponse(String accessToken, UUID subscriptionId) Gets all usage records related to the subscriptionget user agentpostUsageRecords(String accessToken, UUID subscriptionId, UUID subscriptionItemId, CreateUsageRecord createUsageRecord, String idempotencyKey) Send metered usage belonging to this subscription and subscription itemcom.google.api.client.http.HttpResponsepostUsageRecordsForHttpResponse(String accessToken, UUID subscriptionId, UUID subscriptionItemId, CreateUsageRecord createUsageRecord, String idempotencyKey) Send metered usage belonging to this subscription and subscription itemputUsageRecords(String accessToken, UUID subscriptionId, UUID subscriptionItemId, UUID usageRecordId, UpdateUsageRecord updateUsageRecord, String idempotencyKey) Update and existing metered usage belonging to this subscription and subscription itemcom.google.api.client.http.HttpResponseputUsageRecordsForHttpResponse(String accessToken, UUID subscriptionId, UUID subscriptionItemId, UUID usageRecordId, UpdateUsageRecord updateUsageRecord, String idempotencyKey) Update and existing metered usage belonging to this subscription and subscription itemvoidsetApiClient(ApiClient apiClient) set ApiClientvoidsetUserAgent(String userAgent) set user agent
-
Constructor Details
-
AppStoreApi
public AppStoreApi()AppStoreApi -
AppStoreApi
AppStoreApi- Parameters:
apiClient- ApiClient pass into the new instance of this class
-
-
Method Details
-
getInstance
AppStoreApi getInstance- Parameters:
apiClient- ApiClient pass into the new instance of this class- Returns:
- instance of this class
-
getApiClient
-
setApiClient
set ApiClient- Parameters:
apiClient- ApiClient pass into the new instance of this class
-
setUserAgent
set user agent- Parameters:
userAgent- string to override the user agent
-
getUserAgent
-
getSubscription
Retrieves a subscription for a given subscriptionId200 - Success - return response of unique Subscription object
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription object- Returns:
- Subscription
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getSubscriptionForHttpResponse
public com.google.api.client.http.HttpResponse getSubscriptionForHttpResponse(String accessToken, UUID subscriptionId) throws IOException Retrieves a subscription for a given subscriptionId200 - Success - return response of unique Subscription object
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getUsageRecords
Gets all usage records related to the subscription200 - Success - return a list of all usage record submitted against this subscription for this subscription period
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription object- Returns:
- UsageRecordsList
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getUsageRecordsForHttpResponse
public com.google.api.client.http.HttpResponse getUsageRecordsForHttpResponse(String accessToken, UUID subscriptionId) throws IOException Gets all usage records related to the subscription200 - Success - return a list of all usage record submitted against this subscription for this subscription period
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
postUsageRecords
public UsageRecord postUsageRecords(String accessToken, UUID subscriptionId, UUID subscriptionItemId, CreateUsageRecord createUsageRecord, String idempotencyKey) throws IOException Send metered usage belonging to this subscription and subscription item200 - Success - return response of the record submitted
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription objectsubscriptionItemId- The unique identifier of the subscriptionItemcreateUsageRecord- Contains the quantity for the usage record to createidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- UsageRecord
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
postUsageRecordsForHttpResponse
public com.google.api.client.http.HttpResponse postUsageRecordsForHttpResponse(String accessToken, UUID subscriptionId, UUID subscriptionItemId, CreateUsageRecord createUsageRecord, String idempotencyKey) throws IOException Send metered usage belonging to this subscription and subscription item200 - Success - return response of the record submitted
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription objectsubscriptionItemId- The unique identifier of the subscriptionItemcreateUsageRecord- Contains the quantity for the usage record to createidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
putUsageRecords
public UsageRecord putUsageRecords(String accessToken, UUID subscriptionId, UUID subscriptionItemId, UUID usageRecordId, UpdateUsageRecord updateUsageRecord, String idempotencyKey) throws IOException Update and existing metered usage belonging to this subscription and subscription item200 - Success - return response of the modified record
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription objectsubscriptionItemId- The unique identifier of the subscriptionItemusageRecordId- The unique identifier of the usage recordupdateUsageRecord- Contains the quantity for the usage record to updateidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- UsageRecord
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
putUsageRecordsForHttpResponse
public com.google.api.client.http.HttpResponse putUsageRecordsForHttpResponse(String accessToken, UUID subscriptionId, UUID subscriptionItemId, UUID usageRecordId, UpdateUsageRecord updateUsageRecord, String idempotencyKey) throws IOException Update and existing metered usage belonging to this subscription and subscription item200 - Success - return response of the modified record
404 - When a failure occurs in the endpoint
- Parameters:
accessToken- Authorization token for user set in header of each requestsubscriptionId- Unique identifier for Subscription objectsubscriptionItemId- The unique identifier of the subscriptionItemusageRecordId- The unique identifier of the usage recordupdateUsageRecord- Contains the quantity for the usage record to updateidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
convertInputToByteArray
convert intput to byte array- Parameters:
is- InputStream the server status code returned- Returns:
- byteArrayInputStream a ByteArrayInputStream
- Throws:
IOException- for failed or interrupted I/O operations
-