-
Notifications
You must be signed in to change notification settings - Fork 3
/
pledge_event.go
27 lines (24 loc) · 1.04 KB
/
pledge_event.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package patreon
// PledgeEventFields is all fields in the PledgeEvent Attributes struct
var PledgeEventFields = getObjectFields(PledgeEvent{}.Attributes)
// PledgeEvent is the record of a pledging action taken by the user, or that action's failure.
type PledgeEvent struct {
Type string `json:"type"`
ID string `json:"id"`
Attributes PledgeEventAttributes `json:"attributes"`
Relationships struct {
Campaign *CampaignRelationship `json:"campaign,omitempty"`
Patron *PatronRelationship `json:"patron"`
Tier *TierRelationship `json:"tier,omitempty"`
} `json:"relationships"`
}
// PledgeEventAttributes is the attributes struct for PledgeEvent
type PledgeEventAttributes struct {
AmountCents int `json:"amount_cents"`
CurrencyCode string `json:"currency_code"`
Date NullTime `json:"date"`
PaymentStatus string `json:"payment_status"`
TierID string `json:"tier_id"`
TierTitle string `json:"tier_title"`
Type string `json:"type"`
}