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

"""
pqapiv2

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


class PrepaidCardDataResponse(object):

    """Implementation of the 'prepaidCardData-Response' model.

    Response to the prepaid card data request

    Attributes:
        card_image (string): TODO: type description here.
        card_number (float): TODO: type description here.
        cvv_number (string): TODO: type description here.
        expiration (string): TODO: type description here.
        name_on_card (string): TODO: type description here.
        side (string): TODO: type description here.
        token (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "card_image": 'cardImage',
        "card_number": 'cardNumber',
        "cvv_number": 'cvvNumber',
        "expiration": 'expiration',
        "name_on_card": 'nameOnCard',
        "side": 'side',
        "token": 'token'
    }

    def __init__(self,
                 card_image=None,
                 card_number=None,
                 cvv_number=None,
                 expiration=None,
                 name_on_card=None,
                 side=None,
                 token=None):
        """Constructor for the PrepaidCardDataResponse class"""

        # Initialize members of the class
        self.card_image = card_image
        self.card_number = card_number
        self.cvv_number = cvv_number
        self.expiration = expiration
        self.name_on_card = name_on_card
        self.side = side
        self.token = token

    @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_image = dictionary.get('cardImage')
        card_number = dictionary.get('cardNumber')
        cvv_number = dictionary.get('cvvNumber')
        expiration = dictionary.get('expiration')
        name_on_card = dictionary.get('nameOnCard')
        side = dictionary.get('side')
        token = dictionary.get('token')

        # Return an object of this model
        return cls(card_image,
                   card_number,
                   cvv_number,
                   expiration,
                   name_on_card,
                   side,
                   token)
