InvoiceInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @copyright Vertex. All rights reserved. https://www.vertexinc.com/
  4. * @author Mediotype https://www.mediotype.com/
  5. */
  6. namespace Vertex\Tax\Api;
  7. use Magento\Store\Model\ScopeInterface;
  8. use Vertex\Exception\ApiException;
  9. use Vertex\Exception\ConfigurationException;
  10. use Vertex\Exception\ValidationException;
  11. use Vertex\Services\Invoice\RequestInterface;
  12. use Vertex\Services\Invoice\ResponseInterface;
  13. /**
  14. * Invoice Record Service
  15. *
  16. * This request initiates tax calculation on an invoice. Use this message to calculate tax at the time of shipping,
  17. * billing, or invoicing from the seller's perspective. Because tax liability is typically incurred at the point of
  18. * invoicing Invoice transactions are written to the Tax Journal.
  19. *
  20. * Please see {@see RequestInterface} for more information on the fields available.
  21. *
  22. * @api
  23. */
  24. interface InvoiceInterface
  25. {
  26. /**
  27. * Record an invoice to the Vertex Tax Log
  28. *
  29. * @param RequestInterface $request
  30. * @param string|null $scopeCode Scope ID
  31. * @param string $scopeType Scope Type
  32. * @return ResponseInterface
  33. * @throws ApiException
  34. * @throws ConfigurationException
  35. * @throws ValidationException
  36. */
  37. public function record(RequestInterface $request, $scopeCode = null, $scopeType = ScopeInterface::SCOPE_STORE);
  38. }