public function get($productId, array $fields = array())
    {
        $params = array();
        if (!empty($fields)) {
            $params['fields'] = $fields;
        }
        $endpoint = '/admin/products/'.$productId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Product::class, $response['product']);
    }
public function get($productId, array $fields = array())
    {
        $params = array();
        if (!empty($fields)) {
            $params['fields'] = $fields;
        }
        $endpoint = '/admin/products/'.$productId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Product::class, $response['product']);
    }
public function get ( $ productId , array $ fields = array ( ) ) { $ params = array ( ) ; if ( ! empty ( $ fields ) ) { $ params [ 'fields' ] = $ fields ; } $ endpoint = '/admin/products/' . $ productId . '.json' ; $ response = $ this -> request ( $ endpoint , 'GET' , $ params ) ; return $ this -> createObject ( Product :: class , $ response [ 'product' ] ) ; }
Receive a single product

@link   https://help.shopify.com/api/reference/product#show
@param  integer $productId
@param  array   $fields
@return Product
Receive a single product