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

"""
    mundiapi.models.get_checkout_boleto_payment_response

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

class GetCheckoutBoletoPaymentResponse(object):

    """Implementation of the 'GetCheckoutBoletoPaymentResponse' model.

    TODO: type model description here.

    Attributes:
        due_at (datetime): Data de vencimento do boleto
        instructions (string): Instruções do boleto

    """

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

    def __init__(self,
                 due_at=None,
                 instructions=None):
        """Constructor for the GetCheckoutBoletoPaymentResponse class"""

        # Initialize members of the class
        self.due_at = APIHelper.RFC3339DateTime(due_at) if due_at else None
        self.instructions = instructions


    @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
        due_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("due_at")).datetime if dictionary.get("due_at") else None
        instructions = dictionary.get('instructions')

        # Return an object of this model
        return cls(due_at,
                   instructions)


