<?php
/**
 * FortnoxKfCustomerListItem
 *
 * 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;

/**
 * FortnoxKfCustomerListItem Class Doc Comment
 *
 * @category Class
 * @package  Fortnox
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class FortnoxKfCustomerListItem implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'at_url' => 'string',
        'active' => 'bool',
        'address1' => 'string',
        'address2' => 'string',
        'city' => 'string',
        'comments' => 'string',
        'cost_center' => 'string',
        'country' => 'string',
        'country_code' => 'string',
        'currency' => 'string',
        'customer_number' => 'string',
        'default_delivery_types' => '\Fortnox\Model\FortnoxDefaultDeliveryTypesSingleItem',
        'default_templates' => '\Fortnox\Model\FortnoxDefaultTemplatesSingleItem',
        'delivery_address1' => 'string',
        'delivery_address2' => 'string',
        'delivery_city' => 'string',
        'delivery_country' => 'string',
        'delivery_country_code' => 'string',
        'delivery_fax' => 'string',
        'delivery_name' => 'string',
        'delivery_phone1' => 'string',
        'delivery_phone2' => 'string',
        'delivery_zip_code' => 'string',
        'email' => 'string',
        'email_invoice' => 'string',
        'email_invoice_bcc' => 'string',
        'email_invoice_cc' => 'string',
        'email_offer' => 'string',
        'email_offer_bcc' => 'string',
        'email_offer_cc' => 'string',
        'email_order' => 'string',
        'email_order_bcc' => 'string',
        'email_order_cc' => 'string',
        'external_reference' => 'string',
        'fax' => 'string',
        'gln' => 'string',
        'gln_delivery' => 'string',
        'invoice_administration_fee' => 'float',
        'invoice_discount' => 'float',
        'invoice_freight' => 'float',
        'invoice_remark' => 'string',
        'name' => 'string',
        'organisation_number' => 'string',
        'our_reference' => 'string',
        'phone' => 'string',
        'phone1' => 'string',
        'phone2' => 'string',
        'price_list' => 'string',
        'project' => 'string',
        'sales_account' => 'int',
        'show_price_vat_included' => 'bool',
        'terms_of_delivery' => 'string',
        'terms_of_payment' => 'string',
        'type' => 'string',
        'vat_number' => 'string',
        'vat_type' => 'string',
        'visiting_address' => 'string',
        'visiting_city' => 'string',
        'visiting_country' => 'string',
        'visiting_country_code' => 'string',
        'visiting_zip_code' => 'string',
        'www' => 'string',
        'way_of_delivery' => 'string',
        'your_reference' => 'string',
        'zip_code' => '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 = [
        'at_url' => null,
        'active' => null,
        'address1' => null,
        'address2' => null,
        'city' => null,
        'comments' => null,
        'cost_center' => null,
        'country' => null,
        'country_code' => null,
        'currency' => null,
        'customer_number' => null,
        'default_delivery_types' => null,
        'default_templates' => null,
        'delivery_address1' => null,
        'delivery_address2' => null,
        'delivery_city' => null,
        'delivery_country' => null,
        'delivery_country_code' => null,
        'delivery_fax' => null,
        'delivery_name' => null,
        'delivery_phone1' => null,
        'delivery_phone2' => null,
        'delivery_zip_code' => null,
        'email' => null,
        'email_invoice' => null,
        'email_invoice_bcc' => null,
        'email_invoice_cc' => null,
        'email_offer' => null,
        'email_offer_bcc' => null,
        'email_offer_cc' => null,
        'email_order' => null,
        'email_order_bcc' => null,
        'email_order_cc' => null,
        'external_reference' => null,
        'fax' => null,
        'gln' => null,
        'gln_delivery' => null,
        'invoice_administration_fee' => 'float',
        'invoice_discount' => 'float',
        'invoice_freight' => 'float',
        'invoice_remark' => null,
        'name' => null,
        'organisation_number' => null,
        'our_reference' => null,
        'phone' => null,
        'phone1' => null,
        'phone2' => null,
        'price_list' => null,
        'project' => null,
        'sales_account' => 'int32',
        'show_price_vat_included' => null,
        'terms_of_delivery' => null,
        'terms_of_payment' => null,
        'type' => null,
        'vat_number' => null,
        'vat_type' => null,
        'visiting_address' => null,
        'visiting_city' => null,
        'visiting_country' => null,
        'visiting_country_code' => null,
        'visiting_zip_code' => null,
        'www' => null,
        'way_of_delivery' => null,
        'your_reference' => null,
        'zip_code' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'at_url' => false,
        'active' => false,
        'address1' => false,
        'address2' => false,
        'city' => false,
        'comments' => false,
        'cost_center' => false,
        'country' => false,
        'country_code' => false,
        'currency' => false,
        'customer_number' => false,
        'default_delivery_types' => false,
        'default_templates' => false,
        'delivery_address1' => false,
        'delivery_address2' => false,
        'delivery_city' => false,
        'delivery_country' => false,
        'delivery_country_code' => false,
        'delivery_fax' => false,
        'delivery_name' => false,
        'delivery_phone1' => false,
        'delivery_phone2' => false,
        'delivery_zip_code' => false,
        'email' => false,
        'email_invoice' => false,
        'email_invoice_bcc' => false,
        'email_invoice_cc' => false,
        'email_offer' => false,
        'email_offer_bcc' => false,
        'email_offer_cc' => false,
        'email_order' => false,
        'email_order_bcc' => false,
        'email_order_cc' => false,
        'external_reference' => false,
        'fax' => false,
        'gln' => false,
        'gln_delivery' => false,
        'invoice_administration_fee' => false,
        'invoice_discount' => false,
        'invoice_freight' => false,
        'invoice_remark' => false,
        'name' => false,
        'organisation_number' => false,
        'our_reference' => false,
        'phone' => false,
        'phone1' => false,
        'phone2' => false,
        'price_list' => false,
        'project' => false,
        'sales_account' => false,
        'show_price_vat_included' => false,
        'terms_of_delivery' => false,
        'terms_of_payment' => false,
        'type' => false,
        'vat_number' => false,
        'vat_type' => false,
        'visiting_address' => false,
        'visiting_city' => false,
        'visiting_country' => false,
        'visiting_country_code' => false,
        'visiting_zip_code' => false,
        'www' => false,
        'way_of_delivery' => false,
        'your_reference' => false,
        'zip_code' => 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 = [
        'at_url' => '@url',
        'active' => 'Active',
        'address1' => 'Address1',
        'address2' => 'Address2',
        'city' => 'City',
        'comments' => 'Comments',
        'cost_center' => 'CostCenter',
        'country' => 'Country',
        'country_code' => 'CountryCode',
        'currency' => 'Currency',
        'customer_number' => 'CustomerNumber',
        'default_delivery_types' => 'DefaultDeliveryTypes',
        'default_templates' => 'DefaultTemplates',
        'delivery_address1' => 'DeliveryAddress1',
        'delivery_address2' => 'DeliveryAddress2',
        'delivery_city' => 'DeliveryCity',
        'delivery_country' => 'DeliveryCountry',
        'delivery_country_code' => 'DeliveryCountryCode',
        'delivery_fax' => 'DeliveryFax',
        'delivery_name' => 'DeliveryName',
        'delivery_phone1' => 'DeliveryPhone1',
        'delivery_phone2' => 'DeliveryPhone2',
        'delivery_zip_code' => 'DeliveryZipCode',
        'email' => 'Email',
        'email_invoice' => 'EmailInvoice',
        'email_invoice_bcc' => 'EmailInvoiceBCC',
        'email_invoice_cc' => 'EmailInvoiceCC',
        'email_offer' => 'EmailOffer',
        'email_offer_bcc' => 'EmailOfferBCC',
        'email_offer_cc' => 'EmailOfferCC',
        'email_order' => 'EmailOrder',
        'email_order_bcc' => 'EmailOrderBCC',
        'email_order_cc' => 'EmailOrderCC',
        'external_reference' => 'ExternalReference',
        'fax' => 'Fax',
        'gln' => 'GLN',
        'gln_delivery' => 'GLNDelivery',
        'invoice_administration_fee' => 'InvoiceAdministrationFee',
        'invoice_discount' => 'InvoiceDiscount',
        'invoice_freight' => 'InvoiceFreight',
        'invoice_remark' => 'InvoiceRemark',
        'name' => 'Name',
        'organisation_number' => 'OrganisationNumber',
        'our_reference' => 'OurReference',
        'phone' => 'Phone',
        'phone1' => 'Phone1',
        'phone2' => 'Phone2',
        'price_list' => 'PriceList',
        'project' => 'Project',
        'sales_account' => 'SalesAccount',
        'show_price_vat_included' => 'ShowPriceVATIncluded',
        'terms_of_delivery' => 'TermsOfDelivery',
        'terms_of_payment' => 'TermsOfPayment',
        'type' => 'Type',
        'vat_number' => 'VATNumber',
        'vat_type' => 'VATType',
        'visiting_address' => 'VisitingAddress',
        'visiting_city' => 'VisitingCity',
        'visiting_country' => 'VisitingCountry',
        'visiting_country_code' => 'VisitingCountryCode',
        'visiting_zip_code' => 'VisitingZipCode',
        'www' => 'WWW',
        'way_of_delivery' => 'WayOfDelivery',
        'your_reference' => 'YourReference',
        'zip_code' => 'ZipCode'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'at_url' => 'setAtUrl',
        'active' => 'setActive',
        'address1' => 'setAddress1',
        'address2' => 'setAddress2',
        'city' => 'setCity',
        'comments' => 'setComments',
        'cost_center' => 'setCostCenter',
        'country' => 'setCountry',
        'country_code' => 'setCountryCode',
        'currency' => 'setCurrency',
        'customer_number' => 'setCustomerNumber',
        'default_delivery_types' => 'setDefaultDeliveryTypes',
        'default_templates' => 'setDefaultTemplates',
        'delivery_address1' => 'setDeliveryAddress1',
        'delivery_address2' => 'setDeliveryAddress2',
        'delivery_city' => 'setDeliveryCity',
        'delivery_country' => 'setDeliveryCountry',
        'delivery_country_code' => 'setDeliveryCountryCode',
        'delivery_fax' => 'setDeliveryFax',
        'delivery_name' => 'setDeliveryName',
        'delivery_phone1' => 'setDeliveryPhone1',
        'delivery_phone2' => 'setDeliveryPhone2',
        'delivery_zip_code' => 'setDeliveryZipCode',
        'email' => 'setEmail',
        'email_invoice' => 'setEmailInvoice',
        'email_invoice_bcc' => 'setEmailInvoiceBcc',
        'email_invoice_cc' => 'setEmailInvoiceCc',
        'email_offer' => 'setEmailOffer',
        'email_offer_bcc' => 'setEmailOfferBcc',
        'email_offer_cc' => 'setEmailOfferCc',
        'email_order' => 'setEmailOrder',
        'email_order_bcc' => 'setEmailOrderBcc',
        'email_order_cc' => 'setEmailOrderCc',
        'external_reference' => 'setExternalReference',
        'fax' => 'setFax',
        'gln' => 'setGln',
        'gln_delivery' => 'setGlnDelivery',
        'invoice_administration_fee' => 'setInvoiceAdministrationFee',
        'invoice_discount' => 'setInvoiceDiscount',
        'invoice_freight' => 'setInvoiceFreight',
        'invoice_remark' => 'setInvoiceRemark',
        'name' => 'setName',
        'organisation_number' => 'setOrganisationNumber',
        'our_reference' => 'setOurReference',
        'phone' => 'setPhone',
        'phone1' => 'setPhone1',
        'phone2' => 'setPhone2',
        'price_list' => 'setPriceList',
        'project' => 'setProject',
        'sales_account' => 'setSalesAccount',
        'show_price_vat_included' => 'setShowPriceVatIncluded',
        'terms_of_delivery' => 'setTermsOfDelivery',
        'terms_of_payment' => 'setTermsOfPayment',
        'type' => 'setType',
        'vat_number' => 'setVatNumber',
        'vat_type' => 'setVatType',
        'visiting_address' => 'setVisitingAddress',
        'visiting_city' => 'setVisitingCity',
        'visiting_country' => 'setVisitingCountry',
        'visiting_country_code' => 'setVisitingCountryCode',
        'visiting_zip_code' => 'setVisitingZipCode',
        'www' => 'setWww',
        'way_of_delivery' => 'setWayOfDelivery',
        'your_reference' => 'setYourReference',
        'zip_code' => 'setZipCode'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'at_url' => 'getAtUrl',
        'active' => 'getActive',
        'address1' => 'getAddress1',
        'address2' => 'getAddress2',
        'city' => 'getCity',
        'comments' => 'getComments',
        'cost_center' => 'getCostCenter',
        'country' => 'getCountry',
        'country_code' => 'getCountryCode',
        'currency' => 'getCurrency',
        'customer_number' => 'getCustomerNumber',
        'default_delivery_types' => 'getDefaultDeliveryTypes',
        'default_templates' => 'getDefaultTemplates',
        'delivery_address1' => 'getDeliveryAddress1',
        'delivery_address2' => 'getDeliveryAddress2',
        'delivery_city' => 'getDeliveryCity',
        'delivery_country' => 'getDeliveryCountry',
        'delivery_country_code' => 'getDeliveryCountryCode',
        'delivery_fax' => 'getDeliveryFax',
        'delivery_name' => 'getDeliveryName',
        'delivery_phone1' => 'getDeliveryPhone1',
        'delivery_phone2' => 'getDeliveryPhone2',
        'delivery_zip_code' => 'getDeliveryZipCode',
        'email' => 'getEmail',
        'email_invoice' => 'getEmailInvoice',
        'email_invoice_bcc' => 'getEmailInvoiceBcc',
        'email_invoice_cc' => 'getEmailInvoiceCc',
        'email_offer' => 'getEmailOffer',
        'email_offer_bcc' => 'getEmailOfferBcc',
        'email_offer_cc' => 'getEmailOfferCc',
        'email_order' => 'getEmailOrder',
        'email_order_bcc' => 'getEmailOrderBcc',
        'email_order_cc' => 'getEmailOrderCc',
        'external_reference' => 'getExternalReference',
        'fax' => 'getFax',
        'gln' => 'getGln',
        'gln_delivery' => 'getGlnDelivery',
        'invoice_administration_fee' => 'getInvoiceAdministrationFee',
        'invoice_discount' => 'getInvoiceDiscount',
        'invoice_freight' => 'getInvoiceFreight',
        'invoice_remark' => 'getInvoiceRemark',
        'name' => 'getName',
        'organisation_number' => 'getOrganisationNumber',
        'our_reference' => 'getOurReference',
        'phone' => 'getPhone',
        'phone1' => 'getPhone1',
        'phone2' => 'getPhone2',
        'price_list' => 'getPriceList',
        'project' => 'getProject',
        'sales_account' => 'getSalesAccount',
        'show_price_vat_included' => 'getShowPriceVatIncluded',
        'terms_of_delivery' => 'getTermsOfDelivery',
        'terms_of_payment' => 'getTermsOfPayment',
        'type' => 'getType',
        'vat_number' => 'getVatNumber',
        'vat_type' => 'getVatType',
        'visiting_address' => 'getVisitingAddress',
        'visiting_city' => 'getVisitingCity',
        'visiting_country' => 'getVisitingCountry',
        'visiting_country_code' => 'getVisitingCountryCode',
        'visiting_zip_code' => 'getVisitingZipCode',
        'www' => 'getWww',
        'way_of_delivery' => 'getWayOfDelivery',
        'your_reference' => 'getYourReference',
        'zip_code' => 'getZipCode'
    ];

    /**
     * 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('at_url', $data ?? [], null);
        $this->setIfExists('active', $data ?? [], null);
        $this->setIfExists('address1', $data ?? [], null);
        $this->setIfExists('address2', $data ?? [], null);
        $this->setIfExists('city', $data ?? [], null);
        $this->setIfExists('comments', $data ?? [], null);
        $this->setIfExists('cost_center', $data ?? [], null);
        $this->setIfExists('country', $data ?? [], null);
        $this->setIfExists('country_code', $data ?? [], null);
        $this->setIfExists('currency', $data ?? [], null);
        $this->setIfExists('customer_number', $data ?? [], null);
        $this->setIfExists('default_delivery_types', $data ?? [], null);
        $this->setIfExists('default_templates', $data ?? [], null);
        $this->setIfExists('delivery_address1', $data ?? [], null);
        $this->setIfExists('delivery_address2', $data ?? [], null);
        $this->setIfExists('delivery_city', $data ?? [], null);
        $this->setIfExists('delivery_country', $data ?? [], null);
        $this->setIfExists('delivery_country_code', $data ?? [], null);
        $this->setIfExists('delivery_fax', $data ?? [], null);
        $this->setIfExists('delivery_name', $data ?? [], null);
        $this->setIfExists('delivery_phone1', $data ?? [], null);
        $this->setIfExists('delivery_phone2', $data ?? [], null);
        $this->setIfExists('delivery_zip_code', $data ?? [], null);
        $this->setIfExists('email', $data ?? [], null);
        $this->setIfExists('email_invoice', $data ?? [], null);
        $this->setIfExists('email_invoice_bcc', $data ?? [], null);
        $this->setIfExists('email_invoice_cc', $data ?? [], null);
        $this->setIfExists('email_offer', $data ?? [], null);
        $this->setIfExists('email_offer_bcc', $data ?? [], null);
        $this->setIfExists('email_offer_cc', $data ?? [], null);
        $this->setIfExists('email_order', $data ?? [], null);
        $this->setIfExists('email_order_bcc', $data ?? [], null);
        $this->setIfExists('email_order_cc', $data ?? [], null);
        $this->setIfExists('external_reference', $data ?? [], null);
        $this->setIfExists('fax', $data ?? [], null);
        $this->setIfExists('gln', $data ?? [], null);
        $this->setIfExists('gln_delivery', $data ?? [], null);
        $this->setIfExists('invoice_administration_fee', $data ?? [], null);
        $this->setIfExists('invoice_discount', $data ?? [], null);
        $this->setIfExists('invoice_freight', $data ?? [], null);
        $this->setIfExists('invoice_remark', $data ?? [], null);
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('organisation_number', $data ?? [], null);
        $this->setIfExists('our_reference', $data ?? [], null);
        $this->setIfExists('phone', $data ?? [], null);
        $this->setIfExists('phone1', $data ?? [], null);
        $this->setIfExists('phone2', $data ?? [], null);
        $this->setIfExists('price_list', $data ?? [], null);
        $this->setIfExists('project', $data ?? [], null);
        $this->setIfExists('sales_account', $data ?? [], null);
        $this->setIfExists('show_price_vat_included', $data ?? [], null);
        $this->setIfExists('terms_of_delivery', $data ?? [], null);
        $this->setIfExists('terms_of_payment', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('vat_number', $data ?? [], null);
        $this->setIfExists('vat_type', $data ?? [], null);
        $this->setIfExists('visiting_address', $data ?? [], null);
        $this->setIfExists('visiting_city', $data ?? [], null);
        $this->setIfExists('visiting_country', $data ?? [], null);
        $this->setIfExists('visiting_country_code', $data ?? [], null);
        $this->setIfExists('visiting_zip_code', $data ?? [], null);
        $this->setIfExists('www', $data ?? [], null);
        $this->setIfExists('way_of_delivery', $data ?? [], null);
        $this->setIfExists('your_reference', $data ?? [], null);
        $this->setIfExists('zip_code', $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 = [];

        if (!is_null($this->container['address1']) && (mb_strlen($this->container['address1']) > 1024)) {
            $invalidProperties[] = "invalid value for 'address1', the character length must be smaller than or equal to 1024.";
        }

        if (!is_null($this->container['address2']) && (mb_strlen($this->container['address2']) > 1024)) {
            $invalidProperties[] = "invalid value for 'address2', the character length must be smaller than or equal to 1024.";
        }

        if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 1024)) {
            $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 1024.";
        }

        if (!is_null($this->container['customer_number']) && (mb_strlen($this->container['customer_number']) > 1024)) {
            $invalidProperties[] = "invalid value for 'customer_number', the character length must be smaller than or equal to 1024.";
        }

        if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 1024)) {
            $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 1024.";
        }

        if ($this->container['name'] === null) {
            $invalidProperties[] = "'name' can't be null";
        }
        if ((mb_strlen($this->container['name']) > 1024)) {
            $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 1024.";
        }

        if ((mb_strlen($this->container['name']) < 1)) {
            $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1.";
        }

        if (!is_null($this->container['organisation_number']) && (mb_strlen($this->container['organisation_number']) > 30)) {
            $invalidProperties[] = "invalid value for 'organisation_number', the character length must be smaller than or equal to 30.";
        }

        if (!is_null($this->container['phone']) && (mb_strlen($this->container['phone']) > 1024)) {
            $invalidProperties[] = "invalid value for 'phone', the character length must be smaller than or equal to 1024.";
        }

        if (!is_null($this->container['zip_code']) && (mb_strlen($this->container['zip_code']) > 10)) {
            $invalidProperties[] = "invalid value for 'zip_code', the character length must be smaller than or equal to 10.";
        }

        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 at_url
     *
     * @return string|null
     */
    public function getAtUrl()
    {
        return $this->container['at_url'];
    }

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

        return $this;
    }

    /**
     * Gets active
     *
     * @return bool|null
     */
    public function getActive()
    {
        return $this->container['active'];
    }

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

        return $this;
    }

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

    /**
     * Sets address1
     *
     * @param string|null $address1 address1
     *
     * @return self
     */
    public function setAddress1($address1)
    {
        if (is_null($address1)) {
            throw new \InvalidArgumentException('non-nullable address1 cannot be null');
        }
        if ((mb_strlen($address1) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $address1 when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }

        $this->container['address1'] = $address1;

        return $this;
    }

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

    /**
     * Sets address2
     *
     * @param string|null $address2 address2
     *
     * @return self
     */
    public function setAddress2($address2)
    {
        if (is_null($address2)) {
            throw new \InvalidArgumentException('non-nullable address2 cannot be null');
        }
        if ((mb_strlen($address2) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $address2 when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }

        $this->container['address2'] = $address2;

        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');
        }
        if ((mb_strlen($city) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $city when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }

        $this->container['city'] = $city;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        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 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_number
     *
     * @return string|null
     */
    public function getCustomerNumber()
    {
        return $this->container['customer_number'];
    }

    /**
     * Sets customer_number
     *
     * @param string|null $customer_number customer_number
     *
     * @return self
     */
    public function setCustomerNumber($customer_number)
    {
        if (is_null($customer_number)) {
            throw new \InvalidArgumentException('non-nullable customer_number cannot be null');
        }
        if ((mb_strlen($customer_number) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $customer_number when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }

        $this->container['customer_number'] = $customer_number;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets email
     *
     * @param string|null $email email
     *
     * @return self
     */
    public function setEmail($email)
    {
        if (is_null($email)) {
            throw new \InvalidArgumentException('non-nullable email cannot be null');
        }
        if ((mb_strlen($email) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $email when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }

        $this->container['email'] = $email;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets name
     *
     * @param string $name name
     *
     * @return self
     */
    public function setName($name)
    {
        if (is_null($name)) {
            throw new \InvalidArgumentException('non-nullable name cannot be null');
        }
        if ((mb_strlen($name) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $name when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }
        if ((mb_strlen($name) < 1)) {
            throw new \InvalidArgumentException('invalid length for $name when calling FortnoxKfCustomerListItem., must be bigger than or equal to 1.');
        }

        $this->container['name'] = $name;

        return $this;
    }

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

    /**
     * Sets organisation_number
     *
     * @param string|null $organisation_number organisation_number
     *
     * @return self
     */
    public function setOrganisationNumber($organisation_number)
    {
        if (is_null($organisation_number)) {
            throw new \InvalidArgumentException('non-nullable organisation_number cannot be null');
        }
        if ((mb_strlen($organisation_number) > 30)) {
            throw new \InvalidArgumentException('invalid length for $organisation_number when calling FortnoxKfCustomerListItem., must be smaller than or equal to 30.');
        }

        $this->container['organisation_number'] = $organisation_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 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');
        }
        if ((mb_strlen($phone) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $phone when calling FortnoxKfCustomerListItem., must be smaller than or equal to 1024.');
        }

        $this->container['phone'] = $phone;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets show_price_vat_included
     *
     * @return bool|null
     */
    public function getShowPriceVatIncluded()
    {
        return $this->container['show_price_vat_included'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        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 vat_number
     *
     * @return string|null
     */
    public function getVatNumber()
    {
        return $this->container['vat_number'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        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 zip_code
     *
     * @return string|null
     */
    public function getZipCode()
    {
        return $this->container['zip_code'];
    }

    /**
     * Sets zip_code
     *
     * @param string|null $zip_code zip_code
     *
     * @return self
     */
    public function setZipCode($zip_code)
    {
        if (is_null($zip_code)) {
            throw new \InvalidArgumentException('non-nullable zip_code cannot be null');
        }
        if ((mb_strlen($zip_code) > 10)) {
            throw new \InvalidArgumentException('invalid length for $zip_code when calling FortnoxKfCustomerListItem., must be smaller than or equal to 10.');
        }

        $this->container['zip_code'] = $zip_code;

        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));
    }
}


