From 06cb67abcca1e512fb76e18ffba4391676099620 Mon Sep 17 00:00:00 2001 From: Uwe Kleinmann Date: Fri, 22 Sep 2023 10:39:34 +0200 Subject: [PATCH] MOL-1256: Add refund amount to flow builder values (#619) --- .../Events/Refund/RefundStarted/RefundStartedEvent.php | 2 ++ .../Events/Refund/RefundStarted/RefundStartedEvent651.php | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php index cea671ca5..72f83d1f7 100644 --- a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php +++ b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php @@ -10,6 +10,7 @@ use Shopware\Core\Framework\Event\EventData\EntityType; use Shopware\Core\Framework\Event\EventData\EventDataCollection; use Shopware\Core\Framework\Event\EventData\MailRecipientStruct; +use Shopware\Core\Framework\Event\EventData\ScalarValueType; use Shopware\Core\Framework\Event\MailAware; use Shopware\Core\Framework\Event\OrderAware; use Shopware\Core\Framework\Event\SalesChannelAware; @@ -59,6 +60,7 @@ public function getName(): string public static function getAvailableData(): EventDataCollection { return (new EventDataCollection()) + ->add('amount', new ScalarValueType(ScalarValueType::TYPE_FLOAT)) ->add('order', new EntityType(OrderDefinition::class)); } diff --git a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php index a38ecf428..761a53f39 100644 --- a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php +++ b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php @@ -12,6 +12,7 @@ class RefundStartedEvent651 extends RefundStartedEvent implements ScalarValuesAw public function getValues(): array { return [ + 'amount' => $this->amount, 'order' => $this->order, ]; }