All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cardpay.sdk.api.AuthApi Maven / Gradle / Ivy

There is a newer version: 3.82.1
Show newest version
package com.cardpay.sdk.api;

import com.cardpay.sdk.client.CollectionFormats.*;
import com.cardpay.sdk.model.ApiTokens;
import retrofit2.Call;
import retrofit2.http.*;

public interface AuthApi {
  /**
   * Get authorization token
   * 
   * @param grantType Token request credentials representation (required)
   * @param password Terminal password value (only for [password] grant type) (optional)
   * @param refreshToken Refresh token string (only for [refresh_token] grant type) (optional)
   * @param terminalCode Terminal code value (optional)
   * @return Call<ApiTokens>
   */
  @retrofit2.http.FormUrlEncoded
  @POST("api/auth/token")
  Call obtainTokens(
    @retrofit2.http.Field("grant_type") String grantType, @retrofit2.http.Field("password") String password, @retrofit2.http.Field("refresh_token") String refreshToken, @retrofit2.http.Field("terminal_code") String terminalCode
  );

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy