src/Datajet/Resource/Product.php
public function import(array $data)
    {
        $response = $this->client->post("{$this->uriImport}product/", [
            'json' => $data,
            'query' => [
                'key' => $this->config['data']['key'],
            ],
        ]);

        $response = json_decode($response->getBody(), true);

        if (isset($response['affected']) && $response['affected'] > 0) {
            return true;
        }

        return false;
    }
public function import(array $data)
    {
        $response = $this->client->post("{$this->uriImport}product/", [
            'json' => $data,
            'query' => [
                'key' => $this->config['data']['key'],
            ],
        ]);

        $response = json_decode($response->getBody(), true);

        if (isset($response['affected']) && $response['affected'] > 0) {
            return true;
        }

        return false;
    }
public function import ( array $ data ) { $ response = $ this -> client -> post ( "{$this->uriImport}product/" , [ 'json' => $ data , 'query' => [ 'key' => $ this -> config [ 'data' ] [ 'key' ] , ] , ] ) ; $ response = json_decode ( $ response -> getBody ( ) , true ) ; if ( isset ( $ response [ 'affected' ] ) && $ response [ 'affected' ] > 0 ) { return true ; } return false ; }
Atomic product import.

@param array $data A list of product to import

@throws \GuzzleHttp\Exception\GuzzleException

@return bool
Atomic product import .