package beer.brew.vendingmachine.data.remote;

import beer.brew.vendingmachine.data.model.PayResult;
import retrofit.Retrofit;
import retrofit.RxJavaCallAdapterFactory;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import rx.Observable;

public interface OrderService {

    String ENDPOINT = "http://103.227.51.161:5150";

    @GET("/beerbrew/preorder")
    Observable<String> getOrderInfo();

    @POST("")
    Observable<PayResult> getPayResult(@Body String orderId);

    class Creator {

        public static OrderService newOrderService() {
            Retrofit retrofit = new Retrofit.Builder()
                    .baseUrl(OrderService.ENDPOINT)
                    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                    .build();
            return retrofit.create(OrderService.class);
        }
    }
}

@@ -94,16 +94,54 @@
 Result;%0A
+import retrofit.GsonConverterFactory;%0A
 import r
@@ -720,16 +720,88 @@
 DPOINT)%0A
+                    .addConverterFactory(GsonConverterFactory.create())%0A
         

convert factory not initiated