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

"""
paypalserversdk

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


class StoreInformation(object):

    """Implementation of the 'Store Information' model.

    The store information.

    Attributes:
        store_id (str): The ID of a store for a merchant in the system of
            record.
        terminal_id (str): The terminal ID for the checkout stand in a
            merchant store.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "store_id": 'store_id',
        "terminal_id": 'terminal_id'
    }

    _optionals = [
        'store_id',
        'terminal_id',
    ]

    def __init__(self,
                 store_id=APIHelper.SKIP,
                 terminal_id=APIHelper.SKIP):
        """Constructor for the StoreInformation class"""

        # Initialize members of the class
        if store_id is not APIHelper.SKIP:
            self.store_id = store_id 
        if terminal_id is not APIHelper.SKIP:
            self.terminal_id = terminal_id 

    @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
        store_id = dictionary.get("store_id") if dictionary.get("store_id") else APIHelper.SKIP
        terminal_id = dictionary.get("terminal_id") if dictionary.get("terminal_id") else APIHelper.SKIP
        # Return an object of this model
        return cls(store_id,
                   terminal_id)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'store_id={(self.store_id if hasattr(self, "store_id") else None)!r}, '
                f'terminal_id={(self.terminal_id if hasattr(self, "terminal_id") else None)!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'store_id={(self.store_id if hasattr(self, "store_id") else None)!s}, '
                f'terminal_id={(self.terminal_id if hasattr(self, "terminal_id") else None)!s})')
