Example #1
0
def _normalize_transfer(transfer):
    transfer = pylend._convert_datetimes(
        transfer,
        TRANSFER_DATETIME_FIELDS)
    transfer['frequency'] = TRANSFER_FREQUENCY_MAPPING[
        transfer['frequency']]
    return transfer
Example #2
0
def _normalize_loan_format(json_payload):
    json_payload['asOfDate'] = arrow.get(json_payload['asOfDate'])
    json_payload['loans'] = [
        pylend._convert_datetimes(loan, LOAN_DATETIME_FIELDS)
        for loan in json_payload['loans']
    ]
    return json_payload
Example #3
0
def _normalize_loan_format(json_payload):
        json_payload['asOfDate'] = arrow.get(json_payload['asOfDate'])
        json_payload['loans'] = [pylend._convert_datetimes(
            loan,
            LOAN_DATETIME_FIELDS) for loan in json_payload['loans']]
        return json_payload
Example #4
0
def _normalize_notes(note):
    return pylend._convert_datetimes(
        note,
        NOTE_DATETIME_FIELDS)