# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class UpdateCreditCardModel(Model):
    """The request model sent by the client for updating credit cards in the
    payment platform.

    :param token: The payment token for the credit card.
    :type token: str
    :param expiration_month: The expiration month of the credit card.
    :type expiration_month: int
    :param expiration_year: The expiration year of the credit card.
    :type expiration_year: int
    :param card_holder_name: The name of the cardholder, as it appears on the
     front of the credit card.
    :type card_holder_name: str
    :param billing_address: The billing address for the credit card holder..
    :type billing_address: ~softheon.wallet.api.client.models.Address
    :param email: A valid email address for the card holder.
    :type email: str
    """

    _validation = {
        'token': {'required': True},
        'expiration_month': {'required': True, 'maximum': 12, 'minimum': 1},
        'expiration_year': {'required': True, 'maximum': 2038, 'minimum': 2018},
        'card_holder_name': {'required': True},
        'billing_address': {'required': True},
        'email': {'required': True},
    }

    _attribute_map = {
        'token': {'key': 'token', 'type': 'str'},
        'expiration_month': {'key': 'expirationMonth', 'type': 'int'},
        'expiration_year': {'key': 'expirationYear', 'type': 'int'},
        'card_holder_name': {'key': 'cardHolderName', 'type': 'str'},
        'billing_address': {'key': 'billingAddress', 'type': 'Address'},
        'email': {'key': 'email', 'type': 'str'},
    }

    def __init__(self, token, expiration_month, expiration_year, card_holder_name, billing_address, email):
        super(UpdateCreditCardModel, self).__init__()
        self.token = token
        self.expiration_month = expiration_month
        self.expiration_year = expiration_year
        self.card_holder_name = card_holder_name
        self.billing_address = billing_address
        self.email = email
