Skip to content

Latest commit

 

History

History
185 lines (132 loc) · 5.76 KB

BillingApi.md

File metadata and controls

185 lines (132 loc) · 5.76 KB

BillingApi

All URIs are relative to /

Method HTTP request Description
getDetailedInvoiceUsingGET GET /users-web/api/v3/billing/invoice/{service}/{year}/{month} Get invoice details
listAvailablePlansUsingGET1 GET /users-web/api/v3/billing/availablePlans Get available plans
updatePlanUsingPUT PUT /users-web/api/v3/billing/info/{appId} Update plan for an app

getDetailedInvoiceUsingGET

InvoiceResponse getDetailedInvoiceUsingGET(service, year, month)

Get invoice details

Example

// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.BillingApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

BillingApi apiInstance = new BillingApi();
String service = "service_example"; // String | service
Integer year = 56; // Integer | year
Integer month = 56; // Integer | month
try {
    InvoiceResponse result = apiInstance.getDetailedInvoiceUsingGET(service, year, month);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BillingApi#getDetailedInvoiceUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
service String service
year Integer year
month Integer month

Return type

InvoiceResponse

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listAvailablePlansUsingGET1

PlansResponse listAvailablePlansUsingGET1(integrationId, appType)

Get available plans

Example

// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.BillingApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

BillingApi apiInstance = new BillingApi();
Long integrationId = 789L; // Long | integrationId
String appType = "appType_example"; // String | appType
try {
    PlansResponse result = apiInstance.listAvailablePlansUsingGET1(integrationId, appType);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BillingApi#listAvailablePlansUsingGET1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
integrationId Long integrationId [optional]
appType String appType [optional]

Return type

PlansResponse

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updatePlanUsingPUT

UpdatePlanResponse updatePlanUsingPUT(body, appId)

Update plan for an app

Example

// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.BillingApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

BillingApi apiInstance = new BillingApi();
BillingInfo body = new BillingInfo(); // BillingInfo | dto
Long appId = 789L; // Long | appId
try {
    UpdatePlanResponse result = apiInstance.updatePlanUsingPUT(body, appId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BillingApi#updatePlanUsingPUT");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body BillingInfo dto
appId Long appId

Return type

UpdatePlanResponse

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json