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

"""
    apimaticcalculatorlatest

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


class CompanyAddress(object):

    """Implementation of the 'CompanyAddress' model.

    TODO: type model description here.

    Attributes:
        country (string): Country of PM. Require 2 letter ISO code
        state (string): State (Region) of PM. Required for US properties.
        street_address (string): Street address of PM.
        city (string): City of PM
        zip (string): Zip code (postal code) of PM.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "country":'country',
        "state":'state',
        "street_address":'streetAddress',
        "city":'city',
        "zip":'zip'
    }

    def __init__(self,
                 country=None,
                 state=None,
                 street_address=None,
                 city=None,
                 zip=None):
        """Constructor for the CompanyAddress class"""

        # Initialize members of the class
        self.country = country
        self.state = state
        self.street_address = street_address
        self.city = city
        self.zip = zip


    @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
        country = dictionary.get('country')
        state = dictionary.get('state')
        street_address = dictionary.get('streetAddress')
        city = dictionary.get('city')
        zip = dictionary.get('zip')

        # Return an object of this model
        return cls(country,
                   state,
                   street_address,
                   city,
                   zip)


