<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiShared\Types\DeliveryType;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;

/**
 * @Type()
 */
class PaymentMethod
{
    private array $paymentMethod;

    public function __construct(array $paymentMethod)
    {
        $this->paymentMethod = $paymentMethod;
    }

    /**
     * @Field()
     */
    public function getType(): string
    {
        return $this->paymentMethod['type'];
    }

    /**
     * @Field()
     */
    public function getName(): string
    {
        return $this->paymentMethod['name'];
    }
}
