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

"""
pqapiv2

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


class TransferBase(object):

    """Implementation of the 'transferBase' model.

    Base class for the transfer

    Attributes:
        source_token (string): Unique identifier representing the source of
            funds.
        destination_token (string): Unique identifier representing the
            destination of funds.
        notes (string): Optional comments visible to the user.
        memo (string): Optional internal memo not visible to the user.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "source_token": 'sourceToken',
        "destination_token": 'destinationToken',
        "notes": 'notes',
        "memo": 'memo'
    }

    def __init__(self,
                 source_token=None,
                 destination_token=None,
                 notes=None,
                 memo=None):
        """Constructor for the TransferBase class"""

        # Initialize members of the class
        self.source_token = source_token
        self.destination_token = destination_token
        self.notes = notes
        self.memo = memo

    @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
        source_token = dictionary.get('sourceToken')
        destination_token = dictionary.get('destinationToken')
        notes = dictionary.get('notes')
        memo = dictionary.get('memo')

        # Return an object of this model
        return cls(source_token,
                   destination_token,
                   notes,
                   memo)
