<?php
/**
 * PutBusinessSettingsBusinessSettingsDefaultLedgerAccounts
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  SageOne
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Sage Business Cloud Accounting - Accounts
 *
 * Documentation of the Sage Business Cloud Accounting API.
 *
 * The version of the OpenAPI document: 3.1
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.0.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 SageOne\Model;

use \ArrayAccess;
use \SageOne\ObjectSerializer;

/**
 * PutBusinessSettingsBusinessSettingsDefaultLedgerAccounts Class Doc Comment
 *
 * @category Class
 * @package  SageOne
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class PutBusinessSettingsBusinessSettingsDefaultLedgerAccounts implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'bank_charges_ledger_account_id' => 'string',
        'bank_interest_received_ledger_account_id' => 'string',
        'bank_interest_charges_paid_ledger_account_id' => 'string',
        'exchange_rate_gains_ledger_account_id' => 'string',
        'exchange_rate_losses_ledger_account_id' => 'string',
        'sales_ledger_account_id' => 'string',
        'sales_discount_ledger_account_id' => 'string',
        'purchase_ledger_account_id' => 'string',
        'purchase_discount_ledger_account_id' => 'string',
        'product_sales_ledger_account_id' => 'string',
        'product_purchase_ledger_account_id' => 'string',
        'service_sales_ledger_account_id' => 'string',
        'service_purchase_ledger_account_id' => 'string',
        'stock_purchase_ledger_account_id' => 'string',
        'other_receipt_ledger_account_id' => 'string',
        'other_payment_ledger_account_id' => 'string',
        'customer_receipt_discount_ledger_account_id' => 'string',
        'vendor_payment_discount_ledger_account_id' => 'string',
        'carriage_ledger_account_id' => '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 = [
        'bank_charges_ledger_account_id' => null,
        'bank_interest_received_ledger_account_id' => null,
        'bank_interest_charges_paid_ledger_account_id' => null,
        'exchange_rate_gains_ledger_account_id' => null,
        'exchange_rate_losses_ledger_account_id' => null,
        'sales_ledger_account_id' => null,
        'sales_discount_ledger_account_id' => null,
        'purchase_ledger_account_id' => null,
        'purchase_discount_ledger_account_id' => null,
        'product_sales_ledger_account_id' => null,
        'product_purchase_ledger_account_id' => null,
        'service_sales_ledger_account_id' => null,
        'service_purchase_ledger_account_id' => null,
        'stock_purchase_ledger_account_id' => null,
        'other_receipt_ledger_account_id' => null,
        'other_payment_ledger_account_id' => null,
        'customer_receipt_discount_ledger_account_id' => null,
        'vendor_payment_discount_ledger_account_id' => null,
        'carriage_ledger_account_id' => null
    ];

    /**
     * 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 attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'bank_charges_ledger_account_id' => 'bank_charges_ledger_account_id',
        'bank_interest_received_ledger_account_id' => 'bank_interest_received_ledger_account_id',
        'bank_interest_charges_paid_ledger_account_id' => 'bank_interest_charges_paid_ledger_account_id',
        'exchange_rate_gains_ledger_account_id' => 'exchange_rate_gains_ledger_account_id',
        'exchange_rate_losses_ledger_account_id' => 'exchange_rate_losses_ledger_account_id',
        'sales_ledger_account_id' => 'sales_ledger_account_id',
        'sales_discount_ledger_account_id' => 'sales_discount_ledger_account_id',
        'purchase_ledger_account_id' => 'purchase_ledger_account_id',
        'purchase_discount_ledger_account_id' => 'purchase_discount_ledger_account_id',
        'product_sales_ledger_account_id' => 'product_sales_ledger_account_id',
        'product_purchase_ledger_account_id' => 'product_purchase_ledger_account_id',
        'service_sales_ledger_account_id' => 'service_sales_ledger_account_id',
        'service_purchase_ledger_account_id' => 'service_purchase_ledger_account_id',
        'stock_purchase_ledger_account_id' => 'stock_purchase_ledger_account_id',
        'other_receipt_ledger_account_id' => 'other_receipt_ledger_account_id',
        'other_payment_ledger_account_id' => 'other_payment_ledger_account_id',
        'customer_receipt_discount_ledger_account_id' => 'customer_receipt_discount_ledger_account_id',
        'vendor_payment_discount_ledger_account_id' => 'vendor_payment_discount_ledger_account_id',
        'carriage_ledger_account_id' => 'carriage_ledger_account_id'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'bank_charges_ledger_account_id' => 'setBankChargesLedgerAccountId',
        'bank_interest_received_ledger_account_id' => 'setBankInterestReceivedLedgerAccountId',
        'bank_interest_charges_paid_ledger_account_id' => 'setBankInterestChargesPaidLedgerAccountId',
        'exchange_rate_gains_ledger_account_id' => 'setExchangeRateGainsLedgerAccountId',
        'exchange_rate_losses_ledger_account_id' => 'setExchangeRateLossesLedgerAccountId',
        'sales_ledger_account_id' => 'setSalesLedgerAccountId',
        'sales_discount_ledger_account_id' => 'setSalesDiscountLedgerAccountId',
        'purchase_ledger_account_id' => 'setPurchaseLedgerAccountId',
        'purchase_discount_ledger_account_id' => 'setPurchaseDiscountLedgerAccountId',
        'product_sales_ledger_account_id' => 'setProductSalesLedgerAccountId',
        'product_purchase_ledger_account_id' => 'setProductPurchaseLedgerAccountId',
        'service_sales_ledger_account_id' => 'setServiceSalesLedgerAccountId',
        'service_purchase_ledger_account_id' => 'setServicePurchaseLedgerAccountId',
        'stock_purchase_ledger_account_id' => 'setStockPurchaseLedgerAccountId',
        'other_receipt_ledger_account_id' => 'setOtherReceiptLedgerAccountId',
        'other_payment_ledger_account_id' => 'setOtherPaymentLedgerAccountId',
        'customer_receipt_discount_ledger_account_id' => 'setCustomerReceiptDiscountLedgerAccountId',
        'vendor_payment_discount_ledger_account_id' => 'setVendorPaymentDiscountLedgerAccountId',
        'carriage_ledger_account_id' => 'setCarriageLedgerAccountId'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'bank_charges_ledger_account_id' => 'getBankChargesLedgerAccountId',
        'bank_interest_received_ledger_account_id' => 'getBankInterestReceivedLedgerAccountId',
        'bank_interest_charges_paid_ledger_account_id' => 'getBankInterestChargesPaidLedgerAccountId',
        'exchange_rate_gains_ledger_account_id' => 'getExchangeRateGainsLedgerAccountId',
        'exchange_rate_losses_ledger_account_id' => 'getExchangeRateLossesLedgerAccountId',
        'sales_ledger_account_id' => 'getSalesLedgerAccountId',
        'sales_discount_ledger_account_id' => 'getSalesDiscountLedgerAccountId',
        'purchase_ledger_account_id' => 'getPurchaseLedgerAccountId',
        'purchase_discount_ledger_account_id' => 'getPurchaseDiscountLedgerAccountId',
        'product_sales_ledger_account_id' => 'getProductSalesLedgerAccountId',
        'product_purchase_ledger_account_id' => 'getProductPurchaseLedgerAccountId',
        'service_sales_ledger_account_id' => 'getServiceSalesLedgerAccountId',
        'service_purchase_ledger_account_id' => 'getServicePurchaseLedgerAccountId',
        'stock_purchase_ledger_account_id' => 'getStockPurchaseLedgerAccountId',
        'other_receipt_ledger_account_id' => 'getOtherReceiptLedgerAccountId',
        'other_payment_ledger_account_id' => 'getOtherPaymentLedgerAccountId',
        'customer_receipt_discount_ledger_account_id' => 'getCustomerReceiptDiscountLedgerAccountId',
        'vendor_payment_discount_ledger_account_id' => 'getVendorPaymentDiscountLedgerAccountId',
        'carriage_ledger_account_id' => 'getCarriageLedgerAccountId'
    ];

    /**
     * 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[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['bank_charges_ledger_account_id'] = $data['bank_charges_ledger_account_id'] ?? null;
        $this->container['bank_interest_received_ledger_account_id'] = $data['bank_interest_received_ledger_account_id'] ?? null;
        $this->container['bank_interest_charges_paid_ledger_account_id'] = $data['bank_interest_charges_paid_ledger_account_id'] ?? null;
        $this->container['exchange_rate_gains_ledger_account_id'] = $data['exchange_rate_gains_ledger_account_id'] ?? null;
        $this->container['exchange_rate_losses_ledger_account_id'] = $data['exchange_rate_losses_ledger_account_id'] ?? null;
        $this->container['sales_ledger_account_id'] = $data['sales_ledger_account_id'] ?? null;
        $this->container['sales_discount_ledger_account_id'] = $data['sales_discount_ledger_account_id'] ?? null;
        $this->container['purchase_ledger_account_id'] = $data['purchase_ledger_account_id'] ?? null;
        $this->container['purchase_discount_ledger_account_id'] = $data['purchase_discount_ledger_account_id'] ?? null;
        $this->container['product_sales_ledger_account_id'] = $data['product_sales_ledger_account_id'] ?? null;
        $this->container['product_purchase_ledger_account_id'] = $data['product_purchase_ledger_account_id'] ?? null;
        $this->container['service_sales_ledger_account_id'] = $data['service_sales_ledger_account_id'] ?? null;
        $this->container['service_purchase_ledger_account_id'] = $data['service_purchase_ledger_account_id'] ?? null;
        $this->container['stock_purchase_ledger_account_id'] = $data['stock_purchase_ledger_account_id'] ?? null;
        $this->container['other_receipt_ledger_account_id'] = $data['other_receipt_ledger_account_id'] ?? null;
        $this->container['other_payment_ledger_account_id'] = $data['other_payment_ledger_account_id'] ?? null;
        $this->container['customer_receipt_discount_ledger_account_id'] = $data['customer_receipt_discount_ledger_account_id'] ?? null;
        $this->container['vendor_payment_discount_ledger_account_id'] = $data['vendor_payment_discount_ledger_account_id'] ?? null;
        $this->container['carriage_ledger_account_id'] = $data['carriage_ledger_account_id'] ?? null;
    }

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

    /**
     * Sets bank_charges_ledger_account_id
     *
     * @param string|null $bank_charges_ledger_account_id The ID of the Bank Charges Ledger Account.
     *
     * @return self
     */
    public function setBankChargesLedgerAccountId($bank_charges_ledger_account_id)
    {
        $this->container['bank_charges_ledger_account_id'] = $bank_charges_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets bank_interest_received_ledger_account_id
     *
     * @param string|null $bank_interest_received_ledger_account_id The ID of the Bank Interest Received Ledger Account.
     *
     * @return self
     */
    public function setBankInterestReceivedLedgerAccountId($bank_interest_received_ledger_account_id)
    {
        $this->container['bank_interest_received_ledger_account_id'] = $bank_interest_received_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets bank_interest_charges_paid_ledger_account_id
     *
     * @param string|null $bank_interest_charges_paid_ledger_account_id The ID of the Bank Interest Charges Paid Ledger Account.
     *
     * @return self
     */
    public function setBankInterestChargesPaidLedgerAccountId($bank_interest_charges_paid_ledger_account_id)
    {
        $this->container['bank_interest_charges_paid_ledger_account_id'] = $bank_interest_charges_paid_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets exchange_rate_gains_ledger_account_id
     *
     * @param string|null $exchange_rate_gains_ledger_account_id The ID of the Exchange Rate Gains Ledger Account.
     *
     * @return self
     */
    public function setExchangeRateGainsLedgerAccountId($exchange_rate_gains_ledger_account_id)
    {
        $this->container['exchange_rate_gains_ledger_account_id'] = $exchange_rate_gains_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets exchange_rate_losses_ledger_account_id
     *
     * @param string|null $exchange_rate_losses_ledger_account_id The ID of the Exchange Rate Losses Ledger Account.
     *
     * @return self
     */
    public function setExchangeRateLossesLedgerAccountId($exchange_rate_losses_ledger_account_id)
    {
        $this->container['exchange_rate_losses_ledger_account_id'] = $exchange_rate_losses_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets sales_ledger_account_id
     *
     * @param string|null $sales_ledger_account_id The ID of the Sales Ledger Account.
     *
     * @return self
     */
    public function setSalesLedgerAccountId($sales_ledger_account_id)
    {
        $this->container['sales_ledger_account_id'] = $sales_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets sales_discount_ledger_account_id
     *
     * @param string|null $sales_discount_ledger_account_id The ID of the Sales Discount Ledger Account.
     *
     * @return self
     */
    public function setSalesDiscountLedgerAccountId($sales_discount_ledger_account_id)
    {
        $this->container['sales_discount_ledger_account_id'] = $sales_discount_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets purchase_ledger_account_id
     *
     * @param string|null $purchase_ledger_account_id The ID of the Purchase Ledger Account.
     *
     * @return self
     */
    public function setPurchaseLedgerAccountId($purchase_ledger_account_id)
    {
        $this->container['purchase_ledger_account_id'] = $purchase_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets purchase_discount_ledger_account_id
     *
     * @param string|null $purchase_discount_ledger_account_id The ID of the Purchase Discount Ledger Account.
     *
     * @return self
     */
    public function setPurchaseDiscountLedgerAccountId($purchase_discount_ledger_account_id)
    {
        $this->container['purchase_discount_ledger_account_id'] = $purchase_discount_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets product_sales_ledger_account_id
     *
     * @param string|null $product_sales_ledger_account_id The ID of the Product Sales Ledger Account.
     *
     * @return self
     */
    public function setProductSalesLedgerAccountId($product_sales_ledger_account_id)
    {
        $this->container['product_sales_ledger_account_id'] = $product_sales_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets product_purchase_ledger_account_id
     *
     * @param string|null $product_purchase_ledger_account_id The ID of the Product Purchase Ledger Account.
     *
     * @return self
     */
    public function setProductPurchaseLedgerAccountId($product_purchase_ledger_account_id)
    {
        $this->container['product_purchase_ledger_account_id'] = $product_purchase_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets service_sales_ledger_account_id
     *
     * @param string|null $service_sales_ledger_account_id The ID of the Service Sales Ledger Account.
     *
     * @return self
     */
    public function setServiceSalesLedgerAccountId($service_sales_ledger_account_id)
    {
        $this->container['service_sales_ledger_account_id'] = $service_sales_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets service_purchase_ledger_account_id
     *
     * @param string|null $service_purchase_ledger_account_id The ID of the Service Purchase Ledger Account.
     *
     * @return self
     */
    public function setServicePurchaseLedgerAccountId($service_purchase_ledger_account_id)
    {
        $this->container['service_purchase_ledger_account_id'] = $service_purchase_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets stock_purchase_ledger_account_id
     *
     * @param string|null $stock_purchase_ledger_account_id The ID of the Stock Purchase Ledger Account.
     *
     * @return self
     */
    public function setStockPurchaseLedgerAccountId($stock_purchase_ledger_account_id)
    {
        $this->container['stock_purchase_ledger_account_id'] = $stock_purchase_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets other_receipt_ledger_account_id
     *
     * @param string|null $other_receipt_ledger_account_id The ID of the Other Receipt Ledger Account.
     *
     * @return self
     */
    public function setOtherReceiptLedgerAccountId($other_receipt_ledger_account_id)
    {
        $this->container['other_receipt_ledger_account_id'] = $other_receipt_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets other_payment_ledger_account_id
     *
     * @param string|null $other_payment_ledger_account_id The ID of the Other Payment Ledger Account.
     *
     * @return self
     */
    public function setOtherPaymentLedgerAccountId($other_payment_ledger_account_id)
    {
        $this->container['other_payment_ledger_account_id'] = $other_payment_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets customer_receipt_discount_ledger_account_id
     *
     * @param string|null $customer_receipt_discount_ledger_account_id The ID of the Customer Receipt Discount Ledger Account.
     *
     * @return self
     */
    public function setCustomerReceiptDiscountLedgerAccountId($customer_receipt_discount_ledger_account_id)
    {
        $this->container['customer_receipt_discount_ledger_account_id'] = $customer_receipt_discount_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets vendor_payment_discount_ledger_account_id
     *
     * @param string|null $vendor_payment_discount_ledger_account_id The ID of the Vendor Payment Discount Ledger Account.
     *
     * @return self
     */
    public function setVendorPaymentDiscountLedgerAccountId($vendor_payment_discount_ledger_account_id)
    {
        $this->container['vendor_payment_discount_ledger_account_id'] = $vendor_payment_discount_ledger_account_id;

        return $this;
    }

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

    /**
     * Sets carriage_ledger_account_id
     *
     * @param string|null $carriage_ledger_account_id The ID of the Carriage Ledger Account.
     *
     * @return self
     */
    public function setCarriageLedgerAccountId($carriage_ledger_account_id)
    {
        $this->container['carriage_ledger_account_id'] = $carriage_ledger_account_id;

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

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($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 $offset Offset
     *
     * @return void
     */
    public function offsetUnset($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));
    }
}


