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\Api\Model;
  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 customer id
  17. *
  18. * @return int|null
  19. */
  20. public function getId()
  21. {
  22. return $this->_get(self::ID);
  23. }
  24. /**
  25. * Get email address
  26. *
  27. * @return string
  28. */
  29. public function getEmail()
  30. {
  31. return $this->_get(self::EMAIL);
  32. }
  33. /**
  34. * Get first name
  35. *
  36. * @return string
  37. */
  38. public function getFirstname()
  39. {
  40. return $this->_get(self::FIRSTNAME);
  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. * Get prefix
  53. *
  54. * @return string|null
  55. */
  56. public function getPrefix()
  57. {
  58. return $this->_get(self::PREFIX);
  59. }
  60. /**
  61. * Set customer id
  62. *
  63. * @param int $id
  64. * @return $this
  65. */
  66. public function setId($id)
  67. {
  68. return $this->setData(self::ID, $id);
  69. }
  70. /**
  71. * Set email address
  72. *
  73. * @param string $email
  74. * @return $this
  75. */
  76. public function setEmail($email)
  77. {
  78. return $this->setData(self::EMAIL, $email);
  79. }
  80. /**
  81. * Set first name
  82. *
  83. * @param string $firstname
  84. * @return $this
  85. */
  86. public function setFirstname($firstname)
  87. {
  88. return $this->setData(self::FIRSTNAME, $firstname);
  89. }
  90. /**
  91. * Set last name
  92. *
  93. * @param string $lastname
  94. * @return string
  95. */
  96. public function setLastname($lastname)
  97. {
  98. return $this->setData(self::LASTNAME, $lastname);
  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. }