| Total Complexity | 57 |
| Total Lines | 558 |
| Duplicated Lines | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
Complex classes like ComputopBusinessFactory often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use ComputopBusinessFactory, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 95 | class ComputopBusinessFactory extends AbstractBusinessFactory |
||
| 96 | { |
||
| 97 | /** |
||
| 98 | * @return \SprykerEco\Zed\Computop\Business\Order\OrderManagerInterface |
||
| 99 | */ |
||
| 100 | public function createOrderSaver(): OrderManagerInterface |
||
| 101 | { |
||
| 102 | $orderSaver = new OrderManager($this->getConfig()); |
||
| 103 | |||
| 104 | $orderSaver->registerMapper($this->createOrderFactory()->createInitCreditCardMapper()); |
||
| 105 | $orderSaver->registerMapper($this->createOrderFactory()->createInitPayNowMapper()); |
||
| 106 | $orderSaver->registerMapper($this->createOrderFactory()->createInitPayPalMapper()); |
||
| 107 | $orderSaver->registerMapper($this->createOrderFactory()->createPayPalExpressMapper()); |
||
| 108 | $orderSaver->registerMapper($this->createOrderFactory()->createInitDirectDebitMapper()); |
||
| 109 | $orderSaver->registerMapper($this->createOrderFactory()->createInitSofortMapper()); |
||
| 110 | $orderSaver->registerMapper($this->createOrderFactory()->createInitPaydirektMapper()); |
||
| 111 | $orderSaver->registerMapper($this->createOrderFactory()->createInitIdealMapper()); |
||
| 112 | $orderSaver->registerMapper($this->createOrderFactory()->createInitEasyCreditMapper()); |
||
| 113 | |||
| 114 | return $orderSaver; |
||
| 115 | } |
||
| 116 | |||
| 117 | /** |
||
| 118 | * @return \SprykerEco\Zed\Computop\Business\Hook\ComputopPostSaveHookInterface |
||
| 119 | */ |
||
| 120 | public function createPostSaveHook(): ComputopPostSaveHookInterface |
||
| 121 | { |
||
| 122 | $postSaveHook = new ComputopPostSaveHook($this->getConfig()); |
||
| 123 | $postSaveHook->registerMapper($this->createPostSaveSofortMapper()); |
||
| 124 | $postSaveHook->registerMapper($this->createPostSavePaydirektMapper()); |
||
| 125 | $postSaveHook->registerMapper($this->createPostSaveIdealMapper()); |
||
| 126 | $postSaveHook->registerMapper($this->createPostSaveCreditCart()); |
||
| 127 | $postSaveHook->registerMapper($this->createPostSavePayNowMapper()); |
||
| 128 | $postSaveHook->registerMapper($this->createPostSavePayPal()); |
||
| 129 | $postSaveHook->registerMapper($this->createPostSavePayPalExpressMapper()); |
||
| 130 | $postSaveHook->registerMapper($this->createPostSaveDirectDebit()); |
||
| 131 | $postSaveHook->registerMapper($this->createPostSaveEasyCredit()); |
||
| 132 | |||
| 133 | return $postSaveHook; |
||
| 134 | } |
||
| 135 | |||
| 136 | /** |
||
| 137 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 138 | */ |
||
| 139 | public function createSofortResponseSaver(): InitResponseSaverInterface |
||
| 140 | { |
||
| 141 | return new SofortResponseSaver($this->getQueryContainer(), $this->getOmsFacade(), $this->getConfig()); |
||
| 142 | } |
||
| 143 | |||
| 144 | /** |
||
| 145 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 146 | */ |
||
| 147 | public function createIdealResponseSaver(): InitResponseSaverInterface |
||
| 148 | { |
||
| 149 | return new IdealResponseSaver($this->getQueryContainer(), $this->getOmsFacade(), $this->getConfig()); |
||
| 150 | } |
||
| 151 | |||
| 152 | /** |
||
| 153 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 154 | */ |
||
| 155 | public function createPaydirektResponseSaver(): InitResponseSaverInterface |
||
| 156 | { |
||
| 157 | return new PaydirektResponseSaver($this->getQueryContainer(), $this->getOmsFacade(), $this->getConfig()); |
||
| 158 | } |
||
| 159 | |||
| 160 | /** |
||
| 161 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 162 | */ |
||
| 163 | public function createCreditCardResponseSaver(): InitResponseSaverInterface |
||
| 166 | } |
||
| 167 | |||
| 168 | /** |
||
| 169 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 170 | */ |
||
| 171 | public function createPayNowResponseSaver(): InitResponseSaverInterface |
||
| 172 | { |
||
| 173 | return new PayNowResponseSaver($this->getQueryContainer(), $this->getOmsFacade(), $this->getConfig()); |
||
| 174 | } |
||
| 175 | |||
| 176 | /** |
||
| 177 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 178 | */ |
||
| 179 | public function createPayPalResponseSaver(): InitResponseSaverInterface |
||
| 182 | } |
||
| 183 | |||
| 184 | /** |
||
| 185 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 186 | */ |
||
| 187 | public function createPayPalExpressResponseSaver(): InitResponseSaverInterface |
||
| 188 | { |
||
| 189 | return new PayPalExpressResponseSaver( |
||
| 190 | $this->getOmsFacade(), |
||
| 191 | $this->getConfig(), |
||
| 192 | $this->getRepository(), |
||
| 193 | $this->getEntityManager() |
||
| 194 | ); |
||
| 195 | } |
||
| 196 | |||
| 197 | /** |
||
| 198 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Complete\CompleteResponseSaverInterface |
||
| 199 | */ |
||
| 200 | public function createPayPalExpressCompleteResponseSaver(): CompleteResponseSaverInterface |
||
| 201 | { |
||
| 202 | return new PayPalExpressCompleteResponseSaver( |
||
| 203 | $this->getOmsFacade(), |
||
| 204 | $this->getConfig(), |
||
| 205 | $this->getEntityManager(), |
||
| 206 | $this->getRepository() |
||
| 207 | ); |
||
| 208 | } |
||
| 209 | |||
| 210 | /** |
||
| 211 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 212 | */ |
||
| 213 | public function createDirectDebitResponseSaver(): InitResponseSaverInterface |
||
| 214 | { |
||
| 215 | return new DirectDebitResponseSaver($this->getQueryContainer(), $this->getOmsFacade(), $this->getConfig()); |
||
| 216 | } |
||
| 217 | |||
| 218 | /** |
||
| 219 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init\InitResponseSaverInterface |
||
| 220 | */ |
||
| 221 | public function createEasyCreditResponseSaver(): InitResponseSaverInterface |
||
| 222 | { |
||
| 223 | return new EasyCreditResponseSaver($this->getQueryContainer(), $this->getOmsFacade(), $this->getConfig()); |
||
| 224 | } |
||
| 225 | |||
| 226 | /** |
||
| 227 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Logger\ComputopResponseLoggerInterface |
||
| 228 | */ |
||
| 229 | public function createComputopResponseLogger(): ComputopResponseLoggerInterface |
||
| 230 | { |
||
| 231 | return new ComputopResponseLogger(); |
||
| 232 | } |
||
| 233 | |||
| 234 | /** |
||
| 235 | * @return \SprykerEco\Zed\Computop\Dependency\ComputopToStoreInterface |
||
| 236 | */ |
||
| 237 | public function getStore(): ComputopToStoreInterface |
||
| 238 | { |
||
| 239 | return $this->getProvidedDependency(ComputopDependencyProvider::STORE); |
||
| 240 | } |
||
| 241 | |||
| 242 | /** |
||
| 243 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\CommandHandlerInterface |
||
| 244 | */ |
||
| 245 | public function createAuthorizeCommandHandler(): CommandHandlerInterface |
||
| 246 | { |
||
| 247 | return new AuthorizeCommandHandler( |
||
| 248 | $this->createAuthorizeHandler(), |
||
| 249 | $this->createAuthorizeManager() |
||
| 250 | ); |
||
| 251 | } |
||
| 252 | |||
| 253 | /** |
||
| 254 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\CommandHandlerInterface |
||
| 255 | */ |
||
| 256 | public function createCancelCommandHandler(): CommandHandlerInterface |
||
| 257 | { |
||
| 258 | return new CancelCommandHandler( |
||
| 259 | $this->createInquireHandler(), |
||
| 260 | $this->createReverseHandler(), |
||
| 261 | $this->createCancelManager(), |
||
| 262 | $this->getFlashMessengerFacade() |
||
| 263 | ); |
||
| 264 | } |
||
| 265 | |||
| 266 | /** |
||
| 267 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\CommandHandlerInterface |
||
| 268 | */ |
||
| 269 | public function createCaptureCommandHandler(): CommandHandlerInterface |
||
| 270 | { |
||
| 271 | return new CaptureCommandHandler( |
||
| 272 | $this->createCaptureHandler(), |
||
| 273 | $this->createCaptureManager() |
||
| 274 | ); |
||
| 275 | } |
||
| 276 | |||
| 277 | /** |
||
| 278 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\CommandHandlerInterface |
||
| 279 | */ |
||
| 280 | public function createRefundCommandHandler(): CommandHandlerInterface |
||
| 281 | { |
||
| 282 | return new RefundCommandHandler( |
||
| 283 | $this->createRefundHandler(), |
||
| 284 | $this->createRefundManager() |
||
| 285 | ); |
||
| 286 | } |
||
| 287 | |||
| 288 | /** |
||
| 289 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\CommandHandlerInterface |
||
| 290 | */ |
||
| 291 | public function createEasyCreditAuthorizeCommandHandler(): CommandHandlerInterface |
||
| 292 | { |
||
| 293 | return new AuthorizeCommandHandler( |
||
| 294 | $this->createEasyCreditAuthorizeHandler(), |
||
| 295 | $this->createAuthorizeManager() |
||
| 296 | ); |
||
| 297 | } |
||
| 298 | |||
| 299 | /** |
||
| 300 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PrePlace\PrePlaceHandlerInterface |
||
| 301 | */ |
||
| 302 | public function createEasyCreditStatusHandler(): PrePlaceHandlerInterface |
||
| 303 | { |
||
| 304 | return new EasyCreditStatusHandler( |
||
| 305 | $this->getComputopApiFacade(), |
||
| 306 | $this->getMoneyFacade(), |
||
| 307 | $this->createComputopResponseLogger() |
||
| 308 | ); |
||
| 309 | } |
||
| 310 | |||
| 311 | /** |
||
| 312 | * @return \SprykerEco\Zed\Computop\Business\RiskCheck\Handler\HandlerInterface |
||
| 313 | */ |
||
| 314 | public function createCrifHandler(): HandlerInterface |
||
| 315 | { |
||
| 316 | return new CrifHandler( |
||
| 317 | $this->getComputopApiFacade(), |
||
| 318 | $this->createCrifSaver(), |
||
| 319 | $this->getConfig() |
||
| 320 | ); |
||
| 321 | } |
||
| 322 | |||
| 323 | /** |
||
| 324 | * @return \SprykerEco\Zed\Computop\Business\Logger\LoggerInterface |
||
| 325 | */ |
||
| 326 | public function createComputopLogger(): LoggerInterface |
||
| 327 | { |
||
| 328 | return new ComputopLogger(); |
||
| 329 | } |
||
| 330 | |||
| 331 | /** |
||
| 332 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PostPlace\HandlerInterface |
||
| 333 | */ |
||
| 334 | public function createEasyCreditAuthorizeHandler(): PostPlaceHandlerInterface |
||
| 335 | { |
||
| 336 | return new EasyCreditAuthorizeHandler( |
||
| 337 | $this->getComputopApiFacade(), |
||
| 338 | $this->createAuthorizeSaver() |
||
| 339 | ); |
||
| 340 | } |
||
| 341 | |||
| 342 | /** |
||
| 343 | * @return \SprykerEco\Zed\Computop\Business\Payment\Reader\ComputopPaymentReaderInterface |
||
| 344 | */ |
||
| 345 | public function createPaymentReader(): ComputopPaymentReaderInterface |
||
| 346 | { |
||
| 347 | return new ComputopPaymentReader($this->getQueryContainer()); |
||
| 348 | } |
||
| 349 | |||
| 350 | /** |
||
| 351 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PostPlace\HandlerInterface |
||
| 352 | */ |
||
| 353 | public function createAuthorizeHandler(): PostPlaceHandlerInterface |
||
| 354 | { |
||
| 355 | return new AuthorizeHandler( |
||
| 356 | $this->getComputopApiFacade(), |
||
| 357 | $this->createAuthorizeSaver() |
||
| 358 | ); |
||
| 359 | } |
||
| 360 | |||
| 361 | /** |
||
| 362 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PostPlace\HandlerInterface |
||
| 363 | */ |
||
| 364 | public function createReverseHandler(): PostPlaceHandlerInterface |
||
| 365 | { |
||
| 366 | return new ReverseHandler( |
||
| 367 | $this->getComputopApiFacade(), |
||
| 368 | $this->createReverseSaver() |
||
| 369 | ); |
||
| 370 | } |
||
| 371 | |||
| 372 | /** |
||
| 373 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PostPlace\HandlerInterface |
||
| 374 | */ |
||
| 375 | public function createInquireHandler(): PostPlaceHandlerInterface |
||
| 380 | ); |
||
| 381 | } |
||
| 382 | |||
| 383 | /** |
||
| 384 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PostPlace\HandlerInterface |
||
| 385 | */ |
||
| 386 | public function createCaptureHandler(): PostPlaceHandlerInterface |
||
| 391 | ); |
||
| 392 | } |
||
| 393 | |||
| 394 | /** |
||
| 395 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\PostPlace\HandlerInterface |
||
| 396 | */ |
||
| 397 | public function createRefundHandler(): PostPlaceHandlerInterface |
||
| 398 | { |
||
| 399 | return new RefundHandler( |
||
| 400 | $this->getComputopApiFacade(), |
||
| 401 | $this->createRefundSaver() |
||
| 402 | ); |
||
| 403 | } |
||
| 404 | |||
| 405 | /** |
||
| 406 | * @return \SprykerEco\Zed\Computop\Business\RiskCheck\Saver\RiskCheckSaverInterface |
||
| 407 | */ |
||
| 408 | public function createCrifSaver(): RiskCheckSaverInterface |
||
| 409 | { |
||
| 410 | return new CrifSaver( |
||
| 411 | $this->getQueryContainer(), |
||
| 412 | $this->createComputopLogger(), |
||
| 413 | $this->getConfig() |
||
| 414 | ); |
||
| 415 | } |
||
| 416 | |||
| 417 | /** |
||
| 418 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\SaverInterface |
||
| 419 | */ |
||
| 420 | public function createAuthorizeSaver(): SaverInterface |
||
| 421 | { |
||
| 422 | return new AuthorizeSaver( |
||
| 423 | $this->getQueryContainer(), |
||
| 424 | $this->createComputopResponseLogger(), |
||
| 425 | $this->getConfig() |
||
| 426 | ); |
||
| 427 | } |
||
| 428 | |||
| 429 | /** |
||
| 430 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\SaverInterface |
||
| 431 | */ |
||
| 432 | public function createReverseSaver(): SaverInterface |
||
| 433 | { |
||
| 434 | return new ReverseSaver( |
||
| 435 | $this->getQueryContainer(), |
||
| 436 | $this->createComputopResponseLogger(), |
||
| 437 | $this->getConfig() |
||
| 438 | ); |
||
| 439 | } |
||
| 440 | |||
| 441 | /** |
||
| 442 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\SaverInterface |
||
| 443 | */ |
||
| 444 | public function createInquireSaver(): SaverInterface |
||
| 445 | { |
||
| 446 | return new InquireSaver( |
||
| 447 | $this->getQueryContainer(), |
||
| 448 | $this->createComputopResponseLogger(), |
||
| 449 | $this->getConfig() |
||
| 450 | ); |
||
| 451 | } |
||
| 452 | |||
| 453 | /** |
||
| 454 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\SaverInterface |
||
| 455 | */ |
||
| 456 | public function createCaptureSaver(): SaverInterface |
||
| 457 | { |
||
| 458 | return new CaptureSaver( |
||
| 459 | $this->getQueryContainer(), |
||
| 460 | $this->createComputopResponseLogger(), |
||
| 461 | $this->getConfig() |
||
| 462 | ); |
||
| 463 | } |
||
| 464 | |||
| 465 | /** |
||
| 466 | * @return \SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\SaverInterface |
||
| 467 | */ |
||
| 468 | public function createRefundSaver(): SaverInterface |
||
| 469 | { |
||
| 470 | return new RefundSaver( |
||
| 471 | $this->getQueryContainer(), |
||
| 472 | $this->createComputopResponseLogger(), |
||
| 473 | $this->getConfig() |
||
| 474 | ); |
||
| 475 | } |
||
| 476 | |||
| 477 | /** |
||
| 478 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\Manager\ManagerInterface |
||
| 479 | */ |
||
| 480 | public function createAuthorizeManager(): ManagerInterface |
||
| 481 | { |
||
| 482 | return new AuthorizeManager($this->getQueryContainer(), $this->getConfig()); |
||
| 483 | } |
||
| 484 | |||
| 485 | /** |
||
| 486 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\Manager\CancelManagerInterface |
||
| 487 | */ |
||
| 488 | public function createCancelManager(): CancelManagerInterface |
||
| 489 | { |
||
| 490 | return new CancelManager($this->getQueryContainer(), $this->getConfig()); |
||
| 491 | } |
||
| 492 | |||
| 493 | /** |
||
| 494 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\Manager\ManagerInterface |
||
| 495 | */ |
||
| 496 | public function createCaptureManager(): ManagerInterface |
||
| 497 | { |
||
| 498 | return new CaptureManager($this->getQueryContainer(), $this->getConfig()); |
||
| 499 | } |
||
| 500 | |||
| 501 | /** |
||
| 502 | * @return \SprykerEco\Zed\Computop\Business\Oms\Command\Manager\ManagerInterface |
||
| 503 | */ |
||
| 504 | public function createRefundManager(): ManagerInterface |
||
| 505 | { |
||
| 506 | return new RefundManager($this->getQueryContainer(), $this->getConfig()); |
||
| 507 | } |
||
| 508 | |||
| 509 | /** |
||
| 510 | * @return \SprykerEco\Zed\Computop\Business\Order\ComputopBusinessOrderFactoryInterface |
||
| 511 | */ |
||
| 512 | public function createOrderFactory(): ComputopBusinessOrderFactoryInterface |
||
| 513 | { |
||
| 514 | return new ComputopBusinessOrderFactory(); |
||
| 515 | } |
||
| 516 | |||
| 517 | /** |
||
| 518 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 519 | */ |
||
| 520 | public function createPostSaveSofortMapper(): InitMapperInterface |
||
| 521 | { |
||
| 522 | return new InitSofortMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 523 | } |
||
| 524 | |||
| 525 | /** |
||
| 526 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 527 | */ |
||
| 528 | public function createPostSaveCreditCart(): InitMapperInterface |
||
| 529 | { |
||
| 530 | return new InitCreditCardMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 531 | } |
||
| 532 | |||
| 533 | /** |
||
| 534 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 535 | */ |
||
| 536 | public function createPostSavePayNowMapper(): InitMapperInterface |
||
| 537 | { |
||
| 538 | return new InitPayNowMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 539 | } |
||
| 540 | |||
| 541 | /** |
||
| 542 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 543 | */ |
||
| 544 | public function createPostSavePayPal(): InitMapperInterface |
||
| 545 | { |
||
| 546 | return new InitPayPalMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 547 | } |
||
| 548 | |||
| 549 | /** |
||
| 550 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 551 | */ |
||
| 552 | public function createPostSavePayPalExpressMapper(): InitMapperInterface |
||
| 553 | { |
||
| 554 | return new InitPayPalExpressMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 555 | } |
||
| 556 | |||
| 557 | /** |
||
| 558 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 559 | */ |
||
| 560 | public function createPostSaveDirectDebit(): InitMapperInterface |
||
| 561 | { |
||
| 562 | return new InitDirectDebitMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 563 | } |
||
| 564 | |||
| 565 | /** |
||
| 566 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 567 | */ |
||
| 568 | public function createPostSaveEasyCredit(): InitMapperInterface |
||
| 569 | { |
||
| 570 | return new InitEasyCreditMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 571 | } |
||
| 572 | |||
| 573 | /** |
||
| 574 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 575 | */ |
||
| 576 | public function createPostSavePaydirektMapper(): InitMapperInterface |
||
| 577 | { |
||
| 578 | return new InitPaydirektMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 579 | } |
||
| 580 | |||
| 581 | /** |
||
| 582 | * @return \SprykerEco\Zed\Computop\Business\Hook\Mapper\Init\InitMapperInterface |
||
| 583 | */ |
||
| 584 | public function createPostSaveIdealMapper(): InitMapperInterface |
||
| 585 | { |
||
| 586 | return new InitIdealMapper($this->getConfig(), $this->getComputopApiService()); |
||
| 587 | } |
||
| 588 | |||
| 589 | /** |
||
| 590 | * @return \SprykerEco\Zed\Computop\Business\Payment\PaymentMethodFilterInterface |
||
| 591 | */ |
||
| 592 | public function createPaymentMethodFilter(): PaymentMethodFilterInterface |
||
| 593 | { |
||
| 594 | return new PaymentMethodFilter($this->getConfig()); |
||
| 595 | } |
||
| 596 | |||
| 597 | /** |
||
| 598 | * @return \SprykerEco\Zed\Computop\Business\Processor\NotificationProcessorInterface |
||
| 599 | */ |
||
| 600 | public function createNotificationProcessor(): NotificationProcessorInterface |
||
| 603 | } |
||
| 604 | |||
| 605 | /** |
||
| 606 | * @return \SprykerEco\Service\ComputopApi\ComputopApiServiceInterface |
||
| 607 | */ |
||
| 608 | public function getComputopApiService(): ComputopApiServiceInterface |
||
| 609 | { |
||
| 610 | return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_COMPUTOP_API); |
||
| 611 | } |
||
| 612 | |||
| 613 | /** |
||
| 614 | * @return \SprykerEco\Zed\Computop\Dependency\Facade\ComputopToOmsFacadeInterface |
||
| 615 | */ |
||
| 616 | public function getOmsFacade(): ComputopToOmsFacadeInterface |
||
| 619 | } |
||
| 620 | |||
| 621 | /** |
||
| 622 | * @return \SprykerEco\Zed\Computop\Dependency\Facade\ComputopToMessengerFacadeInterface |
||
| 623 | */ |
||
| 624 | public function getFlashMessengerFacade(): ComputopToMessengerFacadeInterface |
||
| 625 | { |
||
| 626 | return $this->getProvidedDependency(ComputopDependencyProvider::FACADE_FLASH_MESSENGER); |
||
| 627 | } |
||
| 628 | |||
| 629 | /** |
||
| 630 | * @return \SprykerEco\Zed\Computop\Dependency\Facade\ComputopToMoneyFacadeInterface |
||
| 631 | */ |
||
| 632 | public function getMoneyFacade(): ComputopToMoneyFacadeInterface |
||
| 633 | { |
||
| 634 | return $this->getProvidedDependency(ComputopDependencyProvider::FACADE_MONEY); |
||
| 635 | } |
||
| 636 | |||
| 637 | /** |
||
| 638 | * @return \SprykerEco\Zed\Computop\Dependency\Facade\ComputopToComputopApiFacadeInterface |
||
| 639 | */ |
||
| 640 | public function getComputopApiFacade(): ComputopToComputopApiFacadeInterface |
||
| 641 | { |
||
| 642 | return $this->getProvidedDependency(ComputopDependencyProvider::FACADE_COMPUTOP_API); |
||
| 643 | } |
||
| 644 | |||
| 645 | /** |
||
| 646 | * @return \SprykerEco\Zed\Computop\Business\DefaultShippingMethodQuoteExpander\QuoteDefaultShippingMethodExpanderInterface |
||
| 647 | */ |
||
| 648 | public function createQuoteDefaultShippingMethodExpander(): QuoteDefaultShippingMethodExpanderInterface |
||
| 653 | ); |
||
| 654 | } |
||
| 655 | } |
||
| 656 |