// Path: libs/account/src/main/java/com/africastalking/account/AccountResponse.java
// public final class AccountResponse {
// 
//     @SerializedName("UserData")
//     public UserData userData;
// 
//     public static final class UserData {
//         public String balance;
// 
//         @Override
//         public String toString() {
//             return new Gson().toJson(this);
//         }
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }


import com.africastalking.account.AccountResponse;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import java.io.IOException;
        Retrofit retrofit = mRetrofitBuilder
                .baseUrl(url)
                .build();

        service = retrofit.create(IAccount.class);
    }

    @Override
    protected boolean isInitialized() {
        return sInstance != null;
    }

    @Override
    protected void destroyService() {
        if (sInstance != null) {
            sInstance = null;
        }
    }


    // ->

    /**
     * Get user info.
     * <p>
     *     Synchronously send the request and return its response.
     * </p>
     * @return String in specified format, xml or json
     * @throws IOException
     */
// Path: libs/account/src/main/java/com/africastalking/account/AccountResponse.java
// public final class AccountResponse {
// 
//     @SerializedName("UserData")
//     public UserData userData;
// 
//     public static final class UserData {
//         public String balance;
// 
//         @Override
//         public String toString() {
//             return new Gson().toJson(this);
//         }
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }


// Path: libs/account/src/main/java/com/africastalking/AccountService.java
import com.africastalking.account.AccountResponse;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import java.io.IOException;

        Retrofit retrofit = mRetrofitBuilder
                .baseUrl(url)
                .build();

        service = retrofit.create(IAccount.class);
    }

    @Override
    protected boolean isInitialized() {
        return sInstance != null;
    }

    @Override
    protected void destroyService() {
        if (sInstance != null) {
            sInstance = null;
        }
    }


    // ->

    /**
     * Get user info.
     * <p>
     *     Synchronously send the request and return its response.
     * </p>
     * @return String in specified format, xml or json
     * @throws IOException
     */
    public AccountResponse fetchAccount() throws IOException {