Skip to content

Commit

Permalink
Merge pull request #1 from WeareJH/feature/6.0.0-upgrade
Browse files Browse the repository at this point in the history
Upgrade to 6.0.0
  • Loading branch information
Loxzibit authored May 19, 2022
2 parents c6399f3 + fef9dc7 commit e3d1439
Show file tree
Hide file tree
Showing 301 changed files with 41,460 additions and 4,815 deletions.
51 changes: 51 additions & 0 deletions Api/BaseRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* Copyright (c) 2020, Nosto Solutions Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Nosto Solutions Ltd <[email protected]>
* @copyright 2020 Nosto Solutions Ltd
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
*
*/

namespace Nosto\Tagging\Api;

use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Data\SearchResultInterface;

interface BaseRepositoryInterface
{
/**
* Get search result
*
* @param SearchCriteriaInterface $searchCriteria
* @return SearchResultInterface
*/
public function search(SearchCriteriaInterface $searchCriteria);
}
72 changes: 72 additions & 0 deletions Api/CustomerRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php
/**
* Copyright (c) 2020, Nosto Solutions Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Nosto Solutions Ltd <[email protected]>
* @copyright 2020 Nosto Solutions Ltd
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
*
*/

namespace Nosto\Tagging\Api;

use Nosto\Tagging\Api\Data\CustomerInterface;

interface CustomerRepositoryInterface extends BaseRepositoryInterface
{
/**
* Save Queue entry
*
* @param CustomerInterface $customer
*
* @return CustomerInterface
*/
public function save(CustomerInterface $customer);

/**
* Get customer entry by nosto id and quote id. If multiple entries
* are found first one will be returned.
*
* @param string $nostoId
* @param int $quoteId
*
* @return CustomerInterface|null
*/
public function getOneByNostoIdAndQuoteId(string $nostoId, int $quoteId);

/**
* Get customer entry by restore cart hash. If multiple entries
* are found first one will be returned.
*
* @param string $hash
*
* @return CustomerInterface|null
*/
public function getOneByRestoreCartHash(string $hash);
}
112 changes: 79 additions & 33 deletions Api/Data/CustomerInterface.php
Original file line number Diff line number Diff line change
@@ -1,97 +1,143 @@
<?php
/**
* Magento
* Copyright (c) 2020, Nosto Solutions Ltd
* All rights reserved.
*
* NOTICE OF LICENSE
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 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
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* DISCLAIMER
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Nosto Solutions Ltd <[email protected]>
* @copyright 2020 Nosto Solutions Ltd
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
*
* @category Nosto
* @package Nosto_Tagging
* @author Nosto Solutions Ltd <[email protected]>
* @copyright Copyright (c) 2013-2016 Nosto Solutions Ltd (http://www.nosto.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

namespace Nosto\Tagging\Api\Data;

use DateTime;

interface CustomerInterface
{
const CUSTOMER_ID = 'customer_id';
const QUOTE_ID = 'quote_id';
const NOSTO_ID = 'nosto_id';
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
public const CUSTOMER_ID = 'customer_id';
public const QUOTE_ID = 'quote_id';
public const NOSTO_ID = 'nosto_id';
public const CREATED_AT = 'created_at';
public const UPDATED_AT = 'updated_at';
public const RESTORE_CART_HASH = 'restore_cart_hash';

/**
* @var int The length of the restore cart attribute
*/
public const NOSTO_TAGGING_RESTORE_CART_ATTRIBUTE_LENGTH = 64;

/**
* Get customer id
*
* @return int|null
*/
public function getCustomerId();

/**
* Get quote id
*
* @return int|null
*/
public function getQuoteId();

/**
* Get Nosto Id
*
* @return string
*/
public function getNostoId();

/**
* Get created at time
* @return \DateTime
*
* @return DateTime
*/
public function getCreatedAt();

/**
* Get updated at time
* @return \DateTime
*
* @return DateTime
*/
public function getUpdatedAt();


/**
* Get restore cart hash
*
* @return string restore cart hash
*/
public function getRestoreCartHash();

/**
* Set customer id
*
* @param int $customerId
* @return self
*/
public function setCustomerId($customerId);
public function setCustomerId(int $customerId);

/**
* Set quote id
*
* @param int $quoteId
*/
public function setQuoteId($quoteId);
public function setQuoteId(int $quoteId);

/**
* Set Nosto Id
*
* @param string $nostoId
* @return self
*/
public function setNostoId($nostoId);
public function setNostoId(string $nostoId);

/**
* Set created at time
* @param \DateTime $createdAt
*
* @param DateTime $createdAt
* @return self
*/
public function setCreatedAt(\DateTime $createdAt);
public function setCreatedAt(DateTime $createdAt);

/**
* Set updated at time
* @param \DateTime $updatedAt
*
* @param DateTime $updatedAt
* @return self
*/
public function setUpdatedAt(DateTime $updatedAt);

/**
* Set restore cart hash
*
* @param string $restoreCartHash
* @return self
*/
public function setUpdatedAt(\DateTime $updatedAt);
public function setRestoreCartHash(string $restoreCartHash);
}
57 changes: 57 additions & 0 deletions Api/Data/CustomerSearchResultInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
* Copyright (c) 2020, Nosto Solutions Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Nosto Solutions Ltd <[email protected]>
* @copyright 2020 Nosto Solutions Ltd
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
*
*/

namespace Nosto\Tagging\Api\Data;

use Magento\Framework\Data\SearchResultInterface;

interface CustomerSearchResultInterface extends SearchResultInterface
{
/**
* Get items from search results
*
* @return CustomerInterface[]
*/
public function getItems();

/**
* Set items to the search results
*
* @param CustomerInterface[] $items
* @return $this
*/
public function setItems(array $items);
}
Loading

0 comments on commit e3d1439

Please sign in to comment.