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

"""
pqapiv2

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


class PrepaidCardBase(object):

    """Implementation of the 'prepaidCardBase' model.

    Base class applied to the prepaid card

    Attributes:
        card_package (string): Package for the card being displayed
            (<i>Virtual<,i>) or <i>Produced (physical)</i>
        program_token (string): Token representing a program

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "program_token": 'programToken',
        "card_package": 'cardPackage'
    }

    def __init__(self,
                 program_token=None,
                 card_package=None):
        """Constructor for the PrepaidCardBase class"""

        # Initialize members of the class
        self.card_package = card_package
        self.program_token = program_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
        program_token = dictionary.get('programToken')
        card_package = dictionary.get('cardPackage')

        # Return an object of this model
        return cls(program_token,
                   card_package)
