// Path: libs/sms/src/main/java/com/africastalking/sms/FetchMessageResponse.java
// public final class FetchMessageResponse {
// 
//     @SerializedName("SMSMessageData")
//     public SmsMessageData data;
// 
//     public static final class SmsMessageData {
//         @SerializedName("Recipients")
//         public List<Message> messages = new ArrayList<>();
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/FetchSubscriptionResponse.java
// public final class FetchSubscriptionResponse {
//     @SerializedName("Subscriptions")
//     public List<Subscription> subscriptions = new ArrayList<>();
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/Message.java
// public final class Message {
//     public String from;
//     public String to;
//     public String text;
//     public String linkId;
//     public String date;
//     public long id;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/Recipient.java
// public final class Recipient {
//     public String number;
//     public String cost;
//     public String status;
//     public String messageId;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/SendMessageResponse.java
// public final class SendMessageResponse {
// 
//     @SerializedName("SMSMessageData")
//     public SmsMessageData data;
// 
//     public static final class SmsMessageData {
//         @SerializedName("Recipients")
//         public List<Recipient> recipients;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// 
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/Subscription.java
// public final class Subscription {
//     public long id;
//     public String phoneNumber;
//     public String date;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/SubscriptionResponse.java
// public final class SubscriptionResponse {
//     public String success;
//     public String description;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }


import com.africastalking.sms.FetchMessageResponse;
import com.africastalking.sms.FetchSubscriptionResponse;
import com.africastalking.sms.Message;
import com.africastalking.sms.Recipient;
import com.africastalking.sms.SendMessageResponse;
import com.africastalking.sms.Subscription;
import com.africastalking.sms.SubscriptionResponse;
import retrofit2.Response;
import java.io.IOException;
import java.util.List;
import java.util.StringJoiner;
            }
        }));
    }

    /**
     * Fetch messages
     * <p>
     *     Asynchronously send the request and notify {@code callback} of its response or if an error
     * occurred
     * </p>
     * @param callback
     */
    public void fetchMessages(Callback<List<Message>> callback) {
        fetchMessages("0", callback);
    }

    // -> Fetch Subscription

    /**
     * Fetch subscriptions
     * <p>
     *     Synchronously send the request and return its response.
     * </p>
     * @param shortCode
     * @param keyword
     * @param lastReceivedId
     * @return
     * @throws IOException
     */
    public List<Subscription> fetchSubscriptions(String shortCode, String keyword, String lastReceivedId) throws IOException {
// Path: libs/sms/src/main/java/com/africastalking/sms/FetchMessageResponse.java
// public final class FetchMessageResponse {
// 
//     @SerializedName("SMSMessageData")
//     public SmsMessageData data;
// 
//     public static final class SmsMessageData {
//         @SerializedName("Recipients")
//         public List<Message> messages = new ArrayList<>();
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/FetchSubscriptionResponse.java
// public final class FetchSubscriptionResponse {
//     @SerializedName("Subscriptions")
//     public List<Subscription> subscriptions = new ArrayList<>();
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/Message.java
// public final class Message {
//     public String from;
//     public String to;
//     public String text;
//     public String linkId;
//     public String date;
//     public long id;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/Recipient.java
// public final class Recipient {
//     public String number;
//     public String cost;
//     public String status;
//     public String messageId;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/SendMessageResponse.java
// public final class SendMessageResponse {
// 
//     @SerializedName("SMSMessageData")
//     public SmsMessageData data;
// 
//     public static final class SmsMessageData {
//         @SerializedName("Recipients")
//         public List<Recipient> recipients;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// 
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/Subscription.java
// public final class Subscription {
//     public long id;
//     public String phoneNumber;
//     public String date;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: libs/sms/src/main/java/com/africastalking/sms/SubscriptionResponse.java
// public final class SubscriptionResponse {
//     public String success;
//     public String description;
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }


// Path: libs/sms/src/main/java/com/africastalking/SmsService.java
import com.africastalking.sms.FetchMessageResponse;
import com.africastalking.sms.FetchSubscriptionResponse;
import com.africastalking.sms.Message;
import com.africastalking.sms.Recipient;
import com.africastalking.sms.SendMessageResponse;
import com.africastalking.sms.Subscription;
import com.africastalking.sms.SubscriptionResponse;
import retrofit2.Response;
import java.io.IOException;
import java.util.List;
import java.util.StringJoiner;

            }
        }));
    }

    /**
     * Fetch messages
     * <p>
     *     Asynchronously send the request and notify {@code callback} of its response or if an error
     * occurred
     * </p>
     * @param callback
     */
    public void fetchMessages(Callback<List<Message>> callback) {
        fetchMessages("0", callback);
    }

    // -> Fetch Subscription

    /**
     * Fetch subscriptions
     * <p>
     *     Synchronously send the request and return its response.
     * </p>
     * @param shortCode
     * @param keyword
     * @param lastReceivedId
     * @return
     * @throws IOException
     */
    public List<Subscription> fetchSubscriptions(String shortCode, String keyword, String lastReceivedId) throws IOException {
        Response<FetchSubscriptionResponse> resp = sms.fetchSubscriptions(mUsername, shortCode, keyword, lastReceivedId).execute();