public function addOrUpdateAttribute(Attribute $attribute)
    {
        $url = self::makeAttributeUrl(null, $attribute->name);
        $body = json_encode($attribute);
        $response = $this->service->prepAndSend($url, array(200, 201), 'PUT', $body, true);

        if (!empty($response)) {
            return Attribute::createFromJSON(json_decode($response));
        } else {
            return true;
        }
    }