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

"""
pqapiv2

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


class PrepaidCardPinToken(object):

    """Implementation of the '_prepaidCardPinToken' model.

    TODO: type model description here.

    Attributes:
        card_pin_token (string): Token used as part of a two-leg card PIN
            reveal request sent directly from the client that generally
            involves a second piece of data, such as the CVV code on the back
            of the card.
        url (string): Full path of the URI to perform the request action
            against a prepaid card that replaces the need to build the URL
            with query params

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "card_pin_token": 'cardPinToken',
        "url": 'url'
    }

    def __init__(self,
                 card_pin_token=None,
                 url=None):
        """Constructor for the PrepaidCardPinToken class"""

        # Initialize members of the class
        self.card_pin_token = card_pin_token
        self.url = 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
        card_pin_token = dictionary.get('cardPinToken')
        url = dictionary.get('url')

        # Return an object of this model
        return cls(card_pin_token,
                   url)
