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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'declineAvsFlags' => 'string',
        'secCode' => 'string',
        'terminalCity' => 'string',
        'terminalState' => 'string',
        'effectiveDate' => 'string',
        'partialPaymentId' => 'string',
        'customerMemo' => 'string',
        'paymentCategoryCode' => 'string',
        'settlementMethod' => 'string',
        'fraudScreeningLevel' => 'string',
        'customerPresent' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'declineAvsFlags' => null,
        'secCode' => null,
        'terminalCity' => null,
        'terminalState' => null,
        'effectiveDate' => null,
        'partialPaymentId' => null,
        'customerMemo' => null,
        'paymentCategoryCode' => null,
        'settlementMethod' => null,
        'fraudScreeningLevel' => null,
        'customerPresent' => 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 = [
        'declineAvsFlags' => 'declineAvsFlags',
        'secCode' => 'secCode',
        'terminalCity' => 'terminalCity',
        'terminalState' => 'terminalState',
        'effectiveDate' => 'effectiveDate',
        'partialPaymentId' => 'partialPaymentId',
        'customerMemo' => 'customerMemo',
        'paymentCategoryCode' => 'paymentCategoryCode',
        'settlementMethod' => 'settlementMethod',
        'fraudScreeningLevel' => 'fraudScreeningLevel',
        'customerPresent' => 'customerPresent'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'declineAvsFlags' => 'setDeclineAvsFlags',
        'secCode' => 'setSecCode',
        'terminalCity' => 'setTerminalCity',
        'terminalState' => 'setTerminalState',
        'effectiveDate' => 'setEffectiveDate',
        'partialPaymentId' => 'setPartialPaymentId',
        'customerMemo' => 'setCustomerMemo',
        'paymentCategoryCode' => 'setPaymentCategoryCode',
        'settlementMethod' => 'setSettlementMethod',
        'fraudScreeningLevel' => 'setFraudScreeningLevel',
        'customerPresent' => 'setCustomerPresent'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'declineAvsFlags' => 'getDeclineAvsFlags',
        'secCode' => 'getSecCode',
        'terminalCity' => 'getTerminalCity',
        'terminalState' => 'getTerminalState',
        'effectiveDate' => 'getEffectiveDate',
        'partialPaymentId' => 'getPartialPaymentId',
        'customerMemo' => 'getCustomerMemo',
        'paymentCategoryCode' => 'getPaymentCategoryCode',
        'settlementMethod' => 'getSettlementMethod',
        'fraudScreeningLevel' => 'getFraudScreeningLevel',
        'customerPresent' => 'getCustomerPresent'
    ];

    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['declineAvsFlags'] = isset($data['declineAvsFlags']) ? $data['declineAvsFlags'] : null;
        $this->container['secCode'] = isset($data['secCode']) ? $data['secCode'] : null;
        $this->container['terminalCity'] = isset($data['terminalCity']) ? $data['terminalCity'] : null;
        $this->container['terminalState'] = isset($data['terminalState']) ? $data['terminalState'] : null;
        $this->container['effectiveDate'] = isset($data['effectiveDate']) ? $data['effectiveDate'] : null;
        $this->container['partialPaymentId'] = isset($data['partialPaymentId']) ? $data['partialPaymentId'] : null;
        $this->container['customerMemo'] = isset($data['customerMemo']) ? $data['customerMemo'] : null;
        $this->container['paymentCategoryCode'] = isset($data['paymentCategoryCode']) ? $data['paymentCategoryCode'] : null;
        $this->container['settlementMethod'] = isset($data['settlementMethod']) ? $data['settlementMethod'] : null;
        $this->container['fraudScreeningLevel'] = isset($data['fraudScreeningLevel']) ? $data['fraudScreeningLevel'] : null;
        $this->container['customerPresent'] = isset($data['customerPresent']) ? $data['customerPresent'] : 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 declineAvsFlags
     * @return string
     */
    public function getDeclineAvsFlags()
    {
        return $this->container['declineAvsFlags'];
    }

    /**
     * Sets declineAvsFlags
     * @param string $declineAvsFlags Space-separated list of AVS flags that cause the request to be declined for AVS reasons.  **Important** To receive declines for the AVS code `N`, you must include the value `N` in the space-separated list.  ### AVS Codes for Cielo 3.0 and CyberSource Latin American Processing  **Note** CyberSource Latin American Processing is the name of a specific processing connection that CyberSource supports. In the CyberSource API documentation, CyberSource Latin American Processing does not refer to the general topic of processing in Latin America. The information in this section is for the specific processing connection called CyberSource Latin American Processing. It is not for any other Latin American processors that CyberSource supports.  |AVS Code|Description| |--- |--- | |D|Partial match: postal code and address match.| |E|Not supported: AVS is not supported for this card type. _or_ Invalid: the acquirer returned an unrecognized value for the AVS response.| |F|Partial match: postal code matches, but CPF and address do not match.*| |G|Not supported: AVS not supported or not verified.| |I|No match: AVS information is not available.| |K|Partial match: CPF matches, but postal code and address do not match.*| |L|Partial match: postal code and CPF match, but address does not match.*| |N|No match: postal code, CPF, and address do not match.*| |O|Partial match: CPF and address match, but postal code does not match.*| |R|Not supported: your implementation does not support AVS _or_ System unavailable.| |T|Partial match: address matches, but postal code and CPF do not match.*| |V|Match: postal code, CPF, and address match.*| |* CPF (Cadastro de Pessoas Fisicas) is required only for Redecard in Brazil.||  ### AVS Codes for All Other Processors  **Note** The list of AVS codes for all other processors follows these descriptions of the processor-specific information for these codes.  #### American Express Cards For American Express cards only, you can receive Visa and CyberSource AVS codes in addition to the American Express AVS codes.  **Note** For CyberSource through VisaNet, the American Express AVS codes are converted to Visa AVS codes before they are returned to you. As a result, you will not receive American Express AVS codes for the American Express card type.  _American Express Card codes_: `F`, `H`, `K`, `L`, `O`, `T`, `V`  #### Domestic and International Visa Cards The international and domestic alphabetic AVS codes are the Visa standard AVS codes. CyberSource maps the standard AVS return codes for other types of payment cards, including American Express cards, to the Visa standard AVS codes.  AVS is considered either domestic or international, depending on the location of the bank that issued the customer's payment card: - When the bank is in the U.S., the AVS is domestic. - When the bank is outside the U.S., the AVS is international.  You should be prepared to handle both domestic and international AVS result codes: - For international cards, you can receive domestic AVS codes in addition to the international AVS codes. - For domestic cards, you can receive international AVS codes in addition to the domestic AVS codes.  _International Visa Codes_: `B`, `C`, `D`, `G`, `I`, `M`, `P`  _Domestic Visa Codes_: `A`, `E`,`N`, `R`, `S`, `U`, `W`, `X`, `Y`, `Z`  #### CyberSource Codes The numeric AVS codes are created by CyberSource and are not standard Visa codes. These AVS codes can be returned for any card type.  _CyberSource Codes_: `1`, `2`, `3`, `4`  ### Table of AVS Codes for All Other Processors  |AVS Code|Description| |--- |--- | |A|Partial match: street address matches, but 5-digit and 9-digit postal codes do not match.| |B|Partial match: street address matches, but postal code is not verified. Returned only for Visa cards not issued in the U.S.| |C|No match: street address and postal code do not match. Returned only for Visa cards not issued in the U.S.| |D & M|Match: street address and postal code match. Returned only for Visa cards not issued in the U.S.| |E|Invalid: AVS data is invalid or AVS is not allowed for this card type.| |F|Partial match: card member's name does not match, but billing postal code matches.| |G|Not supported: issuing bank outside the U.S. does not support AVS.| |H|Partial match: card member's name does not match, but street address and postal code match. Returned only for the American Express card type.| |I|No match: address not verified. Returned only for Visa cards not issued in the U.S.| |K|Partial match: card member's name matches, but billing address and billing postal code do not match. Returned only for the American Express card type.| |L|Partial match: card member's name and billing postal code match, but billing address does not match. Returned only for the American Express card type.| |M|See the entry for D & M.| |N|No match: one of the following: street address and postal code do not match _or_ (American Express card type only) card member's name, street address, and postal code do not match.| |O|Partial match: card member's name and billing address match, but billing postal code does not match. Returned only for the American Express card type.| |P|Partial match: postal code matches, but street address not verified. Returned only for Visa cards not issued in the U.S.| |R|System unavailable.| |S|Not supported: issuing bank in the U.S. does not support AVS.| |T|Partial match: card member's name does not match, but street address matches. Returned only for the American Express card type.| |U|System unavailable: address information unavailable for one of these reasons: The U.S. bank does not support AVS outside the U.S. _or_ The AVS in a U.S. bank is not functioning properly.| |V|Match: card member's name, billing address, and billing postal code match. Returned only for the American Express card type.| |W|Partial match: street address does not match, but 9-digit postal code matches.| |X|Match: street address and 9-digit postal code match.| |Y|Match: street address and 5-digit postal code match.| |Z|Partial match: street address does not match, but 5-digit postal code matches.| |1|Not supported: one of the following: AVS is not supported for this processor or card type _or_ AVS is disabled for your CyberSource account. To enable AVS, contact CyberSource Customer Support.| |2|Unrecognized: the processor returned an unrecognized value for the AVS response.| |3|Match: address is confirmed. Returned only for PayPal Express Checkout.| |4|No match: address is not confirmed. Returned only for PayPal Express Checkout.| |5|No match: no AVS code was returned by the processor.|
     * @return $this
     */
    public function setDeclineAvsFlags($declineAvsFlags)
    {
        $this->container['declineAvsFlags'] = $declineAvsFlags;

        return $this;
    }

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

    /**
     * Sets secCode
     * @param string $secCode Specifies the authorization method for the transaction.  #### TeleCheck Accepts only the following values: - `ARC`: account receivable conversion - `CCD`: corporate cash disbursement - `POP`: point of purchase conversion - `PPD`: prearranged payment and deposit entry - `TEL`: telephone-initiated entry - `WEB`: internet-initiated entry
     * @return $this
     */
    public function setSecCode($secCode)
    {
        $this->container['secCode'] = $secCode;

        return $this;
    }

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

    /**
     * Sets terminalCity
     * @param string $terminalCity City in which the terminal is located. If more than four alphanumeric characters are submitted, the transaction will be declined.  You cannot include any special characters.
     * @return $this
     */
    public function setTerminalCity($terminalCity)
    {
        $this->container['terminalCity'] = $terminalCity;

        return $this;
    }

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

    /**
     * Sets terminalState
     * @param string $terminalState State in which the terminal is located. If more than two alphanumeric characters are submitted, the transaction will be declined.  You cannot include any special characters.
     * @return $this
     */
    public function setTerminalState($terminalState)
    {
        $this->container['terminalState'] = $terminalState;

        return $this;
    }

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

    /**
     * Sets effectiveDate
     * @param string $effectiveDate Effective date for the transaction. The effective date must be within 45 days of the current day. If you do not include this value, CyberSource sets the effective date to the next business day.  Format: `MMDDYYYY`  Supported only for the CyberSource ACH Service.
     * @return $this
     */
    public function setEffectiveDate($effectiveDate)
    {
        $this->container['effectiveDate'] = $effectiveDate;

        return $this;
    }

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

    /**
     * Sets partialPaymentId
     * @param string $partialPaymentId Identifier for a partial payment or partial credit.  The value for each debit request or credit request must be unique within the scope of the order.
     * @return $this
     */
    public function setPartialPaymentId($partialPaymentId)
    {
        $this->container['partialPaymentId'] = $partialPaymentId;

        return $this;
    }

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

    /**
     * Sets customerMemo
     * @param string $customerMemo Payment related information.  This information is included on the customer's statement.
     * @return $this
     */
    public function setCustomerMemo($customerMemo)
    {
        $this->container['customerMemo'] = $customerMemo;

        return $this;
    }

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

    /**
     * Sets paymentCategoryCode
     * @param string $paymentCategoryCode Flag that indicates whether to process the payment.  Use with deferred payments.  Possible values: - `0`: Standard debit with immediate payment (default). - `1`: For deferred payments, indicates that this is a deferred payment and that you will send a debit request with `paymentCategoryCode = 2` in the future. - `2`: For deferred payments, indicates notification to initiate payment.  #### Chase Paymentech Solutions and TeleCheck Use for deferred and partial payments.  #### CyberSource ACH Service Not used.  #### RBS WorldPay Atlanta Not used.
     * @return $this
     */
    public function setPaymentCategoryCode($paymentCategoryCode)
    {
        $this->container['paymentCategoryCode'] = $paymentCategoryCode;

        return $this;
    }

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

    /**
     * Sets settlementMethod
     * @param string $settlementMethod Method used for settlement.  Possible values: - `A`: Automated Clearing House (default for credits and for transactions using Canadian dollars) - `F`: Facsimile draft (U.S. dollars only) - `B`: Best possible (U.S. dollars only) (default if the field has not already been configured for your merchant ID)
     * @return $this
     */
    public function setSettlementMethod($settlementMethod)
    {
        $this->container['settlementMethod'] = $settlementMethod;

        return $this;
    }

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

    /**
     * Sets fraudScreeningLevel
     * @param string $fraudScreeningLevel Level of fraud screening.  Possible values: - `1`: Validation — default if the field has not already been configured for your merchant ID - `2`: Verification
     * @return $this
     */
    public function setFraudScreeningLevel($fraudScreeningLevel)
    {
        $this->container['fraudScreeningLevel'] = $fraudScreeningLevel;

        return $this;
    }

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

    /**
     * Sets customerPresent
     * @param string $customerPresent Indicates whether a customer is physically present and whether the customer is enrolling in CyberSource Recurring Billing.  Possible values: - `1`: Customer is present and not enrolling. - `2`: Customer is not present and not enrolling. - `3`: Customer is present and enrolling. - `4`: Customer is not present and enrolling.
     * @return $this
     */
    public function setCustomerPresent($customerPresent)
    {
        $this->container['customerPresent'] = $customerPresent;

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


