src/Jaspersoft/Service/OrganizationService.php
public function addOrUpdateAttribute(Organization $organization, $attribute)
    {
        $url = self::makeAttributeUrl($organization->id, null, $attribute->name);
        $data = json_encode($attribute);
        $response = $this->service->prepAndSend($url, array(201, 200), 'PUT', $data, true);

        return Attribute::createFromJSON(json_decode($response));
    }
public function addOrUpdateAttribute(Organization $organization, $attribute)
    {
        $url = self::makeAttributeUrl($organization->id, null, $attribute->name);
        $data = json_encode($attribute);
        $response = $this->service->prepAndSend($url, array(201, 200), 'PUT', $data, true);

        return Attribute::createFromJSON(json_decode($response));
    }
public function addOrUpdateAttribute ( Organization $ organization , $ attribute ) { $ url = self :: makeAttributeUrl ( $ organization -> id , null , $ attribute -> name ) ; $ data = json_encode ( $ attribute ) ; $ response = $ this -> service -> prepAndSend ( $ url , array ( 201 , 200 ) , 'PUT' , $ data , true ) ; return Attribute :: createFromJSON ( json_decode ( $ response ) ) ; }
Create a non-existent attribute, or update an existing attribute

@param Organization $organization
@param Attribute $attribute
@return bool|null
Create a non - existent attribute or update an existing attribute