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

"""
    apimaticcalculatorlatest

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


class ReservationRateNotifcationModel(object):

    """Implementation of the 'ReservationRateNotifcationModel' model.

    TODO: type model description here.

    Attributes:
        original_rack_rate (float): Original rack rate. Rate received from PMS
            (rate without additional channel commission or any additional
            markup)
        net_rate (float): Net rate (rate which PM will get - so without any
            additional commissions).
        new_published_rack_rate (float): New published rack rate (rate which
            guest paid - rate with all commissions).

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "original_rack_rate":'originalRackRate',
        "net_rate":'netRate',
        "new_published_rack_rate":'newPublishedRackRate'
    }

    def __init__(self,
                 original_rack_rate=None,
                 net_rate=None,
                 new_published_rack_rate=None):
        """Constructor for the ReservationRateNotifcationModel class"""

        # Initialize members of the class
        self.original_rack_rate = original_rack_rate
        self.net_rate = net_rate
        self.new_published_rack_rate = new_published_rack_rate


    @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
        original_rack_rate = dictionary.get('originalRackRate')
        net_rate = dictionary.get('netRate')
        new_published_rack_rate = dictionary.get('newPublishedRackRate')

        # Return an object of this model
        return cls(original_rack_rate,
                   net_rate,
                   new_published_rack_rate)


