11 use Magento\Sales\Api\Data\OrderPaymentSearchResultInterfaceFactory as SearchResultFactory;
25 private $registry = [];
40 private $collectionProcessor;
54 $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
80 public function get(
$id)
83 throw new \Magento\Framework\Exception\InputException(
__(
'An ID is needed. Set the ID and try again.'));
85 if (!isset($this->registry[
$id])) {
86 $entity = $this->metaData->getNewInstance()->load(
$id);
89 __(
"The entity that was requested doesn't exist. Verify the entity and try again.")
94 return $this->registry[
$id];
105 $this->metaData->getMapper()->delete(
$entity);
117 $this->metaData->getMapper()->save(
$entity);
128 return $this->metaData->getNewInstance();
137 private function getCollectionProcessor()
139 if (!$this->collectionProcessor) {
144 return $this->collectionProcessor;
__construct(Metadata $metaData, SearchResultFactory $searchResultFactory, CollectionProcessorInterface $collectionProcessor=null)
getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
save(\Magento\Sales\Api\Data\OrderPaymentInterface $entity)