|
|
|
@ -1,19 +1,24 @@ |
|
|
|
package com.vernu.sms.services; |
|
|
|
|
|
|
|
import com.vernu.sms.dtos.SMSDTO; |
|
|
|
import com.vernu.sms.dtos.SMSForwardResponseDTO; |
|
|
|
import com.vernu.sms.dtos.RegisterDeviceInputDTO; |
|
|
|
import com.vernu.sms.dtos.RegisterDeviceResponseDTO; |
|
|
|
|
|
|
|
import retrofit2.Call; |
|
|
|
import retrofit2.http.Body; |
|
|
|
import retrofit2.http.Header; |
|
|
|
import retrofit2.http.PATCH; |
|
|
|
import retrofit2.http.POST; |
|
|
|
import retrofit2.http.Path; |
|
|
|
import retrofit2.http.Query; |
|
|
|
|
|
|
|
public interface GatewayApiService { |
|
|
|
@POST("gateway/devices") |
|
|
|
Call<RegisterDeviceResponseDTO> registerDevice(@Query("apiKey") String apiKey, @Body() RegisterDeviceInputDTO body); |
|
|
|
Call<RegisterDeviceResponseDTO> registerDevice(@Header("x-api-key") String apiKey, @Body() RegisterDeviceInputDTO body); |
|
|
|
|
|
|
|
@PATCH("gateway/devices/{deviceId}") |
|
|
|
Call<RegisterDeviceResponseDTO> updateDevice(@Path("deviceId") String deviceId, @Query("apiKey") String apiKey, @Body() RegisterDeviceInputDTO body); |
|
|
|
Call<RegisterDeviceResponseDTO> updateDevice(@Path("deviceId") String deviceId, @Header("x-api-key") String apiKey, @Body() RegisterDeviceInputDTO body); |
|
|
|
|
|
|
|
@POST("gateway/devices/{deviceId}/receivedSMS") |
|
|
|
Call<SMSForwardResponseDTO> sendReceivedSMS(@Path("deviceId") String deviceId, @Header("x-api-key") String apiKey, @Body() SMSDTO body); |
|
|
|
} |