The JAVA Client SDK to communicate with IKODDI, the airtime and SMS delivery platform in West Africa
# ikoddi-java-sdk
The JAVA Client SDK to communicate with IKODDI, the airtime and SMS delivery plateform in West Africa
## How to install
```xml
com.kreezus
ikoddi-java-sdk
1.0.0
```
## How to use it ?
```java
/**AIRTIME**/
//Initialization of the API key for sending AIRTIME, the URL, and the GroupId (organization_id)
var ikoddiAirtime = Ikoddi
.builder()
.groupId("10268496")
.apiKey("LffL6sO6BHy5lBXHHrzKz5hn2LRg3tzx")
.build();
/*For testing purposes,
add .apiBaseURL("
api.staging.ikoddi.com")
during initialization.*/
// Retrieve all internet plans
var airtimePlanResponse = ikoddiAirtime.internetPlans();
// Send airtime
var airtimeResponse = ikoddiAirtime.sendAirtime(List.of("226XXXXXXXX"), "11203", "100", "null", "226", "BF");
/* sendAirtime methode attributes :
numbers : List of number to send airtime,
ref : The airtime reference;
for mobile credit, use 11101 for Orange operator, 12131 for Moov operator, 13160 for Telecel operator.
for the internet package, use a reference that you obtain by retrieving the reference list.
amount : airtime amount,
campagnName : This is the name you give to this transaction,
phoneCode : This is your international phone identifier. Default is 226,
isoCode : This is the ISO code of your country. Default is BF
*/
/**SMS**/
//Initialization of the API key for sending SMS, the URL, and the GroupId (organization_id)
var ikoddiSMS = Ikoddi
.builder()
.groupId("10268496")
.apiKey("zixVtKzPPjuFp3Bdw3MWLCDxtRTXjWXP")
.build();
/*For testing purposes,
add .withApiBaseURL("
api.staging.ikoddi.com")
during initialization.*/
//Send SMS
var smsResponse = ikoddiSMS.sendSMS(List.of("226XXXXXXXX"), "Ikoddi", "Test message", "", "226", "BF");
/* sendAirtime methode attributes :
numbers : List of number to send sms,
from : The person or organization sending the message,
message : The message,
smsBroadCast :This is the name you give to this bulk message sending,
phoneCode : This is your inter …