donation¶
A class to hold the Donation attributes and methods.
-
class
eldonationtracker.api.donation.
Donation
(json)¶ Bases:
object
Donation Attributes.
- Class exists to provide attributes for a donation 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 amount of the donation. If they blocked it from showing it is set to 0.
-
property
avatar_url
¶ the URL of the avatar associated with this donation.
-
property
donation_date
¶ the date of the donation.
-
property
donation_id
¶ The donor drive ID of this donation.
-
property
donor_id
¶ the donor drive ID of the donor who made this donation
-
static
json_to_attributes
(json)¶ Convert API JSON values to Donation attributes.
- Parameters
json (json) – JSON attributes from the API
-
property
message
¶ the message associated with the donation.
-
property
name
¶ the name of the donor for this donation. If the donor wished to stay anonymous, the variable is set to/ ‘Anonymous’