A Java HTTP client for consuming arcus API.
-
Your arcus credentials.
-
Download Gson library and put it in the root directory of this project:
regalii:regaliator_java$ ls
README.md gson-2.8.5.jar pom.xml src target
Note: Latest version as of Aug. 2018 is 2.8.5
- Be sure to have Maven installed:
regalii:regaliator_java$ mvn --version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T14:39:06-05:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
We have included a couple of example classes to help you start testing our products right away:
- xData:
src/main/java/com/regalii/regaliator/RegaliatorXdataV32.java
- xPay:
src/main/java/com/regalii/regaliator/RegaliatorXpayV32.java
- Package Regaliator executing:
regalii:regaliator_java$ mvn package
This should generate the jar file: target/regaliator-0.0.1-SNAPSHOT.jar
.
- The example code requires that your credentials are available through
environment variables. Our team likes to use Direnv
to facilitate this task when working locally. If you decide to use it, your
.envrc
file should look something like this:
export API_KEY=your_api_key
export SECRET_KEY=your_secret_key
- Run any of the example classes provided like this:
regalii:regaliator_java$ java -cp "gson-2.8.5.jar:target/regaliator-0.0.1-SNAPSHOT.jar" com.regalii.regaliator.RegaliatorXdataV32
For more information about our API, please refer to the official documentation:
To deploy the project:
$ mvn clean source:jar javadoc:jar gpg:sign deploy -Dgpg.passphrase="THE_PASSPHRASE_OF_GPG_KEY"
To test with your current version of Node.js:
$ mvn test
The client supports 4 versions:
Version.v3_2
(recommended)Version.v3_1
Version.v3_0
Version.v1_5
final Response response = client.getAccount().info();
final Response response = client.getBill().create(params_as_map_of_string_and_object)
final Response response = client.getBill().show(uuid)
final Response response = client.getBill().update(uuid, params_as_map_of_string_and_object)
final Response response = client.getBill().list(params_as_map_of_string_and_object)
final Response response = client.getBill().delete(uuid)
final Response response = client.getBill().refresh(uuid)
final Response response = client.getBill().bulk_refresh(params_as_map_of_string_and_object)
final Response response = client.getBiller().list(params_as_map_of_string_and_object);
final Response response = client.getTransaction().list(params_as_map_of_string_and_object);
final Response response = client.getTransaction().create(params_as_map_of_string_and_object);
final Response response = client.getTransaction().delete(uuid);
final Response response = client.getAccount().info();
final Response response = client.getBill().create(params_as_map_of_string_and_object)
final Response response = client.getBill().show(id)
final Response response = client.getBill().update(id, params_as_map_of_string_and_object)
final Response response = client.getBill().refresh(id)
final Response response = client.getBill().pay(id, params_as_map_of_string_and_object)
final Response response = client.getBill().xdata(id)
final Response response = client.getBill().list(params_as_map_of_string_and_object)
final Response response = client.getBiller().credentials(params_as_map_of_string_and_object);
final Response response = client.getBiller().topups(params_as_map_of_string_and_object);
final Response response = client.getBiller().utilities(params_as_map_of_string_and_object);
final Response response = client.getRate().list(params_as_map_of_string_and_object);
final Response response = client.getRate().history(params_as_map_of_string_and_object);
final Response response = client.getTransaction().list(params_as_map_of_string_and_object);
final Response response = client.getTransaction().pay(params_as_map_of_string_and_object);
final Response response = client.getTransaction().reverse(params_as_map_of_string_and_object);
final Response response = client.getTransaction().cancel(params_as_map_of_string_and_object);
final Response response = client.getAccount().info();
final Response response = client.getBill().create(params_as_map_of_string_and_object)
final Response response = client.getBill().show(id)
final Response response = client.getBill().update(id, params_as_map_of_string_and_object)
final Response response = client.getBill().refresh(id)
final Response response = client.getBill().pay(id, params_as_map_of_string_and_object)
final Response response = client.getBill().xdata(id)
final Response response = client.getBill().list(params_as_map_of_string_and_object)
final Response response = client.getBiller().credentials(params_as_map_of_string_and_object);
final Response response = client.getBiller().topups(params_as_map_of_string_and_object);
final Response response = client.getBiller().utilities(params_as_map_of_string_and_object);
final Response response = client.getRate().list(params_as_map_of_string_and_object);
final Response response = client.getRate().history(params_as_map_of_string_and_object);
final Response response = client.getTransaction().list(params_as_map_of_string_and_object);
final Response response = client.getTransaction().pay(params_as_map_of_string_and_object);
final Response response = client.getTransaction().reverse(params_as_map_of_string_and_object);
final Response response = client.getTransaction().cancel(params_as_map_of_string_and_object);
final Response response = client.getAccount().info();
final Response response = client.getBill().index(params_as_map_of_string_and_object);
final Response response = client.getBill().consult(params_as_map_of_string_and_object);
final Response response = client.getBill().pay(params_as_map_of_string_and_object);
final Response response = client.getBill().check(params_as_map_of_string_and_object);
final Response response = client.getBiller().topups(params_as_map_of_string_and_object);
final Response response = client.getBiller().utilities(params_as_map_of_string_and_object);
final Response response = client.getRate().list(params_as_map_of_string_and_object);
final Response response = client.getRate().history(params_as_map_of_string_and_object);
final Response response = client.getTransaction().list(params_as_map_of_string_and_object);
final Response response = client.getTransaction().pay(params_as_map_of_string_and_object);
final Response response = client.getTransaction().reverse(params_as_map_of_string_and_object);
final Response response = client.getTransaction().cancel(params_as_map_of_string_and_object);