OrderLineInterface.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * This file is part of the Klarna Core module
  4. *
  5. * (c) Klarna Bank AB (publ)
  6. *
  7. * For the full copyright and license information, please view the NOTICE
  8. * and LICENSE files that were distributed with this source code.
  9. */
  10. namespace Klarna\Core\Api;
  11. /**
  12. * Klarna order line abstract
  13. */
  14. interface OrderLineInterface
  15. {
  16. /**
  17. * Check if the order line is for an order item or a total collector
  18. *
  19. * @return boolean
  20. */
  21. public function isIsTotalCollector();
  22. /**
  23. * Retrieve code name
  24. *
  25. * @return string
  26. */
  27. public function getCode();
  28. /**
  29. * Set code name
  30. *
  31. * @param string $code
  32. *
  33. * @return $this
  34. */
  35. public function setCode($code);
  36. /**
  37. * Collect process.
  38. *
  39. * @param BuilderInterface $object
  40. *
  41. * @return $this
  42. */
  43. public function collect(BuilderInterface $object);
  44. /**
  45. * Fetch
  46. *
  47. * @param BuilderInterface $object
  48. *
  49. * @return $this
  50. */
  51. public function fetch(BuilderInterface $object);
  52. }