-
Notifications
You must be signed in to change notification settings - Fork 3
/
goal.go
24 lines (21 loc) · 855 Bytes
/
goal.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
package patreon
// GoalFields is all fields in the Goal Attributes struct
var GoalFields = getObjectFields(Goal{}.Attributes)
// Goal is the funding goal in USD set by a creator on a campaign.
type Goal struct {
Type string `json:"type"`
ID string `json:"id"`
Attributes GoalAttributes `json:"attributes"`
Relationships struct {
Campaign *CampaignRelationship `json:"campaign,omitempty"`
} `json:"relationships"`
}
// GoalAttributes is the attributes struct for Goal
type GoalAttributes struct {
AmountCents int `json:"amount_cents"`
CompletedPercentage int `json:"completed_percentage"`
CreatedAt NullTime `json:"created_at"`
Description string `json:"description"`
ReachedAt NullTime `json:"reached_at"`
Title string `json:"title"`
}