Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #139 from blopa/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
blopa authored Dec 30, 2017
2 parents dcb41ed + 03d04d1 commit fbb51d1
Show file tree
Hide file tree
Showing 53 changed files with 2,338 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
interface ChatbotAPIInterface
{

const CHATBOTUSER_ID = 'chatbotuser_id';
const UPDATED_AT = 'updated_at';
const CHAT_ID = 'chat_id';
const LAST_COMMAND_DETAILS = 'last_command_details';
const FALLBACK_QTY = 'fallback_qty';
const CHATBOTAPI_ID = 'chatbotapi_id';
const CREATED_AT = 'created_at';
const LOGGED = 'logged';
const CONVERSATION_STATE = 'conversation_state';
const HASH_KEY = 'hash_key';
const CHATBOTAPI_ID = 'chatbotapi_id';
const LOGGED = 'logged';
const CHATBOT_TYPE = 'chatbot_type';
const UPDATED_AT = 'updated_at';
const CONVERSATION_STATE = 'conversation_state';
const CHATBOTUSER_ID = 'chatbotuser_id';
const ENABLED = 'enabled';
const CHAT_ID = 'chat_id';
const FALLBACK_QTY = 'fallback_qty';


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
interface ChatbotUserInterface
{

const CHATBOTUSER_ID = 'chatbotuser_id';
const UPDATED_AT = 'updated_at';
const CUSTOMER_ID = 'customer_id';
const CREATED_AT = 'created_at';
const SESSION_ID = 'session_id';
const ENABLE_SUPPORT = 'enable_support';
const QUOTE_ID = 'quote_id';
const ADMIN = 'admin';
const UPDATED_AT = 'updated_at';
const ENABLE_SUPPORT = 'enable_support';
const CREATED_AT = 'created_at';
const ENABLE_PROMOTIONAL_MESSAGES = 'enable_promotional_messages';
const SESSION_ID = 'session_id';
const CHATBOTUSER_ID = 'chatbotuser_id';


/**
Expand Down
16 changes: 8 additions & 8 deletions Magento2/app/code/Werules/Chatbot/Api/Data/MessageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
interface MessageInterface
{

const CONTENT = 'content';
const DIRECTION = 'direction';
const UPDATED_AT = 'updated_at';
const CHAT_MESSAGE_ID = 'chat_message_id';
const CONTENT_TYPE = 'content_type';
const SENT_AT = 'sent_at';
const STATUS = 'status';
const MESSAGE_ID = 'message_id';
const CREATED_AT = 'created_at';
const SENDER_ID = 'sender_id';
const DIRECTION = 'direction';
const SENT_AT = 'sent_at';
const CHATBOT_TYPE = 'chatbot_type';
const UPDATED_AT = 'updated_at';
const MESSAGE_ID = 'message_id';
const MESSAGE_PAYLOAD = 'message_payload';
const CHAT_MESSAGE_ID = 'chat_message_id';
const SENDER_ID = 'sender_id';
const CONTENT = 'content';
const CURRENT_COMMAND_DETAILS = 'current_command_details';
const STATUS = 'status';


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php
/**
* Magento Chatbot Integration
* Copyright (C) 2017
*
* This file is part of Werules/Chatbot.
*
* Werules/Chatbot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace Werules\Chatbot\Api\Data;

interface PromotionalMessagesInterface
{

const UPDATED_AT = 'updated_at';
const CONTENT = 'content';
const CREATED_AT = 'created_at';
const STATUS = 'status';
const PROMOTIONALMESSAGES_ID = 'promotionalmessages_id';


/**
* Get promotionalmessages_id
* @return string|null
*/
public function getPromotionalmessagesId();

/**
* Set promotionalmessages_id
* @param string $promotionalmessages_id
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
*/
public function setPromotionalmessagesId($promotionalmessagesId);

/**
* Get content
* @return string|null
*/
public function getContent();

/**
* Set content
* @param string $content
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
*/
public function setContent($content);

/**
* Get created_at
* @return string|null
*/
public function getCreatedAt();

/**
* Set created_at
* @param string $created_at
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
*/
public function setCreatedAt($created_at);

/**
* Get updated_at
* @return string|null
*/
public function getUpdatedAt();

/**
* Set updated_at
* @param string $updated_at
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
*/
public function setUpdatedAt($updated_at);

/**
* Get status
* @return string|null
*/
public function getStatus();

/**
* Set status
* @param string $status
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
*/
public function setStatus($status);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* Magento Chatbot Integration
* Copyright (C) 2017
*
* This file is part of Werules/Chatbot.
*
* Werules/Chatbot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace Werules\Chatbot\Api\Data;

interface PromotionalMessagesSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
{


/**
* Get PromotionalMessages list.
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface[]
*/
public function getItems();

/**
* Set content list.
* @param \Werules\Chatbot\Api\Data\PromotionalMessagesInterface[] $items
* @return $this
*/
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
/**
* Magento Chatbot Integration
* Copyright (C) 2017
*
* This file is part of Werules/Chatbot.
*
* Werules/Chatbot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace Werules\Chatbot\Api;

use Magento\Framework\Api\SearchCriteriaInterface;

interface PromotionalMessagesRepositoryInterface
{


/**
* Save PromotionalMessages
* @param \Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function save(
\Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages
);

/**
* Retrieve PromotionalMessages
* @param string $promotionalmessagesId
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getById($promotionalmessagesId);

/**
* Retrieve PromotionalMessages matching the specified criteria.
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getList(
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
);

/**
* Delete PromotionalMessages
* @param \Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages
* @return bool true on success
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function delete(
\Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages
);

/**
* Delete PromotionalMessages by ID
* @param string $promotionalmessagesId
* @return bool true on success
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function deleteById($promotionalmessagesId);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* Magento Chatbot Integration
* Copyright (C) 2017
*
* This file is part of Werules/Chatbot.
*
* Werules/Chatbot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace Werules\Chatbot\Block\Adminhtml\PromotionalMessages\Edit;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

class BackButton extends GenericButton implements ButtonProviderInterface
{

/**
* @return array
*/
public function getButtonData()
{
return [
'label' => __('Back'),
'on_click' => sprintf("location.href = '%s';", $this->getBackUrl()),
'class' => 'back',
'sort_order' => 10
];
}

/**
* Get URL for back (reset) button
*
* @return string
*/
public function getBackUrl()
{
return $this->getUrl('*/*/');
}
}
Loading

0 comments on commit fbb51d1

Please sign in to comment.