"""visaacceptancemergedspec.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501
from visaacceptancemergedspec.api_helper import (
    APIHelper,
)


class BankTransferOptions(object):
    """Implementation of the 'BankTransferOptions' model.

    Attributes:
        decline_avs_flags (str): 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 Visa Acceptance
            Latin American Processing  **Note** Visa Acceptance Latin American
            Processing is the name of a specific processing connection that Visa
            Acceptance supports. In the Visa Acceptance API documentation, Visa
            Acceptance 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 Visa Acceptance Latin American
            Processing. It is not for any other Latin American processors that Visa
            Acceptance 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
            Visa Acceptance AVS codes in addition to the American Express AVS codes.
            **Note** For Visa Acceptance 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. Visa Acceptance 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`  #### Visa
            Acceptance Codes The numeric AVS codes are created by Visa Acceptance and
            are not standard Visa codes. These AVS codes can be returned for any card
            type.  _Visa Acceptance 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 Visa Acceptance account. To enable AVS, contact Visa
            Acceptance 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.|
        sec_code (str): 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
        terminal_city (str): 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.
        terminal_state (str): 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.
        effective_date (str): Effective date for the transaction. The effective date
            must be within 45 days of the current day. If you do not include this
            value, Visa Acceptance sets the effective date to the next business day.
            Format: `MMDDYYYY`  Supported only for the Visa Acceptance ACH Service.
        partial_payment_id (str): 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.
        customer_memo (str): Payment related information.  This information is
            included on the customer’s statement.
        payment_category_code (str): 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.
            #### Visa Acceptance ACH Service Not used.  #### RBS WorldPay Atlanta Not
            used.
        settlement_method (str): 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)
        fraud_screening_level (str): Level of fraud screening.  Possible values: -
            `1`: Validation — default if the field has not already been configured
            for your merchant ID - `2`: Verification
        customer_present (str): Indicates whether a customer is physically present
            and whether the customer is enrolling in Visa Acceptance 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.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "decline_avs_flags": "declineAvsFlags",
        "sec_code": "secCode",
        "terminal_city": "terminalCity",
        "terminal_state": "terminalState",
        "effective_date": "effectiveDate",
        "partial_payment_id": "partialPaymentId",
        "customer_memo": "customerMemo",
        "payment_category_code": "paymentCategoryCode",
        "settlement_method": "settlementMethod",
        "fraud_screening_level": "fraudScreeningLevel",
        "customer_present": "customerPresent",
    }

    _optionals = [
        "decline_avs_flags",
        "sec_code",
        "terminal_city",
        "terminal_state",
        "effective_date",
        "partial_payment_id",
        "customer_memo",
        "payment_category_code",
        "settlement_method",
        "fraud_screening_level",
        "customer_present",
    ]

    def __init__(
        self,
        decline_avs_flags=APIHelper.SKIP,
        sec_code=APIHelper.SKIP,
        terminal_city=APIHelper.SKIP,
        terminal_state=APIHelper.SKIP,
        effective_date=APIHelper.SKIP,
        partial_payment_id=APIHelper.SKIP,
        customer_memo=APIHelper.SKIP,
        payment_category_code=APIHelper.SKIP,
        settlement_method=APIHelper.SKIP,
        fraud_screening_level=APIHelper.SKIP,
        customer_present=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a BankTransferOptions instance."""
        # Initialize members of the class
        if decline_avs_flags is not APIHelper.SKIP:
            self.decline_avs_flags = decline_avs_flags
        if sec_code is not APIHelper.SKIP:
            self.sec_code = sec_code
        if terminal_city is not APIHelper.SKIP:
            self.terminal_city = terminal_city
        if terminal_state is not APIHelper.SKIP:
            self.terminal_state = terminal_state
        if effective_date is not APIHelper.SKIP:
            self.effective_date = effective_date
        if partial_payment_id is not APIHelper.SKIP:
            self.partial_payment_id = partial_payment_id
        if customer_memo is not APIHelper.SKIP:
            self.customer_memo = customer_memo
        if payment_category_code is not APIHelper.SKIP:
            self.payment_category_code = payment_category_code
        if settlement_method is not APIHelper.SKIP:
            self.settlement_method = settlement_method
        if fraud_screening_level is not APIHelper.SKIP:
            self.fraud_screening_level = fraud_screening_level
        if customer_present is not APIHelper.SKIP:
            self.customer_present = customer_present

        # Add additional model properties to the instance
        if additional_properties is None:
            additional_properties = {}
        self.additional_properties = additional_properties

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        decline_avs_flags =\
            dictionary.get("declineAvsFlags")\
            if dictionary.get("declineAvsFlags")\
                else APIHelper.SKIP
        sec_code =\
            dictionary.get("secCode")\
            if dictionary.get("secCode")\
                else APIHelper.SKIP
        terminal_city =\
            dictionary.get("terminalCity")\
            if dictionary.get("terminalCity")\
                else APIHelper.SKIP
        terminal_state =\
            dictionary.get("terminalState")\
            if dictionary.get("terminalState")\
                else APIHelper.SKIP
        effective_date =\
            dictionary.get("effectiveDate")\
            if dictionary.get("effectiveDate")\
                else APIHelper.SKIP
        partial_payment_id =\
            dictionary.get("partialPaymentId")\
            if dictionary.get("partialPaymentId")\
                else APIHelper.SKIP
        customer_memo =\
            dictionary.get("customerMemo")\
            if dictionary.get("customerMemo")\
                else APIHelper.SKIP
        payment_category_code =\
            dictionary.get("paymentCategoryCode")\
            if dictionary.get("paymentCategoryCode")\
                else APIHelper.SKIP
        settlement_method =\
            dictionary.get("settlementMethod")\
            if dictionary.get("settlementMethod")\
                else APIHelper.SKIP
        fraud_screening_level =\
            dictionary.get("fraudScreeningLevel")\
            if dictionary.get("fraudScreeningLevel")\
                else APIHelper.SKIP
        customer_present =\
            dictionary.get("customerPresent")\
            if dictionary.get("customerPresent")\
                else APIHelper.SKIP

        additional_properties = APIHelper.get_additional_properties(
            dictionary={k: v for k, v in dictionary.items()
                        if k not in cls._names.values()},
            unboxing_function=lambda value: value)

        # Return an object of this model
        return cls(decline_avs_flags,
                   sec_code,
                   terminal_city,
                   terminal_state,
                   effective_date,
                   partial_payment_id,
                   customer_memo,
                   payment_category_code,
                   settlement_method,
                   fraud_screening_level,
                   customer_present,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _decline_avs_flags=(
            self.decline_avs_flags
            if hasattr(self, "decline_avs_flags")
            else None
        )
        _sec_code=(
            self.sec_code
            if hasattr(self, "sec_code")
            else None
        )
        _terminal_city=(
            self.terminal_city
            if hasattr(self, "terminal_city")
            else None
        )
        _terminal_state=(
            self.terminal_state
            if hasattr(self, "terminal_state")
            else None
        )
        _effective_date=(
            self.effective_date
            if hasattr(self, "effective_date")
            else None
        )
        _partial_payment_id=(
            self.partial_payment_id
            if hasattr(self, "partial_payment_id")
            else None
        )
        _customer_memo=(
            self.customer_memo
            if hasattr(self, "customer_memo")
            else None
        )
        _payment_category_code=(
            self.payment_category_code
            if hasattr(self, "payment_category_code")
            else None
        )
        _settlement_method=(
            self.settlement_method
            if hasattr(self, "settlement_method")
            else None
        )
        _fraud_screening_level=(
            self.fraud_screening_level
            if hasattr(self, "fraud_screening_level")
            else None
        )
        _customer_present=(
            self.customer_present
            if hasattr(self, "customer_present")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"decline_avs_flags={_decline_avs_flags!r}, "
            f"sec_code={_sec_code!r}, "
            f"terminal_city={_terminal_city!r}, "
            f"terminal_state={_terminal_state!r}, "
            f"effective_date={_effective_date!r}, "
            f"partial_payment_id={_partial_payment_id!r}, "
            f"customer_memo={_customer_memo!r}, "
            f"payment_category_code={_payment_category_code!r}, "
            f"settlement_method={_settlement_method!r}, "
            f"fraud_screening_level={_fraud_screening_level!r}, "
            f"customer_present={_customer_present!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _decline_avs_flags=(
            self.decline_avs_flags
            if hasattr(self, "decline_avs_flags")
            else None
        )
        _sec_code=(
            self.sec_code
            if hasattr(self, "sec_code")
            else None
        )
        _terminal_city=(
            self.terminal_city
            if hasattr(self, "terminal_city")
            else None
        )
        _terminal_state=(
            self.terminal_state
            if hasattr(self, "terminal_state")
            else None
        )
        _effective_date=(
            self.effective_date
            if hasattr(self, "effective_date")
            else None
        )
        _partial_payment_id=(
            self.partial_payment_id
            if hasattr(self, "partial_payment_id")
            else None
        )
        _customer_memo=(
            self.customer_memo
            if hasattr(self, "customer_memo")
            else None
        )
        _payment_category_code=(
            self.payment_category_code
            if hasattr(self, "payment_category_code")
            else None
        )
        _settlement_method=(
            self.settlement_method
            if hasattr(self, "settlement_method")
            else None
        )
        _fraud_screening_level=(
            self.fraud_screening_level
            if hasattr(self, "fraud_screening_level")
            else None
        )
        _customer_present=(
            self.customer_present
            if hasattr(self, "customer_present")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"decline_avs_flags={_decline_avs_flags!s}, "
            f"sec_code={_sec_code!s}, "
            f"terminal_city={_terminal_city!s}, "
            f"terminal_state={_terminal_state!s}, "
            f"effective_date={_effective_date!s}, "
            f"partial_payment_id={_partial_payment_id!s}, "
            f"customer_memo={_customer_memo!s}, "
            f"payment_category_code={_payment_category_code!s}, "
            f"settlement_method={_settlement_method!s}, "
            f"fraud_screening_level={_fraud_screening_level!s}, "
            f"customer_present={_customer_present!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
