I am trying to call a method from a class, but its not working
namespace Vendor\RetailOps\Service;
/**
* Shipment class.
*
*/
abstract class Shipment implements \Vendor\RetailOps\Api\Shipment\ShipmentInterface
{
/**
* @param $order
*/
public function createShipment(\Magento\Sales\Api\Data\OrderInterface $order)
{
echo'check'; exit;
}
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/../app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$orderid = 940;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid);
echo $objectManager->create('Vendor\RetailOps\Service\Shipment')->createShipment($order);