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

"""
pqapiv2

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


class TransferBaseExt(object):

    """Implementation of the 'transferBaseExt' model.

    Base extension 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.
        destination_amount (float): Amount transferred to the destination
        destination_currency (CurrencyTypesEnum): Currency code type for the
            object
        client_transfer_id (string): Unique value provided by the client for
            the transfer.
        token (string): Token representing the resource, prefixed with
            <i>user-</i>, <i>dest-</i>, <i>xfer-</i>, <i>acct-</i>,
            <i>pmnt-</i>, or <i>docu-</i>.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "source_token": 'sourceToken',
        "destination_token": 'destinationToken',
        "notes": 'notes',
        "memo": 'memo',
        "destination_amount": 'destinationAmount',
        "destination_currency": 'destinationCurrency',
        "client_transfer_id": 'clientTransferId',
        "token": 'token'
    }

    def __init__(self,
                 source_token=None,
                 destination_token=None,
                 notes=None,
                 memo=None,
                 destination_amount=None,
                 destination_currency=None,
                 client_transfer_id=None,
                 token=None):
        """Constructor for the TransferBaseExt class"""

        # Initialize members of the class
        self.source_token = source_token
        self.destination_token = destination_token
        self.notes = notes
        self.memo = memo
        self.destination_amount = destination_amount
        self.destination_currency = destination_currency
        self.client_transfer_id = client_transfer_id
        self.token = token

    @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')
        destination_amount = dictionary.get('destinationAmount')
        destination_currency = dictionary.get('destinationCurrency')
        client_transfer_id = dictionary.get('clientTransferId')
        token = dictionary.get('token')

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