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

"""
pqapiv2

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


class PhoneNumbers(object):

    """Implementation of the '_phoneNumbers' model.

    TODO: type model description here.

    Attributes:
        phone_number (string): The E.164 formatted primary phone number. This
            can be the same as the mobile number.
        mobile_number (string): The E.164 formatted mobile phone number,
            required by most financial institutions for account creation,
            verification, or PSD2 (3DS). Mobile numbers must be unique to a
            user within a tenant and cannot be shared.
        phone_number_country (CountryTypesEnum): Two-digit country code types
        mobile_number_country (CountryTypesEnum): Two-digit country code
            types

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "phone_number": 'phoneNumber',
        "mobile_number": 'mobileNumber',
        "phone_number_country": 'phoneNumberCountry',
        "mobile_number_country": 'mobileNumberCountry'
    }

    def __init__(self,
                 phone_number=None,
                 mobile_number=None,
                 phone_number_country=None,
                 mobile_number_country=None):
        """Constructor for the PhoneNumbers class"""

        # Initialize members of the class
        self.phone_number = phone_number
        self.mobile_number = mobile_number
        self.phone_number_country = phone_number_country
        self.mobile_number_country = mobile_number_country

    @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
        phone_number = dictionary.get('phoneNumber')
        mobile_number = dictionary.get('mobileNumber')
        phone_number_country = dictionary.get('phoneNumberCountry')
        mobile_number_country = dictionary.get('mobileNumberCountry')

        # Return an object of this model
        return cls(phone_number,
                   mobile_number,
                   phone_number_country,
                   mobile_number_country)
