<?php

namespace KupShop\GraphQLBundle\ApiPos\Types;

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

/**
 * @Type()
 */
class PosDeliverySetting
{
    private $deliveryTypes;

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

    /**
     * @Field()
     */
    public function getMethodCard(): ?string
    {
        return $this->deliveryTypes['card'] ?? null;
    }

    /**
     * @Field()
     */
    public function getMethodCash(): ?string
    {
        return $this->deliveryTypes['cash'] ?? null;
    }

    /**
     * @Field()
     */
    public function getMethodInvoice(): ?string
    {
        return $this->deliveryTypes['invoice'] ?? null;
    }

    /**
     * @Field()
     */
    public function getMethodCustom(): ?string
    {
        return $this->deliveryTypes['custom'] ?? null;
    }
}
