Skip to content

Commit

Permalink
feat: added callback table and update to work with newer Magento vers…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
contardi committed Dec 8, 2023
1 parent 5ae7b71 commit 042e6a1
Show file tree
Hide file tree
Showing 52 changed files with 1,722 additions and 1,014 deletions.
43 changes: 0 additions & 43 deletions .gitignore

This file was deleted.

48 changes: 48 additions & 0 deletions Api/CallbackRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

/**
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Picpay
* @package Picpay_Payment
*
*/

declare(strict_types=1);

namespace Picpay\Payment\Api;

interface CallbackRepositoryInterface
{
/**
* Save Queue
* @param \Picpay\Payment\Api\Data\CallbackInterface $callback
* @return \Picpay\Payment\Api\Data\CallbackInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function save(
\Picpay\Payment\Api\Data\CallbackInterface $callback
);

/**
* Retrieve CallbackInterface
* @param string $id
* @return \Picpay\Payment\Api\Data\CallbackInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function get($id);

/**
* Retrieve Queue matching the specified criteria.
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Picpay\Payment\Api\Data\CallbackSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getList(
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
);
}
136 changes: 136 additions & 0 deletions Api/Data/CallbackInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?php
/**
*
*
*
*
*
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Picpay
* @package Picpay_Payment
*
*
*/

namespace Picpay\Payment\Api\Data;

interface CallbackInterface extends \Magento\Framework\Api\ExtensibleDataInterface
{
/**
* Constants for keys of data array. Identical to the name of the getter in snake case.
*/
const ENTITY_ID = 'entity_id';
const INCREMENT_ID = 'increment_id';
const STATUS = 'status';
const METHOD = 'method';
const PAYLOAD = 'payload';
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';

/**
* Get EntityId.
*
* @return int
*/
public function getEntityId();

/**
* Set EntityId.
* @param $entityId
*/
public function setEntityId($entityId);

/**
* Get IncrementID.
*
* @return string
*/
public function getIncrementId();

/**
* Set IncrementId.
* @param $orderId
*/
public function setIncrementId($incrementId);

/**
* Get Status.
*
* @return string
*/
public function getStatus();

/**
* Set Status.
* @param $status
*/
public function setStatus($status);

/**
* Get Method.
*
* @return string
*/
public function getMethod();

/**
* Set Method.
* @param $method
*/
public function setMethod($method);

/**
* Get Payload.
*
* @return string
*/
public function getPayload();

/**
* Set Payload.
* @param $payload
*/
public function setPayload($payload);

/**
* Get CreatedAt.
*
* @return string
*/
public function getCreatedAt();

/**
* Set CreatedAt.
* @param $createdAt
*/
public function setCreatedAt($createdAt);

/**
* Get CreatedAt.
*
* @return string
*/
public function getUpdatedAt();

/**
* Set Updated At.
* @param $updatedAt
*/
public function setUpdatedAt($updatedAt);

/**
* @return \Picpay\Payment\Api\Data\CallbackExtensionInterface|null
*/
public function getExtensionAttributes();

/**
* @param \Picpay\Payment\Api\Data\CallbackExtensionInterface $extensionAttributes
* @return void
*/
public function setExtensionAttributes(CallbackExtensionInterface $extensionAttributes);
}
39 changes: 39 additions & 0 deletions Api/Data/CallbackSearchResultsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
*
*
*
*
*
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Picpay
* @package Picpay_Payment
*
*
*/

declare(strict_types=1);

namespace Picpay\Payment\Api\Data;

interface CallbackSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
{
/**
* Get transaction list.
* @return \Picpay\Payment\Api\Data\CallbackInterface[]
*/
public function getItems();

/**
* Set entity_id list.
* @param \Picpay\Payment\Api\Data\CallbackInterface[] $items
* @return $this
*/
public function setItems(array $items);
}

Loading

0 comments on commit 042e6a1

Please sign in to comment.