CheckoutField.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\Checkout\Attribute;
  6. use Magento\Framework\DataObject;
  7. /**
  8. * Temando Checkout Field
  9. *
  10. * @package Temando\Shipping\Model
  11. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  12. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  13. * @link http://www.temando.com/
  14. */
  15. class CheckoutField extends DataObject implements CheckoutFieldInterface
  16. {
  17. /**
  18. * Obtain checkout field attribute code.
  19. *
  20. * @return string
  21. */
  22. public function getFieldId()
  23. {
  24. return $this->getData(self::FIELD_ID);
  25. }
  26. /**
  27. * Obtain checkout field value as selected during checkout.
  28. *
  29. * @return mixed
  30. */
  31. public function getValue()
  32. {
  33. return $this->getData(self::VALUE);
  34. }
  35. /**
  36. * Obtain json query path for checkout field in order request.
  37. *
  38. * @return string
  39. */
  40. public function getOrderPath()
  41. {
  42. return $this->getData(self::ORDER_PATH);
  43. }
  44. }