Commit 2d751c9a77fae21ea027a4f1b823b6d1f552e2bb

Stephen Moloney 2017-03-17T13:13:29

fixes for some of the cloud queries

diff --git a/lib/ex_ovh/v1/cloud.ex b/lib/ex_ovh/v1/cloud.ex
index 9393d01..953eed2 100644
--- a/lib/ex_ovh/v1/cloud.ex
+++ b/lib/ex_ovh/v1/cloud.ex
@@ -107,8 +107,8 @@ defmodule ExOvh.V1.Cloud do
       method: :post,
       url: "/cloud/project/#{service_name}/storage"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -247,8 +247,8 @@ defmodule ExOvh.V1.Cloud do
       method: :post,
       url: "/cloud/project/#{service_name}/storage/#{container_id}/cors"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -368,8 +368,8 @@ defmodule ExOvh.V1.Cloud do
       method: :get,
       url: "/cloud/project/#{service_name}/user"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -507,8 +507,8 @@ defmodule ExOvh.V1.Cloud do
       method: :post,
       url: "/cloud/project/#{service_name}/user/#{user_id}/token"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -539,8 +539,8 @@ defmodule ExOvh.V1.Cloud do
       method: :post,
       url: "/cloud/createProject"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -572,10 +572,10 @@ defmodule ExOvh.V1.Cloud do
     body = if params == %{}, do: "", else: Poison.encode!(params)
     req = %HTTPipe.Request{
       method: :get,
-      url: "/cloud/createProject"
+      url: "/cloud/price"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -629,8 +629,8 @@ defmodule ExOvh.V1.Cloud do
       method: :put,
       url: "/cloud/project/#{service_name}"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -856,8 +856,8 @@ defmodule ExOvh.V1.Cloud do
       method: :post,
       url: "/cloud/project/#{service_name}/alerting"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end
 
 
@@ -918,8 +918,8 @@ defmodule ExOvh.V1.Cloud do
       method: :put,
       url: "/cloud/project/#{service_name}/alerting/#{alert_id}"
     }
-    |> Body.apply(body)
     Map.put(HTTPipe.Conn.new(), :request, req)
+    |> Body.apply(body)
   end