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

"""
cookiesapi

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


class Phone(object):

    """Implementation of the 'Phone' model.

    Specifies phone-based contact information.

    Attributes:
        e_164 (string): E164-formatted phone number.
        display (string): National display format for the number.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "e_164": 'e164',
        "display": 'display'
    }

    def __init__(self,
                 e_164=None,
                 display=None):
        """Constructor for the Phone class"""

        # Initialize members of the class
        self.e_164 = e_164
        self.display = display

    @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
        e_164 = dictionary.get('e164')
        display = dictionary.get('display')

        # Return an object of this model
        return cls(e_164,
                   display)
