Region.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Model\Data;
  7. /**
  8. * Data Model implementing Address Region interface
  9. *
  10. */
  11. class Region extends \Magento\Framework\Api\AbstractExtensibleObject implements
  12. \Magento\Customer\Api\Data\RegionInterface
  13. {
  14. /**
  15. * Get region code
  16. *
  17. * @return string
  18. */
  19. public function getRegionCode()
  20. {
  21. return $this->_get(self::REGION_CODE);
  22. }
  23. /**
  24. * Get region
  25. *
  26. * @return string
  27. */
  28. public function getRegion()
  29. {
  30. return $this->_get(self::REGION);
  31. }
  32. /**
  33. * Get region id
  34. *
  35. * @return int
  36. */
  37. public function getRegionId()
  38. {
  39. return $this->_get(self::REGION_ID);
  40. }
  41. /**
  42. * Set region code
  43. *
  44. * @param string $regionCode
  45. * @return $this
  46. */
  47. public function setRegionCode($regionCode)
  48. {
  49. return $this->setData(self::REGION_CODE, $regionCode);
  50. }
  51. /**
  52. * Set region
  53. *
  54. * @param string $region
  55. * @return $this
  56. */
  57. public function setRegion($region)
  58. {
  59. return $this->setData(self::REGION, $region);
  60. }
  61. /**
  62. * Set region id
  63. *
  64. * @param int $regionId
  65. * @return $this
  66. */
  67. public function setRegionId($regionId)
  68. {
  69. return $this->setData(self::REGION_ID, $regionId);
  70. }
  71. /**
  72. * {@inheritdoc}
  73. *
  74. * @return \Magento\Customer\Api\Data\RegionExtensionInterface|null
  75. */
  76. public function getExtensionAttributes()
  77. {
  78. return $this->_getExtensionAttributes();
  79. }
  80. /**
  81. * {@inheritdoc}
  82. *
  83. * @param \Magento\Customer\Api\Data\RegionExtensionInterface $extensionAttributes
  84. * @return $this
  85. */
  86. public function setExtensionAttributes(\Magento\Customer\Api\Data\RegionExtensionInterface $extensionAttributes)
  87. {
  88. return $this->_setExtensionAttributes($extensionAttributes);
  89. }
  90. }