makeTestData(); if (config('ninja.testvars.travis') !== false || !config('ninja.storecove_api_key')) $this->markTestSkipped("do not run in CI"); } public function testCreateLegalEntity() { $data = [ 'acts_as_receiver' => true, 'acts_as_sender' => true, 'advertisements' => ['invoice'], 'city' => $this->company->settings->city, 'country' => 'DE', 'county' => $this->company->settings->state, 'line1' => $this->company->settings->address1, 'line2' => $this->company->settings->address2, 'party_name' => $this->company->present()->name(), 'tax_registered' => true, 'tenant_id' => $this->company->company_key, 'zip' => $this->company->settings->postal_code, 'peppol_identifiers' => [ 'scheme' => 'DE:VAT', 'id' => 'DE:VAT' ], ]; $sc = new \App\Services\EDocument\Gateway\Storecove\Storecove(); $r = $sc->createLegalEntity($data, $this->company); $this->assertIsArray($r); } public function tesXAddPeppolIdentifier() { $sc = new \App\Services\EDocument\Gateway\Storecove\Storecove(); $r = $sc->addIdentifier(290868, "DE923356489", "DE:VAT"); // nlog($r->body()); // $this->assertIsArray($r); nlog($r); } // public function testUpdateLegalEntity() // { // $data = [ // 'peppol_identifiers' => [ // 'scheme' => 'DE:VAT', // 'id' => 'DE:VAT' // ], // ]; // $sc = new \App\Services\EDocument\Gateway\Storecove\Storecove(); // $r = $sc->updateLegalEntity(290868, $data); // $this->assertIsArray($r); // nlog($r); // } public function testGetLegalEntity() { $sc = new \App\Services\EDocument\Gateway\Storecove\Storecove(); $r = $sc->getLegalEntity(290868); $this->assertIsArray($r); } public function testSendDocument() { $x = ' DE-77323 2024-07-18 380 Untitled Company Dudweilerstr. 34b Ost Alessa 98060 Bayern DE Dudweilerstr. 34b Ost Alessa 98060 Bayern DE owner@gmail.com German Client Name Kinderhausen 96b Süd Jessestadt 33323 Bayern DE Kinderhausen 96b Süd Jessestadt 33323 Bayern DE No Email Set DE89370400440532013000 PFA-NAME PFA-Alias CHECKING IBAN EUR DEUTDEMMXXX Deutsche Bank 100 100 119.00 119.00 1 10 100 19 100 19 C62 19 mwst Product Description Product Key 10 '; $sc = new \App\Services\EDocument\Gateway\Storecove\Storecove(); $sc->sendDocument($x); } }