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

"""
pqapiv2

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


class BusinessAddress(object):

    """Implementation of the '_businessAddress' model.

    Address of the business location

    Attributes:
        business_address_line_1 (string): First line of the business address
            that specifies street number, street name, and building name
        business_address_line_2 (string): Second line of the business address
            that specifies the apartment, suite, or space number (or any other
            designation not literally part of the physical address)
        business_address_line_3 (string): Third line of the business address
            that specifies the international or business addresses that do not
            fit on businessAddressLine3
        business_address_line_4 (string): fourth line of the business address
            street address
        business_address_line_5 (string): Fifth line of the business address
            street address
        business_city (string): City the business is registered
        business_region (string): State, province, or region the business is
            registered
        business_country (CountryTypesEnum): Two-digit country code types
        business_postal_code (string): Postal code for the business address
        business_premise_number (string): House number for the business
            address

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "business_address_line_1": 'businessAddressLine1',
        "business_address_line_2": 'businessAddressLine2',
        "business_address_line_3": 'businessAddressLine3',
        "business_address_line_4": 'businessAddressLine4',
        "business_address_line_5": 'businessAddressLine5',
        "business_city": 'businessCity',
        "business_region": 'businessRegion',
        "business_country": 'businessCountry',
        "business_postal_code": 'businessPostalCode',
        "business_premise_number": 'businessPremiseNumber'
    }

    def __init__(self,
                 business_address_line_1=None,
                 business_address_line_2=None,
                 business_address_line_3=None,
                 business_address_line_4=None,
                 business_address_line_5=None,
                 business_city=None,
                 business_region=None,
                 business_country=None,
                 business_postal_code=None,
                 business_premise_number=None):
        """Constructor for the BusinessAddress class"""

        # Initialize members of the class
        self.business_address_line_1 = business_address_line_1
        self.business_address_line_2 = business_address_line_2
        self.business_address_line_3 = business_address_line_3
        self.business_address_line_4 = business_address_line_4
        self.business_address_line_5 = business_address_line_5
        self.business_city = business_city
        self.business_region = business_region
        self.business_country = business_country
        self.business_postal_code = business_postal_code
        self.business_premise_number = business_premise_number

    @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
        business_address_line_1 = dictionary.get('businessAddressLine1')
        business_address_line_2 = dictionary.get('businessAddressLine2')
        business_address_line_3 = dictionary.get('businessAddressLine3')
        business_address_line_4 = dictionary.get('businessAddressLine4')
        business_address_line_5 = dictionary.get('businessAddressLine5')
        business_city = dictionary.get('businessCity')
        business_region = dictionary.get('businessRegion')
        business_country = dictionary.get('businessCountry')
        business_postal_code = dictionary.get('businessPostalCode')
        business_premise_number = dictionary.get('businessPremiseNumber')

        # Return an object of this model
        return cls(business_address_line_1,
                   business_address_line_2,
                   business_address_line_3,
                   business_address_line_4,
                   business_address_line_5,
                   business_city,
                   business_region,
                   business_country,
                   business_postal_code,
                   business_premise_number)
