ltsecurityinc安防产品在线商城代码
This commit is contained in:
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace JR\NetSuite\Api\Data;
|
||||
|
||||
interface LocationInterface
|
||||
{
|
||||
|
||||
const NAME = 'name';
|
||||
const LOCATION_ID = 'location_id';
|
||||
const SOURCE_CODE = 'source_code';
|
||||
|
||||
/**
|
||||
* Get location_id
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLocationId();
|
||||
|
||||
/**
|
||||
* Set location_id
|
||||
* @param string $locationId
|
||||
* @return \JR\NetSuite\Api\Data\LocationInterface
|
||||
*/
|
||||
public function setLocationId($locationId);
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* Set name
|
||||
* @param string $name
|
||||
* @return \JR\NetSuite\Api\Data\LocationInterface
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
/**
|
||||
* Get source_code
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSourceCode();
|
||||
|
||||
/**
|
||||
* Set source_code
|
||||
* @param string $sourceCode
|
||||
* @return \JR\NetSuite\Api\Data\LocationInterface
|
||||
*/
|
||||
public function setSourceCode($sourceCode);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace JR\NetSuite\Api\Data;
|
||||
|
||||
interface LocationSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Get location list.
|
||||
* @return \JR\NetSuite\Api\Data\LocationInterface[]
|
||||
*/
|
||||
public function getItems();
|
||||
|
||||
/**
|
||||
* Set name list.
|
||||
* @param \JR\NetSuite\Api\Data\LocationInterface[] $items
|
||||
* @return $this
|
||||
*/
|
||||
public function setItems(array $items);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace JR\NetSuite\Api;
|
||||
|
||||
use Magento\Framework\Api\SearchCriteriaInterface;
|
||||
|
||||
interface LocationRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Save location
|
||||
* @param \JR\NetSuite\Api\Data\LocationInterface $location
|
||||
* @return \JR\NetSuite\Api\Data\LocationInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function save(
|
||||
\JR\NetSuite\Api\Data\LocationInterface $location
|
||||
);
|
||||
|
||||
/**
|
||||
* Retrieve location
|
||||
* @param string $locationId
|
||||
* @return \JR\NetSuite\Api\Data\LocationInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function get($locationId);
|
||||
|
||||
/**
|
||||
* Retrieve location matching the specified criteria.
|
||||
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
|
||||
* @return \JR\NetSuite\Api\Data\LocationSearchResultsInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function getList(
|
||||
SearchCriteriaInterface $searchCriteria
|
||||
);
|
||||
|
||||
/**
|
||||
* Delete location
|
||||
* @param \JR\NetSuite\Api\Data\LocationInterface $location
|
||||
* @return bool true on success
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function delete(
|
||||
\JR\NetSuite\Api\Data\LocationInterface $location
|
||||
);
|
||||
|
||||
/**
|
||||
* Delete location by ID
|
||||
* @param string $locationId
|
||||
* @return bool true on success
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function deleteById($locationId);
|
||||
}
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace JR\NetSuite\Api;
|
||||
|
||||
interface SyncInterface
|
||||
{
|
||||
/**
|
||||
* Fetch data from NetSuite and add it to the queue.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fetchDataToQueue();
|
||||
|
||||
/**
|
||||
* Convert data from NetSuite format to Magento format.
|
||||
*
|
||||
* @param array $netSuiteData
|
||||
* @return array
|
||||
*/
|
||||
public function convertToMagentoFormat($netSuiteData);
|
||||
}
|
||||
Reference in New Issue
Block a user