FakeCustomer.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\TestModuleExtensionAttributes\Model\Data;
  8. /**
  9. * Class Customer
  10. *
  11. */
  12. class FakeCustomer extends \Magento\Framework\Api\AbstractExtensibleObject implements
  13. \Magento\TestModuleExtensionAttributes\Api\Data\FakeCustomerInterface
  14. {
  15. /**
  16. * Get email address
  17. *
  18. * @return string
  19. */
  20. public function getEmail()
  21. {
  22. return $this->_get(self::EMAIL);
  23. }
  24. /**
  25. * Get first name
  26. *
  27. * @return string
  28. */
  29. public function getFirstname()
  30. {
  31. return $this->_get(self::FIRSTNAME);
  32. }
  33. /**
  34. * Get customer id
  35. *
  36. * @return int|null
  37. */
  38. public function getId()
  39. {
  40. return $this->_get(self::ID);
  41. }
  42. /**
  43. * Get last name
  44. *
  45. * @return string
  46. */
  47. public function getLastname()
  48. {
  49. return $this->_get(self::LASTNAME);
  50. }
  51. /**
  52. * Set customer id
  53. *
  54. * @param int $id
  55. * @return $this
  56. */
  57. public function setId($id)
  58. {
  59. return $this->setData(self::ID, $id);
  60. }
  61. /**
  62. * Set email address
  63. *
  64. * @param string $email
  65. * @return $this
  66. */
  67. public function setEmail($email)
  68. {
  69. return $this->setData(self::EMAIL, $email);
  70. }
  71. /**
  72. * Set first name
  73. *
  74. * @param string $firstname
  75. * @return $this
  76. */
  77. public function setFirstname($firstname)
  78. {
  79. return $this->setData(self::FIRSTNAME, $firstname);
  80. }
  81. /**
  82. * Set last name
  83. *
  84. * @param string $lastname
  85. * @return string
  86. */
  87. public function setLastname($lastname)
  88. {
  89. return $this->setData(self::LASTNAME, $lastname);
  90. }
  91. /**
  92. * Get prefix
  93. *
  94. * @return string|null
  95. */
  96. public function getPrefix()
  97. {
  98. return $this->_get(self::PREFIX);
  99. }
  100. /**
  101. * Set prefix
  102. *
  103. * @param string $prefix
  104. * @return $this
  105. */
  106. public function setPrefix($prefix)
  107. {
  108. return $this->setData(self::PREFIX, $prefix);
  109. }
  110. /**
  111. * {@inheritdoc}
  112. *
  113. * @return \Magento\TestModuleExtensionAttributes\Api\Data\FakeCustomerExtensionInterface|null
  114. */
  115. public function getExtensionAttributes()
  116. {
  117. return $this->_getExtensionAttributes();
  118. }
  119. /**
  120. * {@inheritdoc}
  121. *
  122. * @param \Magento\TestModuleExtensionAttributes\Api\Data\FakeCustomerExtensionInterface $extensionAttributes
  123. * @return $this
  124. */
  125. public function setExtensionAttributes(
  126. \Magento\TestModuleExtensionAttributes\Api\Data\FakeCustomerExtensionInterface $extensionAttributes
  127. ) {
  128. return $this->_setExtensionAttributes($extensionAttributes);
  129. }
  130. }