Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
CaseEntity Class Reference
Inheritance diagram for CaseEntity:
AbstractModel CaseInterface DataObject

Public Member Functions

 __construct (Context $context, Registry $registry, SerializerInterface $serializer, array $data=[], AbstractResource $resource=null, AbstractDb $resourceCollection=null)
 
 getEntityId ()
 
 setEntityId ($id)
 
 getCaseId ()
 
 setCaseId ($id)
 
 isGuaranteeEligible ()
 
 setGuaranteeEligible ($guaranteeEligible)
 
 getGuaranteeDisposition ()
 
 setGuaranteeDisposition ($disposition)
 
 getStatus ()
 
 setStatus ($status)
 
 getScore ()
 
 setScore ($score)
 
 getOrderId ()
 
 setOrderId ($orderId)
 
 getAssociatedTeam ()
 
 setAssociatedTeam (array $team)
 
 getReviewDisposition ()
 
 setReviewDisposition ($disposition)
 
 getCreatedAt ()
 
 setCreatedAt ($datetime)
 
 getUpdatedAt ()
 
 setUpdatedAt ($datetime)
 
- Public Member Functions inherited from AbstractModel
 __construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
 
 __sleep ()
 
 __wakeup ()
 
 setIdFieldName ($name)
 
 getIdFieldName ()
 
 getId ()
 
 setId ($value)
 
 isDeleted ($isDeleted=null)
 
 hasDataChanges ()
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 setDataChanges ($value)
 
 getOrigData ($key=null)
 
 setOrigData ($key=null, $data=null)
 
 dataHasChangedFor ($field)
 
 getResourceName ()
 
 getResourceCollection ()
 
 getCollection ()
 
 load ($modelId, $field=null)
 
 beforeLoad ($identifier, $field=null)
 
 afterLoad ()
 
 isSaveAllowed ()
 
 setHasDataChanges ($flag)
 
 save ()
 
 afterCommitCallback ()
 
 isObjectNew ($flag=null)
 
 beforeSave ()
 
 validateBeforeSave ()
 
 getCacheTags ()
 
 cleanModelCache ()
 
 afterSave ()
 
 delete ()
 
 beforeDelete ()
 
 afterDelete ()
 
 afterDeleteCommit ()
 
 getResource ()
 
 getEntityId ()
 
 setEntityId ($entityId)
 
 clearInstance ()
 
 getStoredData ()
 
 getEventPrefix ()
 
- Public Member Functions inherited from DataObject
 __construct (array $data=[])
 
 addData (array $arr)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 getDataByPath ($path)
 
 getDataByKey ($key)
 
 setDataUsingMethod ($key, $args=[])
 
 getDataUsingMethod ($key, $args=null)
 
 hasData ($key='')
 
 toArray (array $keys=[])
 
 convertToArray (array $keys=[])
 
 toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 toJson (array $keys=[])
 
 convertToJson (array $keys=[])
 
 toString ($format='')
 
 __call ($method, $args)
 
 isEmpty ()
 
 serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
 
 debug ($data=null, &$objects=[])
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 

Protected Member Functions

 _construct ()
 
- Protected Member Functions inherited from AbstractModel
 _construct ()
 
 _init ($resourceModel)
 
 _setResourceModel ($resourceName, $collectionName=null)
 
 _getResource ()
 
 _getEventData ()
 
 _beforeLoad ($modelId, $field=null)
 
 _afterLoad ()
 
 _hasModelChanged ()
 
 _getValidatorBeforeSave ()
 
 _createValidatorBeforeSave ()
 
 _getValidationRulesBeforeSave ()
 
 _clearReferences ()
 
 _clearData ()
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 

Protected Attributes

 $_eventPrefix = 'signifyd_case'
 
- Protected Attributes inherited from AbstractModel
 $_eventPrefix = 'core_abstract'
 
 $_eventObject = 'object'
 
 $_idFieldName = 'id'
 
 $_hasDataChanges = false
 
 $_origData
 
 $_isDeleted = false
 
 $_resource
 
 $_resourceCollection
 
 $_resourceName
 
 $_collectionName
 
 $_cacheTag = false
 
 $_dataSaveAllowed = true
 
 $_isObjectNew = null
 
 $_validatorBeforeSave = null
 
 $_eventManager
 
 $_cacheManager
 
 $_registry
 
 $_logger
 
 $_appState
 
 $_actionValidator
 
 $storedData = []
 
