Skip to content

Commit

Permalink
Add MondialRelay support
Browse files Browse the repository at this point in the history
  • Loading branch information
youbs committed Oct 23, 2018
1 parent bce7d5d commit 2acda5f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"symfony/monolog-bundle": "^3.1",
"symfony/symfony": "^3.4.6",
"twig/twig": "^2.4",
"wizaplace/sdk": "^1.24.0"
"wizaplace/sdk": "dev-feat-mondialrelay@dev"
},
"autoload": {
"psr-4": {
Expand Down
20 changes: 12 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Resources/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ services:
public: true
Wizaplace\SDK\Seo\SeoService:
public: true
Wizaplace\SDK\Shipping\MondialRelayService:
public: true
Wizaplace\SDK\Cms\CmsService:
public: true
Wizaplace\SDK\Company\CompanyService:
Expand Down
14 changes: 14 additions & 0 deletions src/Service/BasketService.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,20 @@ public function setPickupPoint(SetPickupPointCommand $command): void
}
}

/**
* @throws \Wizaplace\SDK\Exception\SomeParametersAreInvalid
*/
public function setMRPickupPoint(SetPickupPointCommand $command): void
{
$command->setBasketId($this->getBasketId());

try {
$this->baseService->setMRPickupPoint($command);
} finally {
$this->basket = null; // invalidate local cache
}
}

/**
* Gets current basket ID, or create a new one
* @return string
Expand Down

0 comments on commit 2acda5f

Please sign in to comment.