Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.clodesk.lib</groupId>
<artifactId>whmcs-api-restfull-client</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.clodesk.lib:whmcs-api-restfull-client:0.0.1"
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/whmcs-api-restfull-client-0.0.1.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.clodesk.lib.whmcs_api_restfull_client.invoker.*;
import com.clodesk.lib.whmcs_api_restfull_client.invoker.auth.*;
import com.clodesk.lib.whmcs_api_restfull_client.model.*;
import com.clodesk.lib.whmcs_api_restfull_client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
RequestAcceptOrder apiParameters = new RequestAcceptOrder(); // RequestAcceptOrder |
try {
WhmcsResponseSuccessAcceptOrder result = apiInstance.acceptOrder(apiParameters);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#acceptOrder");
e.printStackTrace();
}
}
}
All URIs are relative to https://www.sm-host.com/modules/addons/rest_ful
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | acceptOrder | POST /AcceptOrder | Accepts a pending order |
DefaultApi | addOrder | POST /AddOrder | Add order |
DefaultApi | updateClientProduct | POST /UpdateClientProduct | Update client Product |
- RequestAcceptOrder
- RequestAddOrder
- RequestUpdateClientProduct
- WhmcsResponseErrorGeneric
- WhmcsResponseSuccessAcceptOrder
- WhmcsResponseSuccessAddOrder
- WhmcsResponseSuccessUpdateClientProduct
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.