markTestSkipped('No Quickbooks Client ID found'); } $company = Company::find(1); if(!$company){ $this->markTestSkipped('No company found'); } $this->qb = new QuickbooksService($company); } public function testImportProducts() { $entity = 'Product'; $entities = [ 'client' => 'Customer', 'product' => 'Item', 'invoice' => 'Invoice', // 'sales' => 'SalesReceipt', ]; foreach($entities as $key => $entity) { $records = $this->qb->sdk()->fetchRecords($entity); $this->assertNotNull($records); switch ($key) { case 'product': $this->qb->product->syncToNinja($records); break; case 'client': $this->qb->client->syncToNinja($records); break; case 'invoice': $this->qb->invoice->syncToNinja($records); break; case 'sales': $this->qb->invoice->syncToNinja($records); break; } } } }