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

"""
shelldatareportingapis

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from shelldatareportingapis.api_helper import APIHelper


class AssociatedAccount(object):

    """Implementation of the 'AssociatedAccount' model.

    TODO: type model description here.

    Attributes:
        associated_account_id (int): Account identifier  of the Associated
            Account associated with the Payer.
        associated_account_number (str): Account number of the Associated
            Account associated with the Payer.
        associated_account_short_name (str): Account associated with the Payer.
        associated_account_full_name (str): Full name of the Associated
            Account associated with the Payer.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "associated_account_id": 'AssociatedAccountId',
        "associated_account_number": 'AssociatedAccountNumber',
        "associated_account_short_name": 'AssociatedAccountShortName',
        "associated_account_full_name": 'AssociatedAccountFullName'
    }

    _optionals = [
        'associated_account_id',
        'associated_account_number',
        'associated_account_short_name',
        'associated_account_full_name',
    ]

    _nullables = [
        'associated_account_id',
        'associated_account_number',
        'associated_account_short_name',
        'associated_account_full_name',
    ]

    def __init__(self,
                 associated_account_id=APIHelper.SKIP,
                 associated_account_number=APIHelper.SKIP,
                 associated_account_short_name=APIHelper.SKIP,
                 associated_account_full_name=APIHelper.SKIP):
        """Constructor for the AssociatedAccount class"""

        # Initialize members of the class
        if associated_account_id is not APIHelper.SKIP:
            self.associated_account_id = associated_account_id 
        if associated_account_number is not APIHelper.SKIP:
            self.associated_account_number = associated_account_number 
        if associated_account_short_name is not APIHelper.SKIP:
            self.associated_account_short_name = associated_account_short_name 
        if associated_account_full_name is not APIHelper.SKIP:
            self.associated_account_full_name = associated_account_full_name 

    @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 not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        associated_account_id = dictionary.get("AssociatedAccountId") if "AssociatedAccountId" in dictionary.keys() else APIHelper.SKIP
        associated_account_number = dictionary.get("AssociatedAccountNumber") if "AssociatedAccountNumber" in dictionary.keys() else APIHelper.SKIP
        associated_account_short_name = dictionary.get("AssociatedAccountShortName") if "AssociatedAccountShortName" in dictionary.keys() else APIHelper.SKIP
        associated_account_full_name = dictionary.get("AssociatedAccountFullName") if "AssociatedAccountFullName" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(associated_account_id,
                   associated_account_number,
                   associated_account_short_name,
                   associated_account_full_name)
