Working on a status gateway to get the ticket's default status
This commit is contained in:
parent
31ced3f572
commit
c8485c0fa3
17
api/BusinessLogic/Statuses/Closable.php
Normal file
17
api/BusinessLogic/Statuses/Closable.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: mkoch
|
||||||
|
* Date: 2/15/2017
|
||||||
|
* Time: 9:52 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BusinessLogic\Statuses;
|
||||||
|
|
||||||
|
|
||||||
|
class Closable {
|
||||||
|
const YES = "yes";
|
||||||
|
const STAFF_ONLY = "sonly";
|
||||||
|
const CUSTOMERS_ONLY = "conly";
|
||||||
|
const NO = "no";
|
||||||
|
}
|
22
api/BusinessLogic/Statuses/DefaultStatusForAction.php
Normal file
22
api/BusinessLogic/Statuses/DefaultStatusForAction.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: mkoch
|
||||||
|
* Date: 2/15/2017
|
||||||
|
* Time: 9:46 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BusinessLogic\Statuses;
|
||||||
|
|
||||||
|
|
||||||
|
class DefaultStatusForAction {
|
||||||
|
const NEW_TICKET = "IsNewTicketStatus";
|
||||||
|
const CLOSED_STATUS = "IsClosed";
|
||||||
|
const CLOSED_BY_CLIENT = "IsClosedByClient";
|
||||||
|
const CUSTOMER_REPLY = "IsCustomerReplyStatus";
|
||||||
|
const CLOSED_BY_STAFF = "IsStaffClosedOption";
|
||||||
|
const REOPENED_BY_STAFF = "IsStaffReopenedStatus";
|
||||||
|
const DEFAULT_STAFF_REPLY = "IsDefaultStaffReplyStatus";
|
||||||
|
const LOCKED_TICKET = "LockedTicketStatus";
|
||||||
|
const AUTOCLOSE_STATUS = "IsAutoCloseOption";
|
||||||
|
}
|
36
api/BusinessLogic/Statuses/Status.php
Normal file
36
api/BusinessLogic/Statuses/Status.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BusinessLogic\Statuses;
|
||||||
|
|
||||||
|
|
||||||
|
class Status {
|
||||||
|
/**
|
||||||
|
* @var $id int
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $textColor string
|
||||||
|
*/
|
||||||
|
public $textColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $defaultActions DefaultStatusForAction[]
|
||||||
|
*/
|
||||||
|
public $defaultActions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $closable Closable
|
||||||
|
*/
|
||||||
|
public $closable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $sort int
|
||||||
|
*/
|
||||||
|
public $sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $name string[]
|
||||||
|
*/
|
||||||
|
public $localizedNames;
|
||||||
|
}
|
19
api/DataAccess/Statuses/StatusGateway.php
Normal file
19
api/DataAccess/Statuses/StatusGateway.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace DataAccess\Statuses;
|
||||||
|
|
||||||
|
|
||||||
|
use BusinessLogic\Statuses\DefaultStatusForAction;
|
||||||
|
use BusinessLogic\Statuses\Status;
|
||||||
|
|
||||||
|
class StatusGateway {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $defaultAction DefaultStatusForAction
|
||||||
|
* @return Status
|
||||||
|
*/
|
||||||
|
function getStatusForDefaultAction($defaultAction) {
|
||||||
|
//-- TODO
|
||||||
|
return new Status();
|
||||||
|
}
|
||||||
|
}
|
@ -158,7 +158,7 @@ class CreateTicketTest extends TestCase {
|
|||||||
$this->ticketRequest->suggestedKnowledgebaseArticleIds = [1, 2, 3];
|
$this->ticketRequest->suggestedKnowledgebaseArticleIds = [1, 2, 3];
|
||||||
$this->ticketRequest->userAgent = 'UserAgent';
|
$this->ticketRequest->userAgent = 'UserAgent';
|
||||||
$this->ticketRequest->screenResolution = [1400, 900];
|
$this->ticketRequest->screenResolution = [1400, 900];
|
||||||
$this->ticketRequest->ipAddress = ip2long('127.0.0.1');
|
$this->ticketRequest->ipAddress = '127.0.0.1';
|
||||||
$this->ticketRequest->language = 'English';
|
$this->ticketRequest->language = 'English';
|
||||||
|
|
||||||
//-- Act
|
//-- Act
|
||||||
|
Loading…
x
Reference in New Issue
Block a user