Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[API] Hide archived shipping methods#11266

Merged
Zales0123 merged 1 commit into
Sylius:masterfrom
lchrusciel:shipping-methods
Mar 20, 2020
Merged

[API] Hide archived shipping methods#11266
Zales0123 merged 1 commit into
Sylius:masterfrom
lchrusciel:shipping-methods

Conversation

@lchrusciel
Copy link
Copy Markdown
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets Part of #11250
License MIT

@lchrusciel lchrusciel added Feature New feature proposals. API APIs related issues and PRs. labels Mar 20, 2020
@lchrusciel lchrusciel requested a review from a team as a code owner March 20, 2020 09:48
use Sylius\Component\Addressing\Model\ZoneInterface;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Core\Model\ShippingMethodInterface;
use Symfony\Component\VarDumper\VarDumper;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:trollface:

}

/**
* @Given I am browsing shipping methods
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be refactored in the next PR

return self::customItemAction($resource, $id, $transition, $token);
}

public static function customItemAction(string $resource, string $id, string $transition, string $token): RequestInterface
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With such a change we assume that custom action is always a PATCH :/

{
public function __invoke(ShippingMethodInterface $data): ShippingMethodInterface
{
$data->setArchivedAt(new \DateTime());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using Sylius\Bundle\ShippingBundle\Provider\Calendar::today()?

@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing license block

@Zales0123 Zales0123 merged commit a7139ca into Sylius:master Mar 20, 2020
@Zales0123
Copy link
Copy Markdown
Contributor

Thanks, Łukasz! 🥇

@lchrusciel lchrusciel deleted the shipping-methods branch March 20, 2020 11:28
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API APIs related issues and PRs. Feature New feature proposals.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants