-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from logeecom/master
Release version 3.4.0
- Loading branch information
Showing
53 changed files
with
4,008 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace Packlink\BusinessLogic\Controllers; | ||
|
||
use Packlink\BusinessLogic\Country\CountryCodes; | ||
use Packlink\BusinessLogic\Customs\CustomsMapping; | ||
use Packlink\BusinessLogic\Customs\CustomsMappingService; | ||
use Packlink\BusinessLogic\DTO\Exceptions\FrontDtoNotRegisteredException; | ||
use Packlink\BusinessLogic\DTO\Exceptions\FrontDtoValidationException; | ||
|
||
/** | ||
* Class CustomsController | ||
* | ||
* @package Packlink\BusinessLogic\Controllers | ||
*/ | ||
class CustomsController | ||
{ | ||
/** | ||
* @var CustomsMappingService | ||
*/ | ||
private $customService; | ||
|
||
/** | ||
* @param CustomsMappingService $customService | ||
*/ | ||
public function __construct(CustomsMappingService $customService) | ||
{ | ||
$this->customService = $customService; | ||
} | ||
|
||
/** | ||
* @return CustomsMapping|null | ||
*/ | ||
public function getData() | ||
{ | ||
return $this->customService->getCustomsMappings(); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getAllCountries() | ||
{ | ||
return CountryCodes::$countryCodes; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getReceiverTaxIdOptions() | ||
{ | ||
return $this->customService->getReceiverTaxIdOptions(); | ||
} | ||
|
||
/** | ||
* @param array $data | ||
* | ||
* @return void | ||
* | ||
* @throws FrontDtoNotRegisteredException | ||
* @throws FrontDtoValidationException | ||
*/ | ||
public function save($data) | ||
{ | ||
$this->customService->updateCustomsMapping($data); | ||
} | ||
} |
Oops, something went wrong.