|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\AfterPay\Communication; |
|
9
|
|
|
|
|
10
|
|
|
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory; |
|
11
|
|
|
use SprykerEco\Zed\AfterPay\AfterPayDependencyProvider; |
|
12
|
|
|
use SprykerEco\Zed\AfterPay\Communication\Converter\OrderToCallConverter; |
|
13
|
|
|
use SprykerEco\Zed\AfterPay\Communication\Converter\OrderToCallConverterInterface; |
|
14
|
|
|
use SprykerEco\Zed\AfterPay\Communication\Converter\QuoteToCallConverter; |
|
15
|
|
|
use SprykerEco\Zed\AfterPay\Communication\Converter\QuoteToCallConverterInterface; |
|
16
|
|
|
use SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToRefundFacadeInterface; |
|
17
|
|
|
use SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToSalesFacadeInterface; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @method \SprykerEco\Zed\AfterPay\Persistence\AfterPayQueryContainerInterface getQueryContainer() |
|
21
|
|
|
* @method \SprykerEco\Zed\AfterPay\AfterPayConfig getConfig() |
|
22
|
|
|
* @method \SprykerEco\Zed\AfterPay\Business\AfterPayFacadeInterface getFacade() |
|
23
|
|
|
* @method \SprykerEco\Zed\AfterPay\Persistence\AfterPayEntityManagerInterface getEntityManager() |
|
24
|
|
|
*/ |
|
25
|
|
|
class AfterPayCommunicationFactory extends AbstractCommunicationFactory |
|
26
|
|
|
{ |
|
27
|
|
|
/** |
|
28
|
|
|
* @return \SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToSalesFacadeInterface |
|
29
|
|
|
*/ |
|
30
|
|
|
public function getSalesFacade(): AfterPayToSalesFacadeInterface |
|
31
|
|
|
{ |
|
32
|
|
|
return $this->getProvidedDependency(AfterPayDependencyProvider::FACADE_SALES); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @return \SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToRefundFacadeInterface |
|
37
|
|
|
*/ |
|
38
|
|
|
public function getRefundFacade(): AfterPayToRefundFacadeInterface |
|
39
|
|
|
{ |
|
40
|
|
|
return $this->getProvidedDependency(AfterPayDependencyProvider::FACADE_REFUND); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @return \SprykerEco\Zed\AfterPay\Communication\Converter\QuoteToCallConverterInterface |
|
45
|
|
|
*/ |
|
46
|
|
|
public function createQuoteToCallConverter(): QuoteToCallConverterInterface |
|
47
|
|
|
{ |
|
48
|
|
|
return new QuoteToCallConverter(); |
|
|
|
|
|
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @return \SprykerEco\Zed\AfterPay\Communication\Converter\OrderToCallConverterInterface |
|
53
|
|
|
*/ |
|
54
|
|
|
public function createOrderToCallConverter(): OrderToCallConverterInterface |
|
55
|
|
|
{ |
|
56
|
|
|
return new OrderToCallConverter(); |
|
57
|
|
|
} |
|
58
|
|
|
} |
|
59
|
|
|
|