Skip to content

Commit

Permalink
Merge pull request #56 from avadev/release/2.3.1
Browse files Browse the repository at this point in the history
Release/2.3.1
  • Loading branch information
avl-asheesh-singh authored Jul 15, 2022
2 parents 75d017b + 06fc778 commit ed42790
Show file tree
Hide file tree
Showing 66 changed files with 4,137 additions and 29 deletions.
172 changes: 172 additions & 0 deletions BaseProvider/Api/Data/QueueInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<?php
/*
* Avalara_BaseProvider
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @copyright Copyright (c) 2021 Avalara, Inc
* @license http: //opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
namespace ClassyLlama\AvaTax\BaseProvider\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Queue Job interface.
* @api
*/
interface QueueInterface extends ExtensibleDataInterface
{
const MIN_ATTEMPT = 0;
const MAX_ATTEMPT = 3;

/**#@+
* Constants for keys of data array. Identical to the name of the getter in snake case
*/
const JOB_ID = 'job_id';
const CLIENT = 'client';
const PAYLOAD = 'payload';
const RESPONSE = 'response';
const STATUS = 'status';
const ATTEMPT = 'attempt';
const CREATION_TIME = 'creation_time';
const UPDATE_TIME = 'update_time';
/**#@-*/

/**
* Get Job ID
*
* @return int
*/
public function getId();

/**
* Get client
*
* @return string
*/
public function getClient();

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

/**
* Get response
*
* @return string
*/
public function getResponse();


/**
* Get status
*
* @return int
*/
public function getStatus();

/**
* Get attempt
*
* @return int
*/
public function getAttempt();

/**
* Get creation time
*
* @return string
*/
public function getCreationTime();

/**
* Get update time
*
* @return string
*/
public function getUpdateTime();

/**
* Set Job ID
*
* @param int $id
* @return JobInterface
*/
public function setId($id);

/**
* Set Client
*
* @param string $client
* @return JobInterface
*/
public function setClient($client);

/**
* Set Payload
*
* @param string $payload
* @return JobInterface
*/
public function setPayload($payload);

/**
* Set Response
*
* @param string $response
* @return JobInterface
*/
public function setResponse($response);

/**
* Set Status
*
* @param int $status
* @return JobInterface
*/
public function setStatus($status);

/**
* Set Attempt
*
* @param int $attempt
* @return JobInterface
*/
public function setAttempt($attempt);

/**
* Set creation time
*
* @param string $creationTime
* @return JobInterface
*/
public function setCreationTime($creationTime);

/**
* Set update time
*
* @param string $updateTime
* @return JobInterface
*/
public function setUpdateTime($updateTime);

/**
* @return \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueExtensionInterface
*/
public function getExtensionAttributes();

/**
* @param \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueExtensionInterface $extensionAttributes
* @return void
*/
public function setExtensionAttributes(\ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueExtensionInterface $extensionAttributes);
}
49 changes: 49 additions & 0 deletions BaseProvider/Api/QueueRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/*
* Avalara_BaseProvider
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @copyright Copyright (c) 2021 Avalara, Inc
* @license http: //opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
namespace ClassyLlama\AvaTax\BaseProvider\Api;

/**
* Queue Job CRUD interface.
* @api
*/
interface QueueRepositoryInterface
{
/**
* Save queue job.
*
* @param \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueInterface $queueJob
* @return \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
#public function save(\ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueInterface $queueJob);

/**
* Retrieve Queue job.
*
* @param int $jobId
* @return \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
#public function getById($jobId);

/**
* Retrieve Queue jobs matching the specified criteria.
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \ClassyLlama\AvaTax\BaseProvider\Api\QueueSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
}
39 changes: 39 additions & 0 deletions BaseProvider/Api/QueueSearchResultsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/*
* Avalara_BaseProvider
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @copyright Copyright (c) 2021 Avalara, Inc
* @license http: //opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
namespace ClassyLlama\AvaTax\BaseProvider\Api;

use Magento\Framework\Api\SearchResultsInterface;

/**
* Interface for Queue job search results.
* @api
*/
interface QueueSearchResultsInterface extends SearchResultsInterface
{
/**
* Get Queue job list.
*
* @return \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueInterface[]
*/
public function getItems();

/**
* Set Queue job list.
*
* @param \ClassyLlama\AvaTax\BaseProvider\Api\Data\QueueInterface[] $items
* @return $this
*/
public function setItems(array $items);
}
22 changes: 22 additions & 0 deletions BaseProvider/Exception/AvalaraLoggerException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/*
* Avalara_BaseProvider
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @copyright Copyright (c) 2021 Avalara, Inc
* @license http: //opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
namespace ClassyLlama\AvaTax\BaseProvider\Exception;

/**
* @codeCoverageIgnore
*/
class AvalaraLoggerException extends \Magento\Framework\Exception\LocalizedException
{
}
Loading

0 comments on commit ed42790

Please sign in to comment.