<?php
/**
 * TssV2TransactionsGet200ResponsePaymentInformationBank
 *
 * PHP version 5
 *
 * @category Class
 * @package  CyberSource
 * @author   Swaagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * CyberSource Merged Spec
 *
 * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
 *
 * OpenAPI spec version: 0.0.1
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */
/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace CyberSource\Model;

use \ArrayAccess;

/**
 * TssV2TransactionsGet200ResponsePaymentInformationBank Class Doc Comment
 *
 * @category    Class
 * @package     CyberSource
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class TssV2TransactionsGet200ResponsePaymentInformationBank implements ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'routingNumber' => 'string',
        'branchCode' => 'string',
        'swiftCode' => 'string',
        'bankCode' => 'string',
        'iban' => 'string',
        'account' => '\CyberSource\Model\TssV2TransactionsGet200ResponsePaymentInformationBankAccount',
        'mandate' => '\CyberSource\Model\TssV2TransactionsGet200ResponsePaymentInformationBankMandate'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'routingNumber' => null,
        'branchCode' => null,
        'swiftCode' => null,
        'bankCode' => null,
        'iban' => null,
        'account' => null,
        'mandate' => null
    ];

    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name, and the value is the original name
     * @var string[]
     */
    protected static $attributeMap = [
        'routingNumber' => 'routingNumber',
        'branchCode' => 'branchCode',
        'swiftCode' => 'swiftCode',
        'bankCode' => 'bankCode',
        'iban' => 'iban',
        'account' => 'account',
        'mandate' => 'mandate'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'routingNumber' => 'setRoutingNumber',
        'branchCode' => 'setBranchCode',
        'swiftCode' => 'setSwiftCode',
        'bankCode' => 'setBankCode',
        'iban' => 'setIban',
        'account' => 'setAccount',
        'mandate' => 'setMandate'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'routingNumber' => 'getRoutingNumber',
        'branchCode' => 'getBranchCode',
        'swiftCode' => 'getSwiftCode',
        'bankCode' => 'getBankCode',
        'iban' => 'getIban',
        'account' => 'getAccount',
        'mandate' => 'getMandate'
    ];

    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    public static function setters()
    {
        return self::$setters;
    }

    public static function getters()
    {
        return self::$getters;
    }

    

    

    /**
     * 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['routingNumber'] = isset($data['routingNumber']) ? $data['routingNumber'] : null;
        $this->container['branchCode'] = isset($data['branchCode']) ? $data['branchCode'] : null;
        $this->container['swiftCode'] = isset($data['swiftCode']) ? $data['swiftCode'] : null;
        $this->container['bankCode'] = isset($data['bankCode']) ? $data['bankCode'] : null;
        $this->container['iban'] = isset($data['iban']) ? $data['iban'] : null;
        $this->container['account'] = isset($data['account']) ? $data['account'] : null;
        $this->container['mandate'] = isset($data['mandate']) ? $data['mandate'] : null;
    }

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

        return $invalid_properties;
    }

    /**
     * validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {

        return true;
    }


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

    /**
     * Sets routingNumber
     * @param string $routingNumber Bank routing number. This is also called the transit number.
     * @return $this
     */
    public function setRoutingNumber($routingNumber)
    {
        $this->container['routingNumber'] = $routingNumber;

        return $this;
    }

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

    /**
     * Sets branchCode
     * @param string $branchCode Code used to identify the branch of the customer's bank. Required for some countries if you do not or are not allowed to provide the IBAN. Use this field only when scoring a direct debit transaction.
     * @return $this
     */
    public function setBranchCode($branchCode)
    {
        $this->container['branchCode'] = $branchCode;

        return $this;
    }

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

    /**
     * Sets swiftCode
     * @param string $swiftCode Bank's SWIFT code. You can use this field only when scoring a direct debit transaction. Required only for crossborder transactions.
     * @return $this
     */
    public function setSwiftCode($swiftCode)
    {
        $this->container['swiftCode'] = $swiftCode;

        return $this;
    }

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

    /**
     * Sets bankCode
     * @param string $bankCode Country-specific code used to identify the customer's bank. Required for some countries if you do not or are not allowed to provide the IBAN instead. You can use this field only when scoring a direct debit transaction.
     * @return $this
     */
    public function setBankCode($bankCode)
    {
        $this->container['bankCode'] = $bankCode;

        return $this;
    }

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

    /**
     * Sets iban
     * @param string $iban International Bank Account Number (IBAN) for the bank account. For some countries you can provide this number instead of the traditional bank account information. You can use this field only when scoring a direct debit transaction.
     * @return $this
     */
    public function setIban($iban)
    {
        $this->container['iban'] = $iban;

        return $this;
    }

    /**
     * Gets account
     * @return \CyberSource\Model\TssV2TransactionsGet200ResponsePaymentInformationBankAccount
     */
    public function getAccount()
    {
        return $this->container['account'];
    }

    /**
     * Sets account
     * @param \CyberSource\Model\TssV2TransactionsGet200ResponsePaymentInformationBankAccount $account
     * @return $this
     */
    public function setAccount($account)
    {
        $this->container['account'] = $account;

        return $this;
    }

    /**
     * Gets mandate
     * @return \CyberSource\Model\TssV2TransactionsGet200ResponsePaymentInformationBankMandate
     */
    public function getMandate()
    {
        return $this->container['mandate'];
    }

    /**
     * Sets mandate
     * @param \CyberSource\Model\TssV2TransactionsGet200ResponsePaymentInformationBankMandate $mandate
     * @return $this
     */
    public function setMandate($mandate)
    {
        $this->container['mandate'] = $mandate;

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

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

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

    /**
     * Unsets offset.
     * @param  integer $offset Offset
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(\CyberSource\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
        }

        return json_encode(\CyberSource\ObjectSerializer::sanitizeForSerialization($this));
    }
}


