Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Api/Order/Data/SearchResultsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ interface SearchResultsInterface extends FrameworkSearchResultsInterface
/**
* Gets Code Items.
*
* @return ChannableOrderData[]
* @return \Magmodules\Channable\Api\Order\Data\DataInterface[]
*/
public function getItems(): array;

/**
* Sets Code Items.
*
* @param ChannableOrderData[] $items
* @param \Magmodules\Channable\Api\Order\Data\DataInterface[] $items
* @return $this
*/
public function setItems(array $items): self;
Expand Down
76 changes: 76 additions & 0 deletions Api/Order/ItemInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
/**
* Copyright © Magmodules.eu. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magmodules\Channable\Api\Order;

/**
* Flat DTO for a single Channable order record (API-safe).
*
* @api
*/
interface ItemInterface
{
/**
* @return int
*/
public function getEntityId(): int;

/**
* @return int
*/
public function getChannableId(): int;

/**
* @return string|null
*/
public function getChannelId(): ?string;

/**
* @return string|null
*/
public function getChannelName(): ?string;

/**
* @return string|null
*/
public function getChannelLabel(): ?string;

/**
* @return int|null
*/
public function getMagentoOrderId(): ?int;

/**
* @return string|null
*/
public function getMagentoIncrementId(): ?string;

/**
* @return int
*/
public function getStoreId(): int;

/**
* @return string|null
*/
public function getStatus(): ?string;

/**
* @return string|null
*/
public function getChannableOrderStatus(): ?string;

/**
* @return string|null
*/
public function getCreatedAt(): ?string;

/**
* @return string|null
*/
public function getUpdatedAt(): ?string;
}
29 changes: 29 additions & 0 deletions Api/Order/SearchInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Copyright © Magmodules.eu. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magmodules\Channable\Api\Order;

use Magento\Framework\Api\SearchCriteriaInterface;

/**
* REST API interface for searching Channable orders.
*
* @api
*/
interface SearchInterface
{
/**
* Search Channable orders by criteria.
*
* Returns a flat list of order records with channel identifiers
* and linked Magento order references.
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Magmodules\Channable\Api\Order\SearchResultInterface
*/
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultInterface;
}
49 changes: 49 additions & 0 deletions Api/Order/SearchResultInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* Copyright © Magmodules.eu. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magmodules\Channable\Api\Order;

/**
* Search result for Channable orders API.
*
* @api
*/
interface SearchResultInterface
{
/**
* @return \Magmodules\Channable\Api\Order\ItemInterface[]
*/
public function getItems(): array;

/**
* @param \Magmodules\Channable\Api\Order\ItemInterface[] $items
* @return $this
*/
public function setItems(array $items): self;

/**
* @return int
*/
public function getTotalCount(): int;

/**
* @param int $totalCount
* @return $this
*/
public function setTotalCount(int $totalCount): self;

/**
* @return \Magento\Framework\Api\SearchCriteriaInterface
*/
public function getSearchCriteria(): \Magento\Framework\Api\SearchCriteriaInterface;

/**
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return $this
*/
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria): self;
}
4 changes: 2 additions & 2 deletions Api/Returns/Data/SearchResultsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ interface SearchResultsInterface extends FrameworkSearchResultsInterface
/**
* Gets Code Items.
*
* @return ChannableReturnsData[]
* @return \Magmodules\Channable\Api\Returns\Data\DataInterface[]
*/
public function getItems(): array;

/**
* Sets Code Items.
*
* @param ChannableReturnsData[] $items
* @param \Magmodules\Channable\Api\Returns\Data\DataInterface[] $items
*
* @return $this
*/
Expand Down
111 changes: 111 additions & 0 deletions Api/Returns/ItemInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?php
/**
* Copyright © Magmodules.eu. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magmodules\Channable\Api\Returns;

/**
* Flat DTO for a single Channable return record (API-safe).
*
* @api
*/
interface ItemInterface
{
/**
* @return int
*/
public function getEntityId(): int;

/**
* @return int
*/
public function getChannableId(): int;

/**
* @return string|null
*/
public function getChannelId(): ?string;

/**
* @return string|null
*/
public function getChannelName(): ?string;

/**
* @return string|null
*/
public function getChannelReturnId(): ?string;

/**
* @return string|null
*/
public function getChannelOrderId(): ?string;

/**
* @return string|null
*/
public function getChannelOrderIdInternal(): ?string;

/**
* @return string|null
*/
public function getPlatformOrderId(): ?string;

/**
* @return int|null
*/
public function getMagentoOrderId(): ?int;

/**
* @return string|null
*/
public function getMagentoIncrementId(): ?string;

/**
* @return int|null
*/
public function getMagentoCreditmemoId(): ?int;

/**
* @return string|null
*/
public function getMagentoCreditmemoIncrementId(): ?string;

/**
* @return string|null
*/
public function getCustomerName(): ?string;

/**
* @return string|null
*/
public function getReason(): ?string;

/**
* @return string|null
*/
public function getComment(): ?string;

/**
* @return string|null
*/
public function getStatus(): ?string;

/**
* @return int
*/
public function getStoreId(): int;

/**
* @return string|null
*/
public function getCreatedAt(): ?string;

/**
* @return string|null
*/
public function getUpdatedAt(): ?string;
}
29 changes: 29 additions & 0 deletions Api/Returns/SearchInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Copyright © Magmodules.eu. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magmodules\Channable\Api\Returns;

use Magento\Framework\Api\SearchCriteriaInterface;

/**
* REST API interface for searching Channable returns.
*
* @api
*/
interface SearchInterface
{
/**
* Search Channable returns by criteria.
*
* Returns a flat list of return records with channel identifiers
* and linked Magento order/creditmemo references.
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Magmodules\Channable\Api\Returns\SearchResultInterface
*/
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultInterface;
}
49 changes: 49 additions & 0 deletions Api/Returns/SearchResultInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* Copyright © Magmodules.eu. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magmodules\Channable\Api\Returns;

/**
* Search result for Channable returns API.
*
* @api
*/
interface SearchResultInterface
{
/**
* @return \Magmodules\Channable\Api\Returns\ItemInterface[]
*/
public function getItems(): array;

/**
* @param \Magmodules\Channable\Api\Returns\ItemInterface[] $items
* @return $this
*/
public function setItems(array $items): self;

/**
* @return int
*/
public function getTotalCount(): int;

/**
* @param int $totalCount
* @return $this
*/
public function setTotalCount(int $totalCount): self;

/**
* @return \Magento\Framework\Api\SearchCriteriaInterface
*/
public function getSearchCriteria(): \Magento\Framework\Api\SearchCriteriaInterface;

/**
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return $this
*/
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria): self;
}
Loading
Loading