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

Public Member Functions

 getCustomerId ()
 
 setCustomerId ($customerId)
 
 getPaymentMethodCode ()
 
 setPaymentMethodCode ($code)
 
 getType ()
 
 setType ($type)
 
 getCreatedAt ()
 
 setCreatedAt ($timestamp)
 
 getExpiresAt ()
 
 setExpiresAt ($timestamp)
 
 getGatewayToken ()
 
 setGatewayToken ($token)
 
 getTokenDetails ()
 
 setTokenDetails ($details)
 
 getIsActive ()
 
 setIsActive ($isActive)
 
 getPublicHash ()
 
 setPublicHash ($hash)
 
 getIsVisible ()
 
 setIsVisible ($isVisible)
 
- 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)
 
- Public Member Functions inherited from PaymentTokenInterface
 getEntityId ()
 
 setEntityId ($entityId)
 

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 = 'vault_payment_token'
 
- 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 PaymentTokenInterface
const ENTITY_ID = 'entity_id'
 
const CUSTOMER_ID = 'customer_id'
 
const PUBLIC_HASH = 'public_hash'
 
const PAYMENT_METHOD_CODE = 'payment_method_code'
 
const TYPE = 'type'
 
const CREATED_AT = 'created_at'
 
const EXPIRES_AT = 'expires_at'
 
const GATEWAY_TOKEN = 'gateway_token'
 
const DETAILS = 'details'
 
const IS_ACTIVE = 'is_active'
 
const IS_VISIBLE = 'is_visible'
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Vault Payment Token extension attribute model

Definition at line 16 of file PaymentToken.php.

Member Function Documentation

◆ _construct()

_construct ( )
protected

Definition at line 26 of file PaymentToken.php.

27  {
28  $this->_init(ResourceModel\PaymentToken::class);
29  }

◆ getCreatedAt()

getCreatedAt ( )

Get token creation timestamp

Returns
string|null
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 85 of file PaymentToken.php.

◆ getCustomerId()

getCustomerId ( )

Gets the customer ID.

Returns
int|null Customer ID.
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 34 of file PaymentToken.php.

◆ getExpiresAt()

getExpiresAt ( )

Get token expiration timestamp

Returns
string|null
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 102 of file PaymentToken.php.

◆ getGatewayToken()

getGatewayToken ( )

Get gateway token ID

Returns
string
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 119 of file PaymentToken.php.

◆ getIsActive()

getIsActive ( )

Gets is vault payment record active.

Returns
bool Is active. @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implements PaymentTokenInterface.

Definition at line 156 of file PaymentToken.php.

◆ getIsVisible()

getIsVisible ( )

Gets is vault payment record visible.

Returns
bool Is visible. @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implements PaymentTokenInterface.

Definition at line 201 of file PaymentToken.php.

202  {
203  return (bool) (int) $this->getData(PaymentTokenInterface::IS_VISIBLE);
204  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getPaymentMethodCode()

getPaymentMethodCode ( )

Get payment method code

Returns
string
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 51 of file PaymentToken.php.

◆ getPublicHash()

getPublicHash ( )

Get frontend hash

Returns
string

Implements PaymentTokenInterface.

Definition at line 178 of file PaymentToken.php.

◆ getTokenDetails()

getTokenDetails ( )

Get token details

Returns
string
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 136 of file PaymentToken.php.

◆ getType()

getType ( )

Get type

Returns
string
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 68 of file PaymentToken.php.

◆ setCreatedAt()

setCreatedAt (   $timestamp)

Set token creation timestamp

Parameters
string$timestamp
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 93 of file PaymentToken.php.

94  {
95  $this->setData(PaymentTokenInterface::CREATED_AT, $timestamp);
96  return $this;
97  }

◆ setCustomerId()

setCustomerId (   $customerId)

Sets customer ID.

Parameters
int$customerId
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 42 of file PaymentToken.php.

◆ setExpiresAt()

setExpiresAt (   $timestamp)

Set token expiration timestamp

Parameters
string$timestamp
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 110 of file PaymentToken.php.

111  {
112  $this->setData(PaymentTokenInterface::EXPIRES_AT, $timestamp);
113  return $this;
114  }

◆ setGatewayToken()

setGatewayToken (   $token)

Set gateway token ID

Parameters
string$token
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 127 of file PaymentToken.php.

◆ setIsActive()

setIsActive (   $isActive)

Sets is vault payment record active.

Parameters
bool$isActive
Returns
$this

Implements PaymentTokenInterface.

Definition at line 167 of file PaymentToken.php.

168  {
169  $this->setData(PaymentTokenInterface::IS_ACTIVE, (int)$isActive);
170  return $this;
171  }

◆ setIsVisible()

setIsVisible (   $isVisible)

Sets is vault payment record visible.

Parameters
bool$isVisible
Returns
$this

Implements PaymentTokenInterface.

Definition at line 212 of file PaymentToken.php.

213  {
214  $this->setData(PaymentTokenInterface::IS_VISIBLE, (bool) $isVisible);
215  return $this;
216  }

◆ setPaymentMethodCode()

setPaymentMethodCode (   $code)

Set payment method code

Parameters
string$code
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 59 of file PaymentToken.php.

◆ setPublicHash()

setPublicHash (   $hash)

Set frontend hash

Parameters
string$hash
Returns
$this

Implements PaymentTokenInterface.

Definition at line 189 of file PaymentToken.php.

190  {
192  return $this;
193  }

◆ setTokenDetails()

setTokenDetails (   $details)

Set token details

Parameters
string$details
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 144 of file PaymentToken.php.

◆ setType()

setType (   $type)

Set type

Parameters
string$type
Returns
$this
Since
100.1.0

Implements PaymentTokenInterface.

Definition at line 76 of file PaymentToken.php.

Field Documentation

◆ $_eventPrefix

$_eventPrefix = 'vault_payment_token'
protected

Definition at line 21 of file PaymentToken.php.


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