public function createCategory(Category $category)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['category' => $category], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/categories', $parameters);
        $result = new CategoryResponse($result);

        return $result;
    }
public function createCategory(Category $category)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['category' => $category], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/categories', $parameters);
        $result = new CategoryResponse($result);

        return $result;
    }
public function createCategory ( Category $ category ) { $ parameters = [ 'query' => [ ] , 'body' => json_encode ( [ 'category' => $ category ] , JSON_UNESCAPED_UNICODE ) , 'headers' => [ ] , ] ; $ result = $ this -> post ( 'v1/categories' , $ parameters ) ; $ result = new CategoryResponse ( $ result ) ; return $ result ; }
Create a Category.

@param  Category         $category A JSON encoded Category to create
@return CategoryResponse
Create a Category .