def create(order)
      validate_type!(order)

      attributes = sanitize(order)
      _, _, root = @client.post("/orders", attributes)

      Order.new(root[:data])
    end
def create(order)
      validate_type!(order)

      attributes = sanitize(order)
      _, _, root = @client.post("/orders", attributes)

      Order.new(root[:data])
    end
Create an order

 post '/orders'

 Create a new order for a deal
 User needs to have access to the deal to create an order
 Each deal can have at most one order and error is returned when attempting to create more

 @param order [Order, Hash] Either object of the Order type or Hash. This object's attributes describe the object to be created.
 @return [Order] The resulting object represting created resource.