<?php

namespace PortalPeople\magento\commands;

use Yii;
use yii\console\Controller;
use PortalPeople\magento\models\Cart;
use PortalPeople\magento\Module;
use PortalPeople\magento\services\MagentoClient;

class ImportMagentoOrdersController extends Controller
{
    public $baseUrl;
    public $accessToken;
    public $limit = 20;

    public function options($actionID)
    {
        return ['baseUrl', 'accessToken', 'limit'];
    }

    public function actionRun()
    {
        Yii::$app->queue
            ->jobname('magento-import-orders')
            ->push(new \PortalPeople\magento\jobs\ImportMagentoOrderJob(['limit' => 50]));
    }
}
