[API] Hide archived shipping methods#11266
Merged
Merged
Conversation
Contributor
lchrusciel
commented
Mar 20, 2020
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Related tickets | Part of #11250 |
| License | MIT |
lchrusciel
commented
Mar 20, 2020
| use Sylius\Component\Addressing\Model\ZoneInterface; | ||
| use Sylius\Component\Core\Model\ChannelInterface; | ||
| use Sylius\Component\Core\Model\ShippingMethodInterface; | ||
| use Symfony\Component\VarDumper\VarDumper; |
lchrusciel
commented
Mar 20, 2020
| } | ||
|
|
||
| /** | ||
| * @Given I am browsing shipping methods |
Contributor
Author
There was a problem hiding this comment.
Should be refactored in the next PR
Zales0123
reviewed
Mar 20, 2020
| return self::customItemAction($resource, $id, $transition, $token); | ||
| } | ||
|
|
||
| public static function customItemAction(string $resource, string $id, string $transition, string $token): RequestInterface |
Contributor
There was a problem hiding this comment.
With such a change we assume that custom action is always a PATCH :/
| { | ||
| public function __invoke(ShippingMethodInterface $data): ShippingMethodInterface | ||
| { | ||
| $data->setArchivedAt(new \DateTime()); |
Contributor
There was a problem hiding this comment.
How about using Sylius\Bundle\ShippingBundle\Provider\Calendar::today()?
| @@ -0,0 +1,35 @@ | |||
| <?php | |||
|
|
|||
| declare(strict_types=1); | |||
Tomanhez
approved these changes
Mar 20, 2020
AdamKasp
approved these changes
Mar 20, 2020
Zales0123
approved these changes
Mar 20, 2020
Contributor
|
Thanks, Łukasz! 🥇 |
lchrusciel
added a commit
that referenced
this pull request
Mar 24, 2020
…AdamKasp) This PR was merged into the 1.8-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | related with #11266 and #11269, part of #11250 | License | MIT <!-- - Bug fixes must be submitted against the 1.6 or 1.7 branches (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set --> Commits ------- 968c677 Fix custom api client method + minor fixes
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.