Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PaymentToken.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Vault\Model;
7 
9 use Magento\Vault\Api\Data\PaymentTokenExtensionInterface;
12 
17 {
21  protected $_eventPrefix = 'vault_payment_token';
22 
26  protected function _construct()
27  {
28  $this->_init(ResourceModel\PaymentToken::class);
29  }
30 
34  public function getCustomerId()
35  {
37  }
38 
42  public function setCustomerId($customerId)
43  {
45  return $this;
46  }
47 
51  public function getPaymentMethodCode()
52  {
54  }
55 
59  public function setPaymentMethodCode($code)
60  {
62  return $this;
63  }
64 
68  public function getType()
69  {
70  return $this->getData(PaymentTokenInterface::TYPE);
71  }
72 
76  public function setType($type)
77  {
79  return $this;
80  }
81 
85  public function getCreatedAt()
86  {
88  }
89 
93  public function setCreatedAt($timestamp)
94  {
95  $this->setData(PaymentTokenInterface::CREATED_AT, $timestamp);
96  return $this;
97  }
98 
102  public function getExpiresAt()
103  {
105  }
106 
110  public function setExpiresAt($timestamp)
111  {
112  $this->setData(PaymentTokenInterface::EXPIRES_AT, $timestamp);
113  return $this;
114  }
115 
119  public function getGatewayToken()
120  {
122  }
123 
127  public function setGatewayToken($token)
128  {
130  return $this;
131  }
132 
136  public function getTokenDetails()
137  {
139  }
140 
144  public function setTokenDetails($details)
145  {
147  return $this;
148  }
149 
156  public function getIsActive()
157  {
158  return (bool)$this->getData(PaymentTokenInterface::IS_ACTIVE);
159  }
160 
167  public function setIsActive($isActive)
168  {
169  $this->setData(PaymentTokenInterface::IS_ACTIVE, (int)$isActive);
170  return $this;
171  }
172 
178  public function getPublicHash()
179  {
181  }
182 
189  public function setPublicHash($hash)
190  {
192  return $this;
193  }
194 
201  public function getIsVisible()
202  {
203  return (bool) (int) $this->getData(PaymentTokenInterface::IS_VISIBLE);
204  }
205 
212  public function setIsVisible($isVisible)
213  {
214  $this->setData(PaymentTokenInterface::IS_VISIBLE, (bool) $isVisible);
215  return $this;
216  }
217 }
getData($key='', $index=null)
Definition: DataObject.php:119
$details
Definition: vault.phtml:10
$type
Definition: item.phtml:13
$code
Definition: info.phtml:12