text: # -*- coding: utf-8 -*-
  
  """
  plastiqpublicapi
  
  This file was automatically generated by APIMATIC v3.0 (
   https://www.apimatic.io ).
  """
  from plastiqpublicapi.models.address import Address
  
  
  class Card(object):
  
      """Implementation of the 'Card' model.
  
      Debit or Credit Card
  
      Attributes:
          card_holder_name (string): TODO: type description here.
          account_number (string): Card number.
          cvv (string): 3-4 digits
          expiration_month (string): TODO: type description here.
          expiration_year (string): TODO: type description here.
          billing_address (Address): TODO: type description here.
  
      """
  
      # Create a mapping from Model property names to API property names
      _names = {
          "card_holder_name": 'cardHolderName',
          "account_number": 'accountNumber',
          "cvv": 'cvv',
          "expiration_month": 'expirationMonth',
          "expiration_year": 'expirationYear',
          "billing_address": 'billingAddress'
      }
  
      def __init__(self,
                   card_holder_name=None,
                   account_number=None,
                   cvv=None,
                   expiration_month=None,
                   expiration_year=None,
                   billing_address=None):
          """Constructor for the Card class"""
  
          # Initialize members of the class
          self.card_holder_name = card_holder_name
          self.account_number = account_number
          self.cvv = cvv
          self.expiration_month = expiration_month
          self.expiration_year = expiration_year
          self.billing_address = billing_address
  
      @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_holder_name = dictionary.get('cardHolderName')
          account_number = dictionary.get('accountNumber')
          cvv = dictionary.get('cvv')
          expiration_month = dictionary.get('expirationMonth')
          expiration_year = dictionary.get('expirationYear')
          billing_address = Address.from_dictionary(dictionary.get('billingAddress')) if dictionary.get('billingAddress') else None
  
          # Return an object of this model
          return cls(card_holder_name,
                     account_number,
                     cvv,
                     expiration_month,
                     expiration_year,
                     billing_address)
  