<?php
/**
 * RecurringAPIJsonPatchOperationValue
 *
 * PHP version 8.1
 *
 * @category Class
 * @package  Fortnox
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Fortnox API
 *
 * # Documentation   The Fortnox API is organized around REST. This means that we’ve designed it to have resource-oriented URLs and be as predictable as possible for you as developer.  It also means that we use HTTP status codes when something goes wrong and HTTP verbs understod by many API clients around the web.  We use a modified version of OAuth2 for authentication to offer a secure way for both you and our users to interact.  The API is generally built to support both XML and JSON but in this documentation all the examples will be in JSON.  We encourage you to read all the articles in the [Guides & Good to Know section](https://www.fortnox.se/developer/guides-and-good-to-know/)</a> first, before going forward and learning about the different resources.  This to ensure you get an understanding of some of the shared components of the API such as parameters and error handling.  ## Rate limits  The limit per access-token is 25 requests per 5 seconds. This equals to 300 requests per minute.  [Read more about this here.](https://www.fortnox.se/developer/guides-and-good-to-know/rate-limits-for-fortnox-api/)  ## Query parameters  Use query parameters with the ?-character and separate parameters with the &-character.   **Example:**  GET - https://api.fortnox.se/3/invoices?accountnumberfrom=3000&accountnumberto=4000 Read more about our parameters [here](https://www.fortnox.se/developer/guides-and-good-to-know/parameters/)   Search the documentation using the search field in the top left corner.
 *
 * The version of the OpenAPI document: 
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.19.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Fortnox\Model;

use \ArrayAccess;
use \Fortnox\ObjectSerializer;

/**
 * RecurringAPIJsonPatchOperationValue Class Doc Comment
 *
 * @category Class
 * @description Value used by add, replace, and remove operations.
 * @package  Fortnox
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class RecurringAPIJsonPatchOperationValue implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'Recurring_API_JsonPatchOperation_value';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'amount_per_invoicing' => 'int',
        'cost_center_id' => 'string',
        'currency' => 'string',
        'customer' => '\Fortnox\Model\RecurringAPIPartialRecurringCustomer',
        'delivery' => '\Fortnox\Model\RecurringAPIRecurringDelivery',
        'distribution_method' => 'string',
        'email' => '\Fortnox\Model\RecurringAPIRecurringEmail',
        'invoice_handling' => 'string',
        'invoice_service_type' => 'string',
        'order_number' => 'string',
        'our_reference' => 'string',
        'payment_terms' => 'string',
        'price_list_id' => 'string',
        'print_configuration' => '\Fortnox\Model\RecurringAPIPrintConfiguration',
        'project_id' => 'string',
        'remark' => 'string',
        'status' => '\Fortnox\Model\RecurringAPIRecurringStatus',
        'tax_reduction_category' => 'string',
        'vat_option' => '\Fortnox\Model\RecurringAPIVatOption',
        'vat_payment_type' => 'string',
        'your_reference' => 'string',
        'accrual' => '\Fortnox\Model\RecurringAPIPartialAccrual',
        'dates' => '\Fortnox\Model\RecurringAPIPartialRecurringDates',
        'rows' => '\Fortnox\Model\RecurringAPIPartialAccrualRow[]',
        'tax_reductions' => '\Fortnox\Model\RecurringAPIPartialTaxReduction[]',
        'deviation_type' => 'string',
        'invoice_period_start' => '\DateTime',
        'repeat_amount' => 'int',
        'repeat_unit' => 'string',
        'account_number' => 'int',
        'article_id' => 'string',
        'description' => 'string',
        'discount' => 'float',
        'discount_type' => 'string',
        'price' => 'float',
        'quantity' => 'float',
        'row_index' => 'int',
        'type' => 'string',
        'unit' => 'string',
        'vat_percentage' => 'float',
        'amount' => 'int',
        'applicant_name' => 'string',
        'ssn' => 'string',
        'accrual_account_number' => 'int',
        'revenue_account_number' => 'int',
        'credit' => 'float',
        'debit' => 'float',
        'transaction_info' => 'string',
        'invoice' => '\Fortnox\Model\RecurringAPIInvoiceDateConfiguration',
        'period' => '\Fortnox\Model\RecurringAPIPeriodDateConfiguration',
        'address' => 'string',
        'city' => 'string',
        'country_code' => 'string',
        'name' => 'string',
        'number' => 'string',
        'phone' => 'string',
        'zip' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'amount_per_invoicing' => null,
        'cost_center_id' => null,
        'currency' => null,
        'customer' => null,
        'delivery' => null,
        'distribution_method' => null,
        'email' => null,
        'invoice_handling' => null,
        'invoice_service_type' => null,
        'order_number' => null,
        'our_reference' => null,
        'payment_terms' => null,
        'price_list_id' => null,
        'print_configuration' => null,
        'project_id' => null,
        'remark' => null,
        'status' => null,
        'tax_reduction_category' => null,
        'vat_option' => null,
        'vat_payment_type' => null,
        'your_reference' => null,
        'accrual' => null,
        'dates' => null,
        'rows' => null,
        'tax_reductions' => null,
        'deviation_type' => null,
        'invoice_period_start' => 'date',
        'repeat_amount' => null,
        'repeat_unit' => null,
        'account_number' => null,
        'article_id' => null,
        'description' => null,
        'discount' => 'double',
        'discount_type' => null,
        'price' => 'double',
        'quantity' => 'double',
        'row_index' => null,
        'type' => null,
        'unit' => null,
        'vat_percentage' => 'double',
        'amount' => null,
        'applicant_name' => null,
        'ssn' => null,
        'accrual_account_number' => null,
        'revenue_account_number' => null,
        'credit' => null,
        'debit' => null,
        'transaction_info' => null,
        'invoice' => null,
        'period' => null,
        'address' => null,
        'city' => null,
        'country_code' => null,
        'name' => null,
        'number' => null,
        'phone' => null,
        'zip' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'amount_per_invoicing' => false,
        'cost_center_id' => false,
        'currency' => false,
        'customer' => false,
        'delivery' => false,
        'distribution_method' => false,
        'email' => false,
        'invoice_handling' => false,
        'invoice_service_type' => false,
        'order_number' => false,
        'our_reference' => false,
        'payment_terms' => false,
        'price_list_id' => false,
        'print_configuration' => false,
        'project_id' => false,
        'remark' => false,
        'status' => false,
        'tax_reduction_category' => false,
        'vat_option' => false,
        'vat_payment_type' => false,
        'your_reference' => false,
        'accrual' => false,
        'dates' => false,
        'rows' => false,
        'tax_reductions' => false,
        'deviation_type' => false,
        'invoice_period_start' => false,
        'repeat_amount' => false,
        'repeat_unit' => false,
        'account_number' => false,
        'article_id' => false,
        'description' => false,
        'discount' => false,
        'discount_type' => false,
        'price' => false,
        'quantity' => false,
        'row_index' => false,
        'type' => false,
        'unit' => false,
        'vat_percentage' => false,
        'amount' => false,
        'applicant_name' => false,
        'ssn' => false,
        'accrual_account_number' => false,
        'revenue_account_number' => false,
        'credit' => false,
        'debit' => false,
        'transaction_info' => false,
        'invoice' => false,
        'period' => false,
        'address' => false,
        'city' => false,
        'country_code' => false,
        'name' => false,
        'number' => false,
        'phone' => false,
        'zip' => false
    ];

    /**
      * If a nullable field gets set to null, insert it here
      *
      * @var boolean[]
      */
    protected array $openAPINullablesSetToNull = [];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPITypes()
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPIFormats()
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null
     *
     * @param boolean[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'amount_per_invoicing' => 'amount_per_invoicing',
        'cost_center_id' => 'cost_center_id',
        'currency' => 'currency',
        'customer' => 'customer',
        'delivery' => 'delivery',
        'distribution_method' => 'distribution_method',
        'email' => 'email',
        'invoice_handling' => 'invoice_handling',
        'invoice_service_type' => 'invoice_service_type',
        'order_number' => 'order_number',
        'our_reference' => 'our_reference',
        'payment_terms' => 'payment_terms',
        'price_list_id' => 'price_list_id',
        'print_configuration' => 'print_configuration',
        'project_id' => 'project_id',
        'remark' => 'remark',
        'status' => 'status',
        'tax_reduction_category' => 'tax_reduction_category',
        'vat_option' => 'vat_option',
        'vat_payment_type' => 'vat_payment_type',
        'your_reference' => 'your_reference',
        'accrual' => 'accrual',
        'dates' => 'dates',
        'rows' => 'rows',
        'tax_reductions' => 'tax_reductions',
        'deviation_type' => 'deviation_type',
        'invoice_period_start' => 'invoice_period_start',
        'repeat_amount' => 'repeat_amount',
        'repeat_unit' => 'repeat_unit',
        'account_number' => 'account_number',
        'article_id' => 'article_id',
        'description' => 'description',
        'discount' => 'discount',
        'discount_type' => 'discount_type',
        'price' => 'price',
        'quantity' => 'quantity',
        'row_index' => 'row_index',
        'type' => 'type',
        'unit' => 'unit',
        'vat_percentage' => 'vat_percentage',
        'amount' => 'amount',
        'applicant_name' => 'applicant_name',
        'ssn' => 'ssn',
        'accrual_account_number' => 'accrual_account_number',
        'revenue_account_number' => 'revenue_account_number',
        'credit' => 'credit',
        'debit' => 'debit',
        'transaction_info' => 'transaction_info',
        'invoice' => 'invoice',
        'period' => 'period',
        'address' => 'address',
        'city' => 'city',
        'country_code' => 'country_code',
        'name' => 'name',
        'number' => 'number',
        'phone' => 'phone',
        'zip' => 'zip'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'amount_per_invoicing' => 'setAmountPerInvoicing',
        'cost_center_id' => 'setCostCenterId',
        'currency' => 'setCurrency',
        'customer' => 'setCustomer',
        'delivery' => 'setDelivery',
        'distribution_method' => 'setDistributionMethod',
        'email' => 'setEmail',
        'invoice_handling' => 'setInvoiceHandling',
        'invoice_service_type' => 'setInvoiceServiceType',
        'order_number' => 'setOrderNumber',
        'our_reference' => 'setOurReference',
        'payment_terms' => 'setPaymentTerms',
        'price_list_id' => 'setPriceListId',
        'print_configuration' => 'setPrintConfiguration',
        'project_id' => 'setProjectId',
        'remark' => 'setRemark',
        'status' => 'setStatus',
        'tax_reduction_category' => 'setTaxReductionCategory',
        'vat_option' => 'setVatOption',
        'vat_payment_type' => 'setVatPaymentType',
        'your_reference' => 'setYourReference',
        'accrual' => 'setAccrual',
        'dates' => 'setDates',
        'rows' => 'setRows',
        'tax_reductions' => 'setTaxReductions',
        'deviation_type' => 'setDeviationType',
        'invoice_period_start' => 'setInvoicePeriodStart',
        'repeat_amount' => 'setRepeatAmount',
        'repeat_unit' => 'setRepeatUnit',
        'account_number' => 'setAccountNumber',
        'article_id' => 'setArticleId',
        'description' => 'setDescription',
        'discount' => 'setDiscount',
        'discount_type' => 'setDiscountType',
        'price' => 'setPrice',
        'quantity' => 'setQuantity',
        'row_index' => 'setRowIndex',
        'type' => 'setType',
        'unit' => 'setUnit',
        'vat_percentage' => 'setVatPercentage',
        'amount' => 'setAmount',
        'applicant_name' => 'setApplicantName',
        'ssn' => 'setSsn',
        'accrual_account_number' => 'setAccrualAccountNumber',
        'revenue_account_number' => 'setRevenueAccountNumber',
        'credit' => 'setCredit',
        'debit' => 'setDebit',
        'transaction_info' => 'setTransactionInfo',
        'invoice' => 'setInvoice',
        'period' => 'setPeriod',
        'address' => 'setAddress',
        'city' => 'setCity',
        'country_code' => 'setCountryCode',
        'name' => 'setName',
        'number' => 'setNumber',
        'phone' => 'setPhone',
        'zip' => 'setZip'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'amount_per_invoicing' => 'getAmountPerInvoicing',
        'cost_center_id' => 'getCostCenterId',
        'currency' => 'getCurrency',
        'customer' => 'getCustomer',
        'delivery' => 'getDelivery',
        'distribution_method' => 'getDistributionMethod',
        'email' => 'getEmail',
        'invoice_handling' => 'getInvoiceHandling',
        'invoice_service_type' => 'getInvoiceServiceType',
        'order_number' => 'getOrderNumber',
        'our_reference' => 'getOurReference',
        'payment_terms' => 'getPaymentTerms',
        'price_list_id' => 'getPriceListId',
        'print_configuration' => 'getPrintConfiguration',
        'project_id' => 'getProjectId',
        'remark' => 'getRemark',
        'status' => 'getStatus',
        'tax_reduction_category' => 'getTaxReductionCategory',
        'vat_option' => 'getVatOption',
        'vat_payment_type' => 'getVatPaymentType',
        'your_reference' => 'getYourReference',
        'accrual' => 'getAccrual',
        'dates' => 'getDates',
        'rows' => 'getRows',
        'tax_reductions' => 'getTaxReductions',
        'deviation_type' => 'getDeviationType',
        'invoice_period_start' => 'getInvoicePeriodStart',
        'repeat_amount' => 'getRepeatAmount',
        'repeat_unit' => 'getRepeatUnit',
        'account_number' => 'getAccountNumber',
        'article_id' => 'getArticleId',
        'description' => 'getDescription',
        'discount' => 'getDiscount',
        'discount_type' => 'getDiscountType',
        'price' => 'getPrice',
        'quantity' => 'getQuantity',
        'row_index' => 'getRowIndex',
        'type' => 'getType',
        'unit' => 'getUnit',
        'vat_percentage' => 'getVatPercentage',
        'amount' => 'getAmount',
        'applicant_name' => 'getApplicantName',
        'ssn' => 'getSsn',
        'accrual_account_number' => 'getAccrualAccountNumber',
        'revenue_account_number' => 'getRevenueAccountNumber',
        'credit' => 'getCredit',
        'debit' => 'getDebit',
        'transaction_info' => 'getTransactionInfo',
        'invoice' => 'getInvoice',
        'period' => 'getPeriod',
        'address' => 'getAddress',
        'city' => 'getCity',
        'country_code' => 'getCountryCode',
        'name' => 'getName',
        'number' => 'getNumber',
        'phone' => 'getPhone',
        'zip' => 'getZip'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$openAPIModelName;
    }


    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[]|null $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('amount_per_invoicing', $data ?? [], 1);
        $this->setIfExists('cost_center_id', $data ?? [], null);
        $this->setIfExists('currency', $data ?? [], null);
        $this->setIfExists('customer', $data ?? [], null);
        $this->setIfExists('delivery', $data ?? [], null);
        $this->setIfExists('distribution_method', $data ?? [], null);
        $this->setIfExists('email', $data ?? [], null);
        $this->setIfExists('invoice_handling', $data ?? [], null);
        $this->setIfExists('invoice_service_type', $data ?? [], null);
        $this->setIfExists('order_number', $data ?? [], null);
        $this->setIfExists('our_reference', $data ?? [], null);
        $this->setIfExists('payment_terms', $data ?? [], null);
        $this->setIfExists('price_list_id', $data ?? [], null);
        $this->setIfExists('print_configuration', $data ?? [], null);
        $this->setIfExists('project_id', $data ?? [], null);
        $this->setIfExists('remark', $data ?? [], null);
        $this->setIfExists('status', $data ?? [], null);
        $this->setIfExists('tax_reduction_category', $data ?? [], null);
        $this->setIfExists('vat_option', $data ?? [], null);
        $this->setIfExists('vat_payment_type', $data ?? [], null);
        $this->setIfExists('your_reference', $data ?? [], null);
        $this->setIfExists('accrual', $data ?? [], null);
        $this->setIfExists('dates', $data ?? [], null);
        $this->setIfExists('rows', $data ?? [], null);
        $this->setIfExists('tax_reductions', $data ?? [], null);
        $this->setIfExists('deviation_type', $data ?? [], null);
        $this->setIfExists('invoice_period_start', $data ?? [], null);
        $this->setIfExists('repeat_amount', $data ?? [], null);
        $this->setIfExists('repeat_unit', $data ?? [], null);
        $this->setIfExists('account_number', $data ?? [], null);
        $this->setIfExists('article_id', $data ?? [], null);
        $this->setIfExists('description', $data ?? [], null);
        $this->setIfExists('discount', $data ?? [], null);
        $this->setIfExists('discount_type', $data ?? [], null);
        $this->setIfExists('price', $data ?? [], null);
        $this->setIfExists('quantity', $data ?? [], null);
        $this->setIfExists('row_index', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('unit', $data ?? [], null);
        $this->setIfExists('vat_percentage', $data ?? [], null);
        $this->setIfExists('amount', $data ?? [], null);
        $this->setIfExists('applicant_name', $data ?? [], null);
        $this->setIfExists('ssn', $data ?? [], null);
        $this->setIfExists('accrual_account_number', $data ?? [], null);
        $this->setIfExists('revenue_account_number', $data ?? [], null);
        $this->setIfExists('credit', $data ?? [], null);
        $this->setIfExists('debit', $data ?? [], null);
        $this->setIfExists('transaction_info', $data ?? [], null);
        $this->setIfExists('invoice', $data ?? [], null);
        $this->setIfExists('period', $data ?? [], null);
        $this->setIfExists('address', $data ?? [], null);
        $this->setIfExists('city', $data ?? [], null);
        $this->setIfExists('country_code', $data ?? [], null);
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('number', $data ?? [], null);
        $this->setIfExists('phone', $data ?? [], null);
        $this->setIfExists('zip', $data ?? [], null);
    }

    /**
    * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
    * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
    * $this->openAPINullablesSetToNull array
    *
    * @param string $variableName
    * @param array  $fields
    * @param mixed  $defaultValue
    */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets amount_per_invoicing
     *
     * @return int|null
     */
    public function getAmountPerInvoicing()
    {
        return $this->container['amount_per_invoicing'];
    }

    /**
     * Sets amount_per_invoicing
     *
     * @param int|null $amount_per_invoicing amount_per_invoicing
     *
     * @return self
     */
    public function setAmountPerInvoicing($amount_per_invoicing)
    {
        if (is_null($amount_per_invoicing)) {
            throw new \InvalidArgumentException('non-nullable amount_per_invoicing cannot be null');
        }
        $this->container['amount_per_invoicing'] = $amount_per_invoicing;

        return $this;
    }

    /**
     * Gets cost_center_id
     *
     * @return string|null
     */
    public function getCostCenterId()
    {
        return $this->container['cost_center_id'];
    }

    /**
     * Sets cost_center_id
     *
     * @param string|null $cost_center_id cost_center_id
     *
     * @return self
     */
    public function setCostCenterId($cost_center_id)
    {
        if (is_null($cost_center_id)) {
            throw new \InvalidArgumentException('non-nullable cost_center_id cannot be null');
        }
        $this->container['cost_center_id'] = $cost_center_id;

        return $this;
    }

    /**
     * Gets currency
     *
     * @return string|null
     */
    public function getCurrency()
    {
        return $this->container['currency'];
    }

    /**
     * Sets currency
     *
     * @param string|null $currency currency
     *
     * @return self
     */
    public function setCurrency($currency)
    {
        if (is_null($currency)) {
            throw new \InvalidArgumentException('non-nullable currency cannot be null');
        }
        $this->container['currency'] = $currency;

        return $this;
    }

    /**
     * Gets customer
     *
     * @return \Fortnox\Model\RecurringAPIPartialRecurringCustomer|null
     */
    public function getCustomer()
    {
        return $this->container['customer'];
    }

    /**
     * Sets customer
     *
     * @param \Fortnox\Model\RecurringAPIPartialRecurringCustomer|null $customer customer
     *
     * @return self
     */
    public function setCustomer($customer)
    {
        if (is_null($customer)) {
            throw new \InvalidArgumentException('non-nullable customer cannot be null');
        }
        $this->container['customer'] = $customer;

        return $this;
    }

    /**
     * Gets delivery
     *
     * @return \Fortnox\Model\RecurringAPIRecurringDelivery|null
     */
    public function getDelivery()
    {
        return $this->container['delivery'];
    }

    /**
     * Sets delivery
     *
     * @param \Fortnox\Model\RecurringAPIRecurringDelivery|null $delivery delivery
     *
     * @return self
     */
    public function setDelivery($delivery)
    {
        if (is_null($delivery)) {
            throw new \InvalidArgumentException('non-nullable delivery cannot be null');
        }
        $this->container['delivery'] = $delivery;

        return $this;
    }

    /**
     * Gets distribution_method
     *
     * @return string|null
     */
    public function getDistributionMethod()
    {
        return $this->container['distribution_method'];
    }

    /**
     * Sets distribution_method
     *
     * @param string|null $distribution_method distribution_method
     *
     * @return self
     */
    public function setDistributionMethod($distribution_method)
    {
        if (is_null($distribution_method)) {
            throw new \InvalidArgumentException('non-nullable distribution_method cannot be null');
        }
        $this->container['distribution_method'] = $distribution_method;

        return $this;
    }

    /**
     * Gets email
     *
     * @return \Fortnox\Model\RecurringAPIRecurringEmail|null
     */
    public function getEmail()
    {
        return $this->container['email'];
    }

    /**
     * Sets email
     *
     * @param \Fortnox\Model\RecurringAPIRecurringEmail|null $email email
     *
     * @return self
     */
    public function setEmail($email)
    {
        if (is_null($email)) {
            throw new \InvalidArgumentException('non-nullable email cannot be null');
        }
        $this->container['email'] = $email;

        return $this;
    }

    /**
     * Gets invoice_handling
     *
     * @return string|null
     */
    public function getInvoiceHandling()
    {
        return $this->container['invoice_handling'];
    }

    /**
     * Sets invoice_handling
     *
     * @param string|null $invoice_handling invoice_handling
     *
     * @return self
     */
    public function setInvoiceHandling($invoice_handling)
    {
        if (is_null($invoice_handling)) {
            throw new \InvalidArgumentException('non-nullable invoice_handling cannot be null');
        }
        $this->container['invoice_handling'] = $invoice_handling;

        return $this;
    }

    /**
     * Gets invoice_service_type
     *
     * @return string|null
     */
    public function getInvoiceServiceType()
    {
        return $this->container['invoice_service_type'];
    }

    /**
     * Sets invoice_service_type
     *
     * @param string|null $invoice_service_type Specifies the type of invoice service to use; only applicable when invoice_handling is AUTOMATIC_WITH_INVOICE_SERVICE. If invoice_handling is MANUAL or AUTOMATIC, this field should be omitted.
     *
     * @return self
     */
    public function setInvoiceServiceType($invoice_service_type)
    {
        if (is_null($invoice_service_type)) {
            throw new \InvalidArgumentException('non-nullable invoice_service_type cannot be null');
        }
        $this->container['invoice_service_type'] = $invoice_service_type;

        return $this;
    }

    /**
     * Gets order_number
     *
     * @return string|null
     */
    public function getOrderNumber()
    {
        return $this->container['order_number'];
    }

    /**
     * Sets order_number
     *
     * @param string|null $order_number order_number
     *
     * @return self
     */
    public function setOrderNumber($order_number)
    {
        if (is_null($order_number)) {
            throw new \InvalidArgumentException('non-nullable order_number cannot be null');
        }
        $this->container['order_number'] = $order_number;

        return $this;
    }

    /**
     * Gets our_reference
     *
     * @return string|null
     */
    public function getOurReference()
    {
        return $this->container['our_reference'];
    }

    /**
     * Sets our_reference
     *
     * @param string|null $our_reference our_reference
     *
     * @return self
     */
    public function setOurReference($our_reference)
    {
        if (is_null($our_reference)) {
            throw new \InvalidArgumentException('non-nullable our_reference cannot be null');
        }
        $this->container['our_reference'] = $our_reference;

        return $this;
    }

    /**
     * Gets payment_terms
     *
     * @return string|null
     */
    public function getPaymentTerms()
    {
        return $this->container['payment_terms'];
    }

    /**
     * Sets payment_terms
     *
     * @param string|null $payment_terms payment_terms
     *
     * @return self
     */
    public function setPaymentTerms($payment_terms)
    {
        if (is_null($payment_terms)) {
            throw new \InvalidArgumentException('non-nullable payment_terms cannot be null');
        }
        $this->container['payment_terms'] = $payment_terms;

        return $this;
    }

    /**
     * Gets price_list_id
     *
     * @return string|null
     */
    public function getPriceListId()
    {
        return $this->container['price_list_id'];
    }

    /**
     * Sets price_list_id
     *
     * @param string|null $price_list_id price_list_id
     *
     * @return self
     */
    public function setPriceListId($price_list_id)
    {
        if (is_null($price_list_id)) {
            throw new \InvalidArgumentException('non-nullable price_list_id cannot be null');
        }
        $this->container['price_list_id'] = $price_list_id;

        return $this;
    }

    /**
     * Gets print_configuration
     *
     * @return \Fortnox\Model\RecurringAPIPrintConfiguration|null
     */
    public function getPrintConfiguration()
    {
        return $this->container['print_configuration'];
    }

    /**
     * Sets print_configuration
     *
     * @param \Fortnox\Model\RecurringAPIPrintConfiguration|null $print_configuration print_configuration
     *
     * @return self
     */
    public function setPrintConfiguration($print_configuration)
    {
        if (is_null($print_configuration)) {
            throw new \InvalidArgumentException('non-nullable print_configuration cannot be null');
        }
        $this->container['print_configuration'] = $print_configuration;

        return $this;
    }

    /**
     * Gets project_id
     *
     * @return string|null
     */
    public function getProjectId()
    {
        return $this->container['project_id'];
    }

    /**
     * Sets project_id
     *
     * @param string|null $project_id project_id
     *
     * @return self
     */
    public function setProjectId($project_id)
    {
        if (is_null($project_id)) {
            throw new \InvalidArgumentException('non-nullable project_id cannot be null');
        }
        $this->container['project_id'] = $project_id;

        return $this;
    }

    /**
     * Gets remark
     *
     * @return string|null
     */
    public function getRemark()
    {
        return $this->container['remark'];
    }

    /**
     * Sets remark
     *
     * @param string|null $remark remark
     *
     * @return self
     */
    public function setRemark($remark)
    {
        if (is_null($remark)) {
            throw new \InvalidArgumentException('non-nullable remark cannot be null');
        }
        $this->container['remark'] = $remark;

        return $this;
    }

    /**
     * Gets status
     *
     * @return \Fortnox\Model\RecurringAPIRecurringStatus|null
     */
    public function getStatus()
    {
        return $this->container['status'];
    }

    /**
     * Sets status
     *
     * @param \Fortnox\Model\RecurringAPIRecurringStatus|null $status status
     *
     * @return self
     */
    public function setStatus($status)
    {
        if (is_null($status)) {
            throw new \InvalidArgumentException('non-nullable status cannot be null');
        }
        $this->container['status'] = $status;

        return $this;
    }

    /**
     * Gets tax_reduction_category
     *
     * @return string|null
     */
    public function getTaxReductionCategory()
    {
        return $this->container['tax_reduction_category'];
    }

    /**
     * Sets tax_reduction_category
     *
     * @param string|null $tax_reduction_category tax_reduction_category
     *
     * @return self
     */
    public function setTaxReductionCategory($tax_reduction_category)
    {
        if (is_null($tax_reduction_category)) {
            throw new \InvalidArgumentException('non-nullable tax_reduction_category cannot be null');
        }
        $this->container['tax_reduction_category'] = $tax_reduction_category;

        return $this;
    }

    /**
     * Gets vat_option
     *
     * @return \Fortnox\Model\RecurringAPIVatOption|null
     */
    public function getVatOption()
    {
        return $this->container['vat_option'];
    }

    /**
     * Sets vat_option
     *
     * @param \Fortnox\Model\RecurringAPIVatOption|null $vat_option vat_option
     *
     * @return self
     */
    public function setVatOption($vat_option)
    {
        if (is_null($vat_option)) {
            throw new \InvalidArgumentException('non-nullable vat_option cannot be null');
        }
        $this->container['vat_option'] = $vat_option;

        return $this;
    }

    /**
     * Gets vat_payment_type
     *
     * @return string|null
     */
    public function getVatPaymentType()
    {
        return $this->container['vat_payment_type'];
    }

    /**
     * Sets vat_payment_type
     *
     * @param string|null $vat_payment_type vat_payment_type
     *
     * @return self
     */
    public function setVatPaymentType($vat_payment_type)
    {
        if (is_null($vat_payment_type)) {
            throw new \InvalidArgumentException('non-nullable vat_payment_type cannot be null');
        }
        $this->container['vat_payment_type'] = $vat_payment_type;

        return $this;
    }

    /**
     * Gets your_reference
     *
     * @return string|null
     */
    public function getYourReference()
    {
        return $this->container['your_reference'];
    }

    /**
     * Sets your_reference
     *
     * @param string|null $your_reference your_reference
     *
     * @return self
     */
    public function setYourReference($your_reference)
    {
        if (is_null($your_reference)) {
            throw new \InvalidArgumentException('non-nullable your_reference cannot be null');
        }
        $this->container['your_reference'] = $your_reference;

        return $this;
    }

    /**
     * Gets accrual
     *
     * @return \Fortnox\Model\RecurringAPIPartialAccrual|null
     */
    public function getAccrual()
    {
        return $this->container['accrual'];
    }

    /**
     * Sets accrual
     *
     * @param \Fortnox\Model\RecurringAPIPartialAccrual|null $accrual accrual
     *
     * @return self
     */
    public function setAccrual($accrual)
    {
        if (is_null($accrual)) {
            throw new \InvalidArgumentException('non-nullable accrual cannot be null');
        }
        $this->container['accrual'] = $accrual;

        return $this;
    }

    /**
     * Gets dates
     *
     * @return \Fortnox\Model\RecurringAPIPartialRecurringDates|null
     */
    public function getDates()
    {
        return $this->container['dates'];
    }

    /**
     * Sets dates
     *
     * @param \Fortnox\Model\RecurringAPIPartialRecurringDates|null $dates dates
     *
     * @return self
     */
    public function setDates($dates)
    {
        if (is_null($dates)) {
            throw new \InvalidArgumentException('non-nullable dates cannot be null');
        }
        $this->container['dates'] = $dates;

        return $this;
    }

    /**
     * Gets rows
     *
     * @return \Fortnox\Model\RecurringAPIPartialAccrualRow[]|null
     */
    public function getRows()
    {
        return $this->container['rows'];
    }

    /**
     * Sets rows
     *
     * @param \Fortnox\Model\RecurringAPIPartialAccrualRow[]|null $rows rows
     *
     * @return self
     */
    public function setRows($rows)
    {
        if (is_null($rows)) {
            throw new \InvalidArgumentException('non-nullable rows cannot be null');
        }
        $this->container['rows'] = $rows;

        return $this;
    }

    /**
     * Gets tax_reductions
     *
     * @return \Fortnox\Model\RecurringAPIPartialTaxReduction[]|null
     */
    public function getTaxReductions()
    {
        return $this->container['tax_reductions'];
    }

    /**
     * Sets tax_reductions
     *
     * @param \Fortnox\Model\RecurringAPIPartialTaxReduction[]|null $tax_reductions tax_reductions
     *
     * @return self
     */
    public function setTaxReductions($tax_reductions)
    {
        if (is_null($tax_reductions)) {
            throw new \InvalidArgumentException('non-nullable tax_reductions cannot be null');
        }
        $this->container['tax_reductions'] = $tax_reductions;

        return $this;
    }

    /**
     * Gets deviation_type
     *
     * @return string|null
     */
    public function getDeviationType()
    {
        return $this->container['deviation_type'];
    }

    /**
     * Sets deviation_type
     *
     * @param string|null $deviation_type deviation_type
     *
     * @return self
     */
    public function setDeviationType($deviation_type)
    {
        if (is_null($deviation_type)) {
            throw new \InvalidArgumentException('non-nullable deviation_type cannot be null');
        }
        $this->container['deviation_type'] = $deviation_type;

        return $this;
    }

    /**
     * Gets invoice_period_start
     *
     * @return \DateTime|null
     */
    public function getInvoicePeriodStart()
    {
        return $this->container['invoice_period_start'];
    }

    /**
     * Sets invoice_period_start
     *
     * @param \DateTime|null $invoice_period_start invoice_period_start
     *
     * @return self
     */
    public function setInvoicePeriodStart($invoice_period_start)
    {
        if (is_null($invoice_period_start)) {
            throw new \InvalidArgumentException('non-nullable invoice_period_start cannot be null');
        }
        $this->container['invoice_period_start'] = $invoice_period_start;

        return $this;
    }

    /**
     * Gets repeat_amount
     *
     * @return int|null
     */
    public function getRepeatAmount()
    {
        return $this->container['repeat_amount'];
    }

    /**
     * Sets repeat_amount
     *
     * @param int|null $repeat_amount repeat_amount
     *
     * @return self
     */
    public function setRepeatAmount($repeat_amount)
    {
        if (is_null($repeat_amount)) {
            throw new \InvalidArgumentException('non-nullable repeat_amount cannot be null');
        }
        $this->container['repeat_amount'] = $repeat_amount;

        return $this;
    }

    /**
     * Gets repeat_unit
     *
     * @return string|null
     */
    public function getRepeatUnit()
    {
        return $this->container['repeat_unit'];
    }

    /**
     * Sets repeat_unit
     *
     * @param string|null $repeat_unit repeat_unit
     *
     * @return self
     */
    public function setRepeatUnit($repeat_unit)
    {
        if (is_null($repeat_unit)) {
            throw new \InvalidArgumentException('non-nullable repeat_unit cannot be null');
        }
        $this->container['repeat_unit'] = $repeat_unit;

        return $this;
    }

    /**
     * Gets account_number
     *
     * @return int|null
     */
    public function getAccountNumber()
    {
        return $this->container['account_number'];
    }

    /**
     * Sets account_number
     *
     * @param int|null $account_number account_number
     *
     * @return self
     */
    public function setAccountNumber($account_number)
    {
        if (is_null($account_number)) {
            throw new \InvalidArgumentException('non-nullable account_number cannot be null');
        }
        $this->container['account_number'] = $account_number;

        return $this;
    }

    /**
     * Gets article_id
     *
     * @return string|null
     */
    public function getArticleId()
    {
        return $this->container['article_id'];
    }

    /**
     * Sets article_id
     *
     * @param string|null $article_id article_id
     *
     * @return self
     */
    public function setArticleId($article_id)
    {
        if (is_null($article_id)) {
            throw new \InvalidArgumentException('non-nullable article_id cannot be null');
        }
        $this->container['article_id'] = $article_id;

        return $this;
    }

    /**
     * Gets description
     *
     * @return string|null
     */
    public function getDescription()
    {
        return $this->container['description'];
    }

    /**
     * Sets description
     *
     * @param string|null $description description
     *
     * @return self
     */
    public function setDescription($description)
    {
        if (is_null($description)) {
            throw new \InvalidArgumentException('non-nullable description cannot be null');
        }
        $this->container['description'] = $description;

        return $this;
    }

    /**
     * Gets discount
     *
     * @return float|null
     */
    public function getDiscount()
    {
        return $this->container['discount'];
    }

    /**
     * Sets discount
     *
     * @param float|null $discount discount
     *
     * @return self
     */
    public function setDiscount($discount)
    {
        if (is_null($discount)) {
            throw new \InvalidArgumentException('non-nullable discount cannot be null');
        }
        $this->container['discount'] = $discount;

        return $this;
    }

    /**
     * Gets discount_type
     *
     * @return string|null
     */
    public function getDiscountType()
    {
        return $this->container['discount_type'];
    }

    /**
     * Sets discount_type
     *
     * @param string|null $discount_type discount_type
     *
     * @return self
     */
    public function setDiscountType($discount_type)
    {
        if (is_null($discount_type)) {
            throw new \InvalidArgumentException('non-nullable discount_type cannot be null');
        }
        $this->container['discount_type'] = $discount_type;

        return $this;
    }

    /**
     * Gets price
     *
     * @return float|null
     */
    public function getPrice()
    {
        return $this->container['price'];
    }

    /**
     * Sets price
     *
     * @param float|null $price price
     *
     * @return self
     */
    public function setPrice($price)
    {
        if (is_null($price)) {
            throw new \InvalidArgumentException('non-nullable price cannot be null');
        }
        $this->container['price'] = $price;

        return $this;
    }

    /**
     * Gets quantity
     *
     * @return float|null
     */
    public function getQuantity()
    {
        return $this->container['quantity'];
    }

    /**
     * Sets quantity
     *
     * @param float|null $quantity quantity
     *
     * @return self
     */
    public function setQuantity($quantity)
    {
        if (is_null($quantity)) {
            throw new \InvalidArgumentException('non-nullable quantity cannot be null');
        }
        $this->container['quantity'] = $quantity;

        return $this;
    }

    /**
     * Gets row_index
     *
     * @return int|null
     */
    public function getRowIndex()
    {
        return $this->container['row_index'];
    }

    /**
     * Sets row_index
     *
     * @param int|null $row_index row_index
     *
     * @return self
     */
    public function setRowIndex($row_index)
    {
        if (is_null($row_index)) {
            throw new \InvalidArgumentException('non-nullable row_index cannot be null');
        }
        $this->container['row_index'] = $row_index;

        return $this;
    }

    /**
     * Gets type
     *
     * @return string|null
     */
    public function getType()
    {
        return $this->container['type'];
    }

    /**
     * Sets type
     *
     * @param string|null $type type
     *
     * @return self
     */
    public function setType($type)
    {
        if (is_null($type)) {
            throw new \InvalidArgumentException('non-nullable type cannot be null');
        }
        $this->container['type'] = $type;

        return $this;
    }

    /**
     * Gets unit
     *
     * @return string|null
     */
    public function getUnit()
    {
        return $this->container['unit'];
    }

    /**
     * Sets unit
     *
     * @param string|null $unit unit
     *
     * @return self
     */
    public function setUnit($unit)
    {
        if (is_null($unit)) {
            throw new \InvalidArgumentException('non-nullable unit cannot be null');
        }
        $this->container['unit'] = $unit;

        return $this;
    }

    /**
     * Gets vat_percentage
     *
     * @return float|null
     */
    public function getVatPercentage()
    {
        return $this->container['vat_percentage'];
    }

    /**
     * Sets vat_percentage
     *
     * @param float|null $vat_percentage vat_percentage
     *
     * @return self
     */
    public function setVatPercentage($vat_percentage)
    {
        if (is_null($vat_percentage)) {
            throw new \InvalidArgumentException('non-nullable vat_percentage cannot be null');
        }
        $this->container['vat_percentage'] = $vat_percentage;

        return $this;
    }

    /**
     * Gets amount
     *
     * @return int|null
     */
    public function getAmount()
    {
        return $this->container['amount'];
    }

    /**
     * Sets amount
     *
     * @param int|null $amount amount
     *
     * @return self
     */
    public function setAmount($amount)
    {
        if (is_null($amount)) {
            throw new \InvalidArgumentException('non-nullable amount cannot be null');
        }
        $this->container['amount'] = $amount;

        return $this;
    }

    /**
     * Gets applicant_name
     *
     * @return string|null
     */
    public function getApplicantName()
    {
        return $this->container['applicant_name'];
    }

    /**
     * Sets applicant_name
     *
     * @param string|null $applicant_name applicant_name
     *
     * @return self
     */
    public function setApplicantName($applicant_name)
    {
        if (is_null($applicant_name)) {
            throw new \InvalidArgumentException('non-nullable applicant_name cannot be null');
        }
        $this->container['applicant_name'] = $applicant_name;

        return $this;
    }

    /**
     * Gets ssn
     *
     * @return string|null
     */
    public function getSsn()
    {
        return $this->container['ssn'];
    }

    /**
     * Sets ssn
     *
     * @param string|null $ssn ssn
     *
     * @return self
     */
    public function setSsn($ssn)
    {
        if (is_null($ssn)) {
            throw new \InvalidArgumentException('non-nullable ssn cannot be null');
        }
        $this->container['ssn'] = $ssn;

        return $this;
    }

    /**
     * Gets accrual_account_number
     *
     * @return int|null
     */
    public function getAccrualAccountNumber()
    {
        return $this->container['accrual_account_number'];
    }

    /**
     * Sets accrual_account_number
     *
     * @param int|null $accrual_account_number accrual_account_number
     *
     * @return self
     */
    public function setAccrualAccountNumber($accrual_account_number)
    {
        if (is_null($accrual_account_number)) {
            throw new \InvalidArgumentException('non-nullable accrual_account_number cannot be null');
        }
        $this->container['accrual_account_number'] = $accrual_account_number;

        return $this;
    }

    /**
     * Gets revenue_account_number
     *
     * @return int|null
     */
    public function getRevenueAccountNumber()
    {
        return $this->container['revenue_account_number'];
    }

    /**
     * Sets revenue_account_number
     *
     * @param int|null $revenue_account_number revenue_account_number
     *
     * @return self
     */
    public function setRevenueAccountNumber($revenue_account_number)
    {
        if (is_null($revenue_account_number)) {
            throw new \InvalidArgumentException('non-nullable revenue_account_number cannot be null');
        }
        $this->container['revenue_account_number'] = $revenue_account_number;

        return $this;
    }

    /**
     * Gets credit
     *
     * @return float|null
     */
    public function getCredit()
    {
        return $this->container['credit'];
    }

    /**
     * Sets credit
     *
     * @param float|null $credit credit
     *
     * @return self
     */
    public function setCredit($credit)
    {
        if (is_null($credit)) {
            throw new \InvalidArgumentException('non-nullable credit cannot be null');
        }
        $this->container['credit'] = $credit;

        return $this;
    }

    /**
     * Gets debit
     *
     * @return float|null
     */
    public function getDebit()
    {
        return $this->container['debit'];
    }

    /**
     * Sets debit
     *
     * @param float|null $debit debit
     *
     * @return self
     */
    public function setDebit($debit)
    {
        if (is_null($debit)) {
            throw new \InvalidArgumentException('non-nullable debit cannot be null');
        }
        $this->container['debit'] = $debit;

        return $this;
    }

    /**
     * Gets transaction_info
     *
     * @return string|null
     */
    public function getTransactionInfo()
    {
        return $this->container['transaction_info'];
    }

    /**
     * Sets transaction_info
     *
     * @param string|null $transaction_info transaction_info
     *
     * @return self
     */
    public function setTransactionInfo($transaction_info)
    {
        if (is_null($transaction_info)) {
            throw new \InvalidArgumentException('non-nullable transaction_info cannot be null');
        }
        $this->container['transaction_info'] = $transaction_info;

        return $this;
    }

    /**
     * Gets invoice
     *
     * @return \Fortnox\Model\RecurringAPIInvoiceDateConfiguration|null
     */
    public function getInvoice()
    {
        return $this->container['invoice'];
    }

    /**
     * Sets invoice
     *
     * @param \Fortnox\Model\RecurringAPIInvoiceDateConfiguration|null $invoice invoice
     *
     * @return self
     */
    public function setInvoice($invoice)
    {
        if (is_null($invoice)) {
            throw new \InvalidArgumentException('non-nullable invoice cannot be null');
        }
        $this->container['invoice'] = $invoice;

        return $this;
    }

    /**
     * Gets period
     *
     * @return \Fortnox\Model\RecurringAPIPeriodDateConfiguration|null
     */
    public function getPeriod()
    {
        return $this->container['period'];
    }

    /**
     * Sets period
     *
     * @param \Fortnox\Model\RecurringAPIPeriodDateConfiguration|null $period period
     *
     * @return self
     */
    public function setPeriod($period)
    {
        if (is_null($period)) {
            throw new \InvalidArgumentException('non-nullable period cannot be null');
        }
        $this->container['period'] = $period;

        return $this;
    }

    /**
     * Gets address
     *
     * @return string|null
     */
    public function getAddress()
    {
        return $this->container['address'];
    }

    /**
     * Sets address
     *
     * @param string|null $address address
     *
     * @return self
     */
    public function setAddress($address)
    {
        if (is_null($address)) {
            throw new \InvalidArgumentException('non-nullable address cannot be null');
        }
        $this->container['address'] = $address;

        return $this;
    }

    /**
     * Gets city
     *
     * @return string|null
     */
    public function getCity()
    {
        return $this->container['city'];
    }

    /**
     * Sets city
     *
     * @param string|null $city city
     *
     * @return self
     */
    public function setCity($city)
    {
        if (is_null($city)) {
            throw new \InvalidArgumentException('non-nullable city cannot be null');
        }
        $this->container['city'] = $city;

        return $this;
    }

    /**
     * Gets country_code
     *
     * @return string|null
     */
    public function getCountryCode()
    {
        return $this->container['country_code'];
    }

    /**
     * Sets country_code
     *
     * @param string|null $country_code country_code
     *
     * @return self
     */
    public function setCountryCode($country_code)
    {
        if (is_null($country_code)) {
            throw new \InvalidArgumentException('non-nullable country_code cannot be null');
        }
        $this->container['country_code'] = $country_code;

        return $this;
    }

    /**
     * Gets name
     *
     * @return string|null
     */
    public function getName()
    {
        return $this->container['name'];
    }

    /**
     * Sets name
     *
     * @param string|null $name name
     *
     * @return self
     */
    public function setName($name)
    {
        if (is_null($name)) {
            throw new \InvalidArgumentException('non-nullable name cannot be null');
        }
        $this->container['name'] = $name;

        return $this;
    }

    /**
     * Gets number
     *
     * @return string|null
     */
    public function getNumber()
    {
        return $this->container['number'];
    }

    /**
     * Sets number
     *
     * @param string|null $number number
     *
     * @return self
     */
    public function setNumber($number)
    {
        if (is_null($number)) {
            throw new \InvalidArgumentException('non-nullable number cannot be null');
        }
        $this->container['number'] = $number;

        return $this;
    }

    /**
     * Gets phone
     *
     * @return string|null
     */
    public function getPhone()
    {
        return $this->container['phone'];
    }

    /**
     * Sets phone
     *
     * @param string|null $phone phone
     *
     * @return self
     */
    public function setPhone($phone)
    {
        if (is_null($phone)) {
            throw new \InvalidArgumentException('non-nullable phone cannot be null');
        }
        $this->container['phone'] = $phone;

        return $this;
    }

    /**
     * Gets zip
     *
     * @return string|null
     */
    public function getZip()
    {
        return $this->container['zip'];
    }

    /**
     * Sets zip
     *
     * @param string|null $zip zip
     *
     * @return self
     */
    public function setZip($zip)
    {
        if (is_null($zip)) {
            throw new \InvalidArgumentException('non-nullable zip cannot be null');
        }
        $this->container['zip'] = $zip;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer|string $offset Offset
     *
     * @return boolean
     */
    public function offsetExists(mixed $offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer|string $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet(mixed $offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer|string $offset Offset
     *
     * @return void
     */
    public function offsetUnset(mixed $offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


