Example #1
0
def get_card_transactions(info=None):
    """Returns all debit card transactions made on the account

    :param info: Will filter the results to get a specific value. 'direction' gives if it was debit or credit. 
    :type info: Optional[str]
    :returns: Returns a list of dictionaries of key/value pairs for each transfer. If info parameter is provided, \
    a list of strings is returned where the strings are the value of the key that matches info.

    """
    url = urls.cardtransactions()
    data = helper.request_get(url, 'pagination')
    return(helper.filter(data, info))
Example #2
0
def get_card_transactions(cardType=None, info=None):
    """Returns all debit card transactions made on the account

    :param cardType: Will filter the card transaction types. Can be 'pending' or 'settled'.
    :type cardType: Optional[str]
    :param info: Will filter the results to get a specific value. 'direction' gives if it was debit or credit.
    :type info: Optional[str]
    :returns: Returns a list of dictionaries of key/value pairs for each transfer. If info parameter is provided, \
    a list of strings is returned where the strings are the value of the key that matches info.

    """
    payload = None
    if type:
        payload = {'type': type}

    url = urls.cardtransactions()
    data = helper.request_get(url, 'pagination', payload)
    return (helper.filter_data(data, info))