PaymentInterface.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Api\Data;
  7. /**
  8. * Interface PaymentInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface PaymentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**#@+
  15. * Constants defined for keys of array, makes typos less likely
  16. */
  17. const KEY_PO_NUMBER = 'po_number';
  18. const KEY_METHOD = 'method';
  19. const KEY_ADDITIONAL_DATA = 'additional_data';
  20. /**#@-*/
  21. /**
  22. * Get purchase order number
  23. *
  24. * @return string|null
  25. */
  26. public function getPoNumber();
  27. /**
  28. * Set purchase order number
  29. *
  30. * @param string $poNumber
  31. * @return $this
  32. */
  33. public function setPoNumber($poNumber);
  34. /**
  35. * Get payment method code
  36. *
  37. * @return string
  38. */
  39. public function getMethod();
  40. /**
  41. * Set payment method code
  42. *
  43. * @param string $method
  44. * @return $this
  45. */
  46. public function setMethod($method);
  47. /**
  48. * Get payment additional details
  49. *
  50. * @return string[]|null
  51. */
  52. public function getAdditionalData();
  53. /**
  54. * Set payment additional details
  55. *
  56. * @param string $additionalData
  57. * @return $this
  58. */
  59. public function setAdditionalData($additionalData);
  60. /**
  61. * Retrieve existing extension attributes object or create a new one.
  62. *
  63. * @return \Magento\Quote\Api\Data\PaymentExtensionInterface|null
  64. */
  65. public function getExtensionAttributes();
  66. /**
  67. * Set an extension attributes object.
  68. *
  69. * @param \Magento\Quote\Api\Data\PaymentExtensionInterface $extensionAttributes
  70. * @return $this
  71. */
  72. public function setExtensionAttributes(\Magento\Quote\Api\Data\PaymentExtensionInterface $extensionAttributes);
  73. }