コード例 #1
0
ファイル: Manager.php プロジェクト: gpupo/netshoes-sdk
 protected function resolvePrevious(Order $entity)
 {
     try {
         $o = $this->findById($entity->getId());
         if ($o instanceof Order) {
             return $o;
         }
     } catch (\Exception $o) {
         throw new \Exception('Order #' . $entity->getId() . ' not found on marketplace!');
     }
 }
コード例 #2
0
ファイル: Application.php プロジェクト: gpupo/netshoes-sdk
 public function displayOrder(Order $order, OutputInterface $output)
 {
     $output->writeln('Order #<comment>' . $order->getId() . '</comment>');
     $this->displayTableResults($output, [$order->toLog()]);
     $this->displayTableResults($output, $order->getShipping()->getCustomer()->toLog());
     $this->displayTableResults($output, [$order->getShipping()->getInvoice()->toArray()]);
     $this->displayTableResults($output, [$order->getShipping()->getTransport()->toArray()]);
     $this->displayTableResults($output, $order->getShipping()->getItems()->toLog());
 }
コード例 #3
0
ファイル: ManagerTest.php プロジェクト: gpupo/netshoes-sdk
 protected function commonAsserts(Order $order)
 {
     $this->assertSame('111111', $order->getOrderNumber());
     $this->assertSame('111111', $order->getId());
     $this->assertSame(1, $order->getShipping()->getShippingCode());
 }