Documentation
¶
Index ¶
- type Account
- type AccountBilling
- type AccountImageSizes
- type AccountImages
- type AccountProcessors
- type Adjustment
- type AdjustmentStore
- type Campaign
- type CampaignCoverPhotoSizes
- type CampaignImages
- type CampaignOverview
- type CampaignPhotoSizes
- type ChargeSource
- type CollectionReportRecord
- type Donation
- type DonationLite
- type Donations
- type Donor
- type Fundraisers
- type HeaderImage
- type IPAddress
- type MetaData
- type Notifications
- type Person
- type PublishableKeys
- type StripeProcessor
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID string `json:"id"`
Title string `json:"title"`
Subdomain string `json:"subdomain"`
DonatelyHomepageURL string `json:"donately_homepage_url"`
Status string `json:"status"`
Currency string `json:"currency"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
TaxID *string `json:"tax_id"`
TaxExemptStatus *string `json:"tax_exempt_status"`
DBAName *string `json:"dba_name"`
HomeLinkURL *string `json:"home_link_url"`
Description *string `json:"description"`
Images AccountImages `json:"images"`
MailReplyTo *string `json:"mail_reply_to"`
DontSendReceiptEmails *bool `json:"dont_send_receipt_emails"`
Livemode *bool `json:"livemode"`
StripeConnectStatus *string `json:"stripe_connect_status"`
DonationFeePercent float64 `json:"donation_fee_percent"`
PublishableMerchantKeys PublishableKeys `json:"publishable_merchant_keys"`
FormID string `json:"form_id"`
GoogleAnalyticsID *string `json:"google_analytics_id"`
Type *string `json:"type"`
BusinessType *string `json:"business_type"`
City *string `json:"city"`
State *string `json:"state"`
ZipCode *string `json:"zip_code"`
Country *string `json:"country"`
Phone *string `json:"phone"`
Billing AccountBilling `json:"billing"`
Processors AccountProcessors `json:"processors"`
MetaData map[string]any `json:"meta_data"`
ScriptTags map[string]any `json:"script_tags"`
HasDonations bool `json:"has_donations"`
}
type AccountBilling ¶
type AccountBilling struct {
SubscriptionPlan string `json:"subscription_plan"`
SubscriptionInterval *string `json:"subscription_interval"`
SubscriptionStartDate *string `json:"subscription_start_date"`
SubscriptionEndDate *string `json:"subscription_end_date"`
SubscriptionAmountInCents int64 `json:"subscription_amount_in_cents"`
BillingMode *string `json:"billing_mode"`
BillingDayOfMonth int `json:"billing_day_of_month"`
FailedChargeAt *string `json:"failed_charge_at"`
}
type AccountImageSizes ¶
type AccountImages ¶
type AccountImages struct {
Logo AccountImageSizes `json:"logo"`
Header HeaderImage `json:"header"`
}
type AccountProcessors ¶
type AccountProcessors struct {
DefaultProcessor *string `json:"default_processor"`
DefaultCurrency string `json:"default_currency"`
Livemode *bool `json:"livemode"`
Stripe StripeProcessor `json:"stripe"`
Paypal *any `json:"paypal"`
}
type Adjustment ¶
type AdjustmentStore ¶
type AdjustmentStore interface {
GetAdustmentsByPerson(context.Context, Person) ([]Adjustment, error)
SaveAdjustments(context.Context, Person, []Adjustment) error
}
func NewAdjustmentStore ¶
func NewAdjustmentStore() (AdjustmentStore, error)
type Campaign ¶
type Campaign struct {
ID string `json:"id"`
Title string `json:"title"`
Slug string `json:"slug"`
Type string `json:"type"`
URL string `json:"url"`
Status string `json:"status"`
Permalink string `json:"permalink"`
Description *string `json:"description"`
Content *string `json:"content"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
StartDate *string `json:"start_date"` // use *time.Time if ISO format is confirmed
EndDate *string `json:"end_date"`
GoalInCents int64 `json:"goal_in_cents"`
AmountRaisedInCents int64 `json:"amount_raised_in_cents"`
PercentFunded float64 `json:"percent_funded"`
DonorsCount int `json:"donors_count"`
Images CampaignImages `json:"images"`
Account Account `json:"account"`
FormID string `json:"form_id"`
MetaData any `json:"meta_data"`
InternalID int64 `json:"internal_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Recurring *bool `json:"recurring"`
FundraiserGoal *int64 `json:"fundraiser_goal"`
DonationAmount *int64 `json:"donation_amount"`
}
type CampaignCoverPhotoSizes ¶
type CampaignImages ¶
type CampaignImages struct {
Photo CampaignPhotoSizes `json:"photo"`
CoverPhoto CampaignCoverPhotoSizes `json:"cover_photo"`
}
type CampaignOverview ¶
type CampaignOverview struct {
ID string `json:"id"`
Title string `json:"title"`
Slug string `json:"slug"`
Type string `json:"type"`
URL string `json:"url"`
Status string `json:"status"`
Permalink string `json:"permalink"`
Description *string `json:"description"`
Content *string `json:"content"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
StartDate *string `json:"start_date"` // use *time.Time if ISO format is confirmed
EndDate *string `json:"end_date"`
GoalInCents int64 `json:"goal_in_cents"`
AmountRaisedInCents int64 `json:"amount_raised_in_cents"`
PercentFunded float64 `json:"percent_funded"`
Donors []Donor `json:"donors"`
}
type CampaignPhotoSizes ¶
type ChargeSource ¶
type ChargeSource struct {
ID string `json:"id"`
Object string `json:"object"`
AddressCity string `json:"address_city"`
AddressCountry string `json:"address_country"`
AddressLine1 string `json:"address_line1"`
AddressLine1Check string `json:"address_line1_check"`
AddressLine2 string `json:"address_line2"`
AddressState string `json:"address_state"`
AddressZip string `json:"address_zip"`
AddressZipCheck string `json:"address_zip_check"`
Brand string `json:"brand"`
Country string `json:"country"`
Customer string `json:"customer"`
CVCCheck string `json:"cvc_check"`
DynamicLast4 *string `json:"dynamic_last4"`
ExpMonth int `json:"exp_month"`
ExpYear int `json:"exp_year"`
Fingerprint string `json:"fingerprint"`
Funding string `json:"funding"`
Last4 string `json:"last4"`
Metadata map[string]any `json:"metadata"`
Name string `json:"name"`
TokenizationMethod *string `json:"tokenization_method"`
}
type CollectionReportRecord ¶
type CollectionReportRecord struct {
FirstName, LastName, EmailAddress string
AmountDonated, AmountDue, AmountPledged float64
Adjustments []Adjustment
}
func ParseCollectionReportCSV ¶
func ParseCollectionReportCSV(r io.ReadCloser) ([]CollectionReportRecord, error)
type Donation ¶
type Donation struct {
ID string `json:"id"`
DonationType string `json:"donation_type"`
Processor string `json:"processor"`
Status string `json:"status"`
Livemode bool `json:"livemode"`
DonationDate int64 `json:"donation_date"`
AmountInCents int64 `json:"amount_in_cents"`
Currency string `json:"currency"`
Recurring bool `json:"recurring"`
Refunded *bool `json:"refunded"`
TransactionID string `json:"transaction_id"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
AmountFormatted string `json:"amount_formatted"`
Anonymous bool `json:"anonymous"`
OnBehalfOf string `json:"on_behalf_of"`
Comment string `json:"comment"`
TrackingCodes string `json:"tracking_codes"`
MetaData MetaData `json:"meta_data"`
Person Person `json:"person"`
Account Account `json:"account"`
Campaign Campaign `json:"campaign"`
Fundraiser any `json:"fundraiser"`
Subscription Subscription `json:"subscription"`
Parent any `json:"parent"`
Refunds []any `json:"refunds"`
ChargeSource ChargeSource `json:"charge_source"`
ReferrerID *string `json:"referrer_id"`
RemoteIP string `json:"remote_ip"`
FeeInCents int64 `json:"fee_in_cents"`
InternalID int64 `json:"internal_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
FeeStripeChargeID string `json:"fee_stripe_charge_id"`
StripeCustomerID string `json:"stripe_customer_id"`
StripeConnectIDHash string `json:"stripe_connect_id_hash"`
AmountInCentsUSD int64 `json:"amount_in_cents_usd"`
Notes *string `json:"notes"`
}
type DonationLite ¶
type DonationLite struct {
ID string `json:"id"`
Object string `json:"object"`
DonationType string `json:"donation_type"`
Processor string `json:"processor"`
Status string `json:"status"`
Livemode bool `json:"livemode"`
DonationDate int64 `json:"donation_date"`
AmountInCents int64 `json:"amount_in_cents"`
Currency string `json:"currency"`
Recurring bool `json:"recurring"`
Refunded *bool `json:"refunded"`
}
type Donor ¶
type Donor struct {
Person Person `json:"person"`
Pledge float64 `json:"pledge"`
Donations []Donation `json:"donations"`
Adjustments []Adjustment `json:"adjustments"`
}
type Fundraisers ¶
type HeaderImage ¶
type HeaderImage struct {
Original *string `json:"original"`
}
type Notifications ¶
type Notifications struct {
Count int `json:"count"`
}
type Person ¶
type Person struct {
ID string `json:"id"`
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
PhoneNumber string `json:"phone_number"`
StreetAddress string `json:"street_address"`
StreetAddress2 string `json:"street_address_2"`
City string `json:"city"`
State string `json:"state"`
ZipCode string `json:"zip_code"`
Country string `json:"country"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
LastSignIn IPAddress `json:"last_sign_in"`
ConnectedToMultipleAccounts bool `json:"connected_to_multiple_accounts"`
HasAdminRoles bool `json:"has_admin_roles"`
MetaData any `json:"meta_data"`
Accounts []Account `json:"accounts"`
}
type PublishableKeys ¶
type StripeProcessor ¶
type Subscription ¶
type Subscription struct {
ID string `json:"id"`
DonationType string `json:"donation_type"`
Status string `json:"status"`
Processor string `json:"processor"`
Livemode bool `json:"livemode"`
AmountInCents int64 `json:"amount_in_cents"`
Currency string `json:"currency"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
RecurringStartDay int64 `json:"recurring_start_day"`
RecurringStopDay int64 `json:"recurring_stop_day"`
RecurringFrequency string `json:"recurring_frequency"`
RecurringDayOfMonth int `json:"recurring_day_of_month"`
CreditCardType string `json:"cc_type"`
CreditCardLast4 string `json:"cc_last4"`
CreditCardExpMonth string `json:"cc_exp_month"`
CreditCardExpYear string `json:"cc_exp_year"`
Anonymous bool `json:"anonymous"`
OnBehalfOf *string `json:"on_behalf_of"`
Comment *string `json:"comment"`
TrackingCodes string `json:"tracking_codes"`
MetaData map[string]any `json:"meta_data"`
DonationParent DonationLite `json:"donation_parent"`
Person Person `json:"person"`
Account Account `json:"account"`
Campaign any `json:"campaign"`
Fundraiser any `json:"fundraiser"`
ChargeSource ChargeSource `json:"charge_source"`
InternalID int64 `json:"internal_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
RestartRecurringSchedule *string `json:"restart_recurring_schedule"`
ReferrerID *string `json:"referrer_id"`
Notes *string `json:"notes"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.