donor

A donor.

class eldonationtracker.api.donor.Donor(json)

Bases: object

Donor Attributes.

Class exists to provide attributes for a donor based on what comes in from the JSON so that it doesn’t have to be traversed each time a donor action needs to be taken.

property amount

The sum of all donations the donor has made this campaign

property donor_id

The ID assigned by the API (currently not used).

property image_url

The URL for the donor’s avatar (currently not used)

static json_to_attributes(json_values)

Convert API JSON values to Donor attributes.

Parameters

json_values (json) – JSON attributes from the API

property name

Donor’s name if provided, else Anonymous.

property number_of_donations

The number of donations the donor has made this campaign