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

"""
    mundiapi.models.create_payment_authentitication_request

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

class CreatePaymentAuthentiticationRequest(object):

    """Implementation of the 'CreatePaymentAuthentiticationRequest' model.

    The payment authentication request

    Attributes:
        mtype (string): The Authentication type
        threed_secure (Create3DSAuthentiticationRequest): The 3D-S
            authentication object

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "mtype":'type',
        "threed_secure":'threed_secure'
    }

    def __init__(self,
                 mtype=None,
                 threed_secure=None):
        """Constructor for the CreatePaymentAuthentiticationRequest class"""

        # Initialize members of the class
        self.mtype = mtype
        self.threed_secure = threed_secure


    @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
        mtype = dictionary.get('type')
        threed_secure = mundiapi.models.create_3_ds_authentitication_request.Create3DSAuthentiticationRequest.from_dictionary(dictionary.get('threed_secure')) if dictionary.get('threed_secure') else None

        # Return an object of this model
        return cls(mtype,
                   threed_secure)


