public function create(Product &$product)
    {
        $data = $product->exportData();
        $endpoint = '/admin/products.json';
        $response = $this->request(
            $endpoint, 'POST', array(
            'product' => $data
            )
        );
        $product->setData($response['product']);
    }
public function create(Product &$product)
    {
        $data = $product->exportData();
        $endpoint = '/admin/products.json';
        $response = $this->request(
            $endpoint, 'POST', array(
            'product' => $data
            )
        );
        $product->setData($response['product']);
    }
public function create ( Product & $ product ) { $ data = $ product -> exportData ( ) ; $ endpoint = '/admin/products.json' ; $ response = $ this -> request ( $ endpoint , 'POST' , array ( 'product' => $ data ) ) ; $ product -> setData ( $ response [ 'product' ] ) ; }
Create a new Product

@link   https://help.shopify.com/api/reference/product#create
@param  Product $product
@return void
Create a new Product