Skip to content

Commit 21699ee

Browse files
committed
MC-20244: Pricing :: FPT calculation
- initial schema
1 parent 9d505e8 commit 21699ee

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CatalogGraphQl\Model\Resolver;
9+
10+
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
11+
use Magento\Framework\GraphQl\Config\Element\Field;
12+
use Magento\Framework\GraphQl\Query\ResolverInterface;
13+
14+
class FptResolver implements ResolverInterface
15+
{
16+
/**
17+
* @inheritdoc
18+
*/
19+
public function resolve(
20+
Field $field,
21+
$context,
22+
ResolveInfo $info,
23+
array $value = null,
24+
array $args = null
25+
) {
26+
27+
return [];
28+
}
29+
}

app/code/Magento/WeeeGraphQl/etc/schema.graphqls

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
# See COPYING.txt for license details.
33

44
enum PriceAdjustmentCodesEnum {
5-
WEE
6-
WEETAX
5+
WEEE
6+
WEEETAX
7+
}
8+
9+
type ProductPrice {
10+
fixed_product_taxes: [FixedProductTax] @doc(description: "The multiple FPTs that can be applied to a product price.") @resolver(class: "Magento\\WeeeGraphQl\\Model\\Resolver\\FptResolver")
11+
}
12+
13+
type FixedProductTax @doc(description: "A single FPT that can be applied to a product price.") {
14+
amount: Money @doc(description: "Amount of the FPT as a money object.")
15+
label: String @doc(description: "The label assigned to the FPT to be displayed on the frontend.")
716
}

0 commit comments

Comments
 (0)