# -*- coding: utf-8 -*-

"""
    pagarmecoreapi

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


class GetThreeDSecureResponse(object):

    """Implementation of the 'GetThreeDSecureResponse' model.

    3D-S payment authentication response

    Attributes:
        mpi (string): MPI Vendor
        eci (string): Electronic Commerce Indicator (ECI) (Opcional)
        cavv (string): Online payment cryptogram, definido pelo 3-D Secure.
        transaction_id (string): Identificador da transação (XID)
        success_url (string): Url de redirecionamento de sucessso

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "mpi":'mpi',
        "eci":'eci',
        "cavv":'cavv',
        "transaction_id":'transaction_Id',
        "success_url":'success_url'
    }

    def __init__(self,
                 mpi=None,
                 eci=None,
                 cavv=None,
                 transaction_id=None,
                 success_url=None):
        """Constructor for the GetThreeDSecureResponse class"""

        # Initialize members of the class
        self.mpi = mpi
        self.eci = eci
        self.cavv = cavv
        self.transaction_id = transaction_id
        self.success_url = success_url


    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates 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 dictionary is None:
            return None

        # Extract variables from the dictionary
        mpi = dictionary.get('mpi')
        eci = dictionary.get('eci')
        cavv = dictionary.get('cavv')
        transaction_id = dictionary.get('transaction_Id')
        success_url = dictionary.get('success_url')

        # Return an object of this model
        return cls(mpi,
                   eci,
                   cavv,
                   transaction_id,
                   success_url)


