RegionInformation.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Directory\Model\Data;
  8. /**
  9. * Class Region Information
  10. *
  11. * @codeCoverageIgnore
  12. */
  13. class RegionInformation extends \Magento\Framework\Api\AbstractExtensibleObject implements
  14. \Magento\Directory\Api\Data\RegionInformationInterface
  15. {
  16. const KEY_REGION_ID = 'region_id';
  17. const KEY_REGION_CODE = 'region_code';
  18. const KEY_REGION_NAME = 'region_name';
  19. /**
  20. * @inheritDoc
  21. */
  22. public function getId()
  23. {
  24. return $this->_get(self::KEY_REGION_ID);
  25. }
  26. /**
  27. * @inheritDoc
  28. */
  29. public function setId($regionId)
  30. {
  31. $this->setData(self::KEY_REGION_ID, $regionId);
  32. }
  33. /**
  34. * @inheritDoc
  35. */
  36. public function getCode()
  37. {
  38. return $this->_get(self::KEY_REGION_CODE);
  39. }
  40. /**
  41. * @inheritDoc
  42. */
  43. public function setCode($regionCode)
  44. {
  45. $this->setData(self::KEY_REGION_CODE, $regionCode);
  46. }
  47. /**
  48. * @inheritDoc
  49. */
  50. public function getName()
  51. {
  52. return $this->_get(self::KEY_REGION_NAME);
  53. }
  54. /**
  55. * @inheritDoc
  56. */
  57. public function setName($regionName)
  58. {
  59. $this->setData(self::KEY_REGION_NAME, $regionName);
  60. }
  61. /**
  62. * @inheritDoc
  63. */
  64. public function getExtensionAttributes()
  65. {
  66. return $this->_getExtensionAttributes();
  67. }
  68. /**
  69. * @inheritDoc
  70. */
  71. public function setExtensionAttributes(
  72. \Magento\Directory\Api\Data\RegionInformationExtensionInterface $extensionAttributes
  73. ) {
  74. return $this->_setExtensionAttributes($extensionAttributes);
  75. }
  76. }