package com.mercadopago.services;

import com.mercadopago.adapters.MPCall;
import com.mercadopago.model.Installment;
import com.mercadopago.model.Issuer;
import com.mercadopago.model.PaymentMethod;

import java.math.BigDecimal;
import java.util.List;

import retrofit2.http.GET;
import retrofit2.http.Query;

public interface PaymentService {

    @GET("/v1/payment_methods")
    MPCall<List<PaymentMethod>> getPaymentMethods(@Query("public_key") String publicKey, @Query("access_token") String privateKey);

    @GET("/v1/payment_methods/installments")
    MPCall<List<Installment>> getInstallments(@Query("public_key") String publicKey, @Query("access_token") String privateKey, @Query("bin") String bin, @Query("amount") BigDecimal amount, @Query("issuer.id") Long issuerId, @Query("payment_method_id") String paymentMethodId, @Query("locale") String locale, @Query("processing_mode") String processingMode);

    @GET("/v1/payment_methods/card_issuers")
    MPCall<List<Issuer>> getIssuers(@Query("public_key") String publicKey, @Query("access_token") String privateKey, @Query("payment_method_id") String paymentMethodId, @Query("bin") String bin, @Query("processing_mode") String processingMode);

}
@@ -28,16 +28,52 @@
 vices;%0A%0A
+import com.mercadopago.BuildConfig;%0A
 import c
@@ -104,16 +104,16 @@
 MPCall;%0A
-
 import c
@@ -541,34 +541,72 @@
 y);%0A%0A    @GET(%22/
-v1
+%22 + BuildConfig.API_VERSION + %22/checkout
 /payment_methods
@@ -983,34 +983,72 @@
 e);%0A%0A    @GET(%22/
-v1
+%22 + BuildConfig.API_VERSION + %22/checkout
 /payment_methods

Change endpoints in installments and issuers (#630)