- Protected Attributes inherited from DataObject
 $_data = []
 

Additional Inherited Members

- Data Fields inherited from CaseInterface
const STATUS_OPEN = Gateway::STATUS_OPEN
 
const STATUS_PENDING = 'PENDING'
 
const STATUS_PROCESSING = Gateway::STATUS_PROCESSING
 
const STATUS_FLAGGED = Gateway::STATUS_FLAGGED
 
const STATUS_DISMISSED = Gateway::STATUS_DISMISSED
 
const GUARANTEE_APPROVED = Gateway::GUARANTEE_APPROVED
 
const GUARANTEE_DECLINED = Gateway::GUARANTEE_DECLINED
 
const GUARANTEE_PENDING = Gateway::GUARANTEE_PENDING
 
const GUARANTEE_CANCELED = Gateway::GUARANTEE_CANCELED
 
const GUARANTEE_IN_REVIEW = Gateway::GUARANTEE_IN_REVIEW
 
const GUARANTEE_UNREQUESTED = Gateway::GUARANTEE_UNREQUESTED
 
const DISPOSITION_GOOD = Gateway::DISPOSITION_GOOD
 
const DISPOSITION_FRAUDULENT = Gateway::DISPOSITION_FRAUDULENT
 
const DISPOSITION_UNSET = Gateway::DISPOSITION_UNSET
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Implementation of Signifyd Case interface.

Definition at line 19 of file CaseEntity.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Context  $context,
Registry  $registry,
SerializerInterface  $serializer,
array  $data = [],
AbstractResource  $resource = null,
AbstractDb  $resourceCollection = null 
)

CaseEntity constructor.

Parameters
Context$context
Registry$registry
SerializerInterface$serializer
array$data
AbstractResource | null$resource
AbstractDb | null$resourceCollection

Definition at line 41 of file CaseEntity.php.

48  {
49  $this->serializer = $serializer;
50  parent::__construct($context, $registry, $resource, $resourceCollection, $data);
51  }
$resource
Definition: bulk.php:12

Member Function Documentation

◆ _construct()

_construct ( )
protected

Definition at line 56 of file CaseEntity.php.

◆ getAssociatedTeam()

getAssociatedTeam ( )

Returns data about a team associated with a case.

Returns
array
Since
100.2.1

Implements CaseInterface.

Definition at line 184 of file CaseEntity.php.

185  {
186  $teamData = $this->getData('associated_team');
187  return empty($teamData) ? [] : $this->serializer->unserialize($teamData);
188  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getCaseId()

getCaseId ( )

Returns Signifyd case identifier.

Returns
int
Since
100.2.1

Implements CaseInterface.

Definition at line 81 of file CaseEntity.php.

82  {
83  return (int) $this->getData('case_id');
84  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getCreatedAt()

getCreatedAt ( )

Returns creation datetime for a case.

Returns
string
Since
100.2.1

Implements CaseInterface.

Definition at line 219 of file CaseEntity.php.

220  {
221  return $this->getData('created_at');
222  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getEntityId()

getEntityId ( )

#- Returns local case entity identifier.

Returns
int
Since
100.2.1

Implements CaseInterface.

Definition at line 64 of file CaseEntity.php.

65  {
66  return (int) $this->getData('entity_id');
67  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getGuaranteeDisposition()

getGuaranteeDisposition ( )

Returns decision state of the guarantee.

Returns
string
Since
100.2.1

Implements CaseInterface.

Definition at line 116 of file CaseEntity.php.

117  {
118  return (string) $this->getData('guarantee_disposition');
119  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getOrderId()

getOrderId ( )

Get order id for a case.

Returns
int
Since
100.2.1

Implements CaseInterface.

Definition at line 167 of file CaseEntity.php.

168  {
169  return (int) $this->getData('order_id');
170  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getReviewDisposition()

getReviewDisposition ( )

Returns disposition of an agent's opinion after reviewing the case.

Returns
string
Since
100.2.1

Implements CaseInterface.

Definition at line 202 of file CaseEntity.php.

203  {
204  return (string) $this->getData('review_disposition');
205  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getScore()

getScore ( )

Returns value, which indicates the likelihood that the order is fraud.

Returns
int
Since
100.2.1

Implements CaseInterface.

Definition at line 150 of file CaseEntity.php.

151  {
152  return (int) $this->getData('score');
153  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getStatus()

getStatus ( )

Returns case status.

Returns
string
Since
100.2.1

Implements CaseInterface.

Definition at line 133 of file CaseEntity.php.

134  {
135  return (string) $this->getData('status');
136  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getUpdatedAt()

getUpdatedAt ( )

Returns updating datetime for a case.

Returns
string
Since
100.2.1

Implements CaseInterface.

Definition at line 236 of file CaseEntity.php.

237  {
238  return $this->getData('updated_at');
239  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ isGuaranteeEligible()

isGuaranteeEligible ( )

Returns value, which indicates if a guarantee can be requested for a case. Returns null if state of guarantee eligible does not set yet.

Returns
boolean|null
Since
100.2.1

Implements CaseInterface.

Definition at line 98 of file CaseEntity.php.

99  {
100  $value = $this->getData('guarantee_eligible');
101  return ($value === null) ? $value : (bool) $value;
102  }
getData($key='', $index=null)
Definition: DataObject.php:119
$value
Definition: gender.phtml:16

◆ setAssociatedTeam()

setAssociatedTeam ( array  $team)

Sets team data associated with a case.

Parameters
array$team
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 193 of file CaseEntity.php.

194  {
195  $this->setData('associated_team', $this->serializer->serialize($team));
196  return $this;
197  }

◆ setCaseId()

setCaseId (   $id)

Sets Signifyd case id.

Parameters
int$id
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 89 of file CaseEntity.php.

90  {
91  $this->setData('case_id', (int) $id);
92  return $this;
93  }
$id
Definition: fieldset.phtml:14

◆ setCreatedAt()

setCreatedAt (   $datetime)

Sets creation datetime for a case.

Parameters
string$datetimein DATE_ATOM format
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 227 of file CaseEntity.php.

228  {
229  $this->setData('created_at', $datetime);
230  return $this;
231  }

◆ setEntityId()

setEntityId (   $id)

Sets local case entity id.

Parameters
int$id
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 72 of file CaseEntity.php.

73  {
74  $this->setData('entity_id', (int) $id);
75  return $this;
76  }
$id
Definition: fieldset.phtml:14

◆ setGuaranteeDisposition()

setGuaranteeDisposition (   $disposition)

Sets decision state of the guarantee.

Parameters
string$disposition
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 124 of file CaseEntity.php.

125  {
126  $this->setData('guarantee_disposition', (string) $disposition);
127  return $this;
128  }

◆ setGuaranteeEligible()

setGuaranteeEligible (   $guaranteeEligible)

Sets value-indicator about guarantee availability for a case.

Parameters
bool$guaranteeEligible
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 107 of file CaseEntity.php.

108  {
109  $this->setData('guarantee_eligible', $guaranteeEligible);
110  return $this;
111  }

◆ setOrderId()

setOrderId (   $orderId)

Sets order id for a case.

Parameters
int$orderId
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 175 of file CaseEntity.php.

176  {
177  $this->setData('order_id', (int) $orderId);
178  return $this;
179  }

◆ setReviewDisposition()

setReviewDisposition (   $disposition)

Sets case disposition.

Parameters
string$disposition
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 210 of file CaseEntity.php.

211  {
212  $this->setData('review_disposition', (string) $disposition);
213  return $this;
214  }

◆ setScore()

setScore (   $score)

Sets risk level value.

Parameters
int$score
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 158 of file CaseEntity.php.

159  {
160  $this->setData('score', (int) $score);
161  return $this;
162  }

◆ setStatus()

setStatus (   $status)

Sets case status.

Parameters
string$status
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 141 of file CaseEntity.php.

142  {
143  $this->setData('status', (string) $status);
144  return $this;
145  }
$status
Definition: order_status.php:8

◆ setUpdatedAt()

setUpdatedAt (   $datetime)

Sets updating datetime for a case.

Parameters
string$datetimein DATE_ATOM format
Returns
$this
Since
100.2.1

Implements CaseInterface.

Definition at line 244 of file CaseEntity.php.

245  {
246  $this->setData('updated_at', $datetime);
247  return $this;
248  }

Field Documentation

◆ $_eventPrefix

$_eventPrefix = 'signifyd_case'
protected

Definition at line 24 of file CaseEntity.php.


The documentation for this class was generated from the following file: