/** * @param \Orm\Zed\Sales\Persistence\SpySalesOrder $salesOrderEntity * * @return void */ protected function addOrderDetails(SpySalesOrder $salesOrderEntity) { $salesOrderEntity->setOrderReference(random_int(0, 9999999)); $salesOrderEntity->setIsTest(true); $salesOrderEntity->setSalutation(SpySalesOrderTableMap::COL_SALUTATION_MR); $salesOrderEntity->setFirstName('FirstName'); $salesOrderEntity->setLastName('LastName'); }
/** * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer * @param \Orm\Zed\Sales\Persistence\SpySalesOrder $salesOrderEntity * * @return void */ protected function hydrateSalesOrderCustomer(QuoteTransfer $quoteTransfer, SpySalesOrder $salesOrderEntity) { $customerTransfer = $quoteTransfer->getCustomer(); $salesOrderEntity->setFkCustomer($customerTransfer->getIdCustomer()); $salesOrderEntity->setEmail($customerTransfer->getEmail()); $salesOrderEntity->setFirstName($customerTransfer->getFirstName()); $salesOrderEntity->setLastName($customerTransfer->getLastName()); }