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

"""
    apimaticcalculatorlatest

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


class ReservationFeeNotificationModel(object):

    """Implementation of the 'ReservationFeeNotificationModel' model.

    Model used for fees in reservation push notification

    Attributes:
        id (string): Fee altID (alt ID which PMS sent over API)
        name (string): Fee name
        value (float): Fee value

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name":'name',
        "value":'value',
        "id":'id'
    }

    def __init__(self,
                 name=None,
                 value=None,
                 id=None):
        """Constructor for the ReservationFeeNotificationModel class"""

        # Initialize members of the class
        self.id = id
        self.name = name
        self.value = value


    @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
        name = dictionary.get('name')
        value = dictionary.get('value')
        id = dictionary.get('id')

        # Return an object of this model
        return cls(name,
                   value,
                   id)


