// Path: paystack/src/main/java/co/paystack/android/api/model/TransactionApiResponse.java
// public class TransactionApiResponse extends ApiResponse implements Serializable {
// 
//     @SerializedName("reference")
//     public String reference;
// 
//     @SerializedName("trans")
//     public String trans;
// 
//     @SerializedName("auth")
//     public String auth;
// 
//     @SerializedName("otpmessage")
//     public String otpmessage;
// 
//     @SerializedName("countryCode")
//     public String avsCountryCode; // Country code for Address Verification on supported international cards
// 
//     public static TransactionApiResponse unknownServerResponse() {
//         TransactionApiResponse t = new TransactionApiResponse();
//         t.status = "0";
//         t.message = "Unknown server response";
//         return t;
//     }
// 
//     public static TransactionApiResponse fromJsonString(String jsonString) {
//         try {
//             return new Gson().fromJson(jsonString, TransactionApiResponse.class);
//         } catch (Exception e) {
//             TransactionApiResponse t = new TransactionApiResponse();
//             t.status = "0";
//             t.message = e.getMessage();
//             return t;
//         }
//     }
// 
//     public boolean hasValidReferenceAndTrans() {
//         return (reference != null) && (trans != null);
//     }
// 
//     public boolean hasValidUrl() {
//         return otpmessage != null && URLUtil.isValidUrl(otpmessage);
//     }
// 
//     public boolean hasValidOtpMessage() {
//         return otpmessage != null;
//     }
// 
//     public boolean hasValidAuth() {
//         return auth != null;
//     }
// 
// }


import java.util.HashMap;
import co.paystack.android.api.model.TransactionApiResponse;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
package co.paystack.android.api.service;



/**
 * ApiService
 */
public interface ApiService {

    @FormUrlEncoded
    @POST("/charge/mobile_charge")
    Call<TransactionApiResponse> charge(@FieldMap HashMap<String, String> fields);

    @FormUrlEncoded
    @POST("/charge/validate")
    Call<TransactionApiResponse> validateCharge(@FieldMap HashMap<String, String> fields);

    @GET("/requery/{trans}")
    Call<TransactionApiResponse> requeryTransaction(@Path("trans") String trans);

    @FormUrlEncoded
    @POST("/charge/avs")
// Path: paystack/src/main/java/co/paystack/android/api/model/TransactionApiResponse.java
// public class TransactionApiResponse extends ApiResponse implements Serializable {
// 
//     @SerializedName("reference")
//     public String reference;
// 
//     @SerializedName("trans")
//     public String trans;
// 
//     @SerializedName("auth")
//     public String auth;
// 
//     @SerializedName("otpmessage")
//     public String otpmessage;
// 
//     @SerializedName("countryCode")
//     public String avsCountryCode; // Country code for Address Verification on supported international cards
// 
//     public static TransactionApiResponse unknownServerResponse() {
//         TransactionApiResponse t = new TransactionApiResponse();
//         t.status = "0";
//         t.message = "Unknown server response";
//         return t;
//     }
// 
//     public static TransactionApiResponse fromJsonString(String jsonString) {
//         try {
//             return new Gson().fromJson(jsonString, TransactionApiResponse.class);
//         } catch (Exception e) {
//             TransactionApiResponse t = new TransactionApiResponse();
//             t.status = "0";
//             t.message = e.getMessage();
//             return t;
//         }
//     }
// 
//     public boolean hasValidReferenceAndTrans() {
//         return (reference != null) && (trans != null);
//     }
// 
//     public boolean hasValidUrl() {
//         return otpmessage != null && URLUtil.isValidUrl(otpmessage);
//     }
// 
//     public boolean hasValidOtpMessage() {
//         return otpmessage != null;
//     }
// 
//     public boolean hasValidAuth() {
//         return auth != null;
//     }
// 
// }


// Path: paystack/src/main/java/co/paystack/android/api/service/ApiService.java
import java.util.HashMap;
import co.paystack.android.api.model.TransactionApiResponse;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

package co.paystack.android.api.service;



/**
 * ApiService
 */
public interface ApiService {

    @FormUrlEncoded
    @POST("/charge/mobile_charge")
    Call<TransactionApiResponse> charge(@FieldMap HashMap<String, String> fields);

    @FormUrlEncoded
    @POST("/charge/validate")
    Call<TransactionApiResponse> validateCharge(@FieldMap HashMap<String, String> fields);

    @GET("/requery/{trans}")
    Call<TransactionApiResponse> requeryTransaction(@Path("trans") String trans);

    @FormUrlEncoded
    @POST("/charge/avs")
    Call<TransactionApiResponse> submitCardAddress(@FieldMap HashMap<String, String> fields);