-
Notifications
You must be signed in to change notification settings - Fork 3
/
tier.go
36 lines (33 loc) · 1.46 KB
/
tier.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
28
29
30
31
32
33
34
35
36
package patreon
// TierFields is all fields in the Tier Attributes struct
var TierFields = getObjectFields(Tier{}.Attributes)
// Tier is a membership level on a campaign, which can have benefits attached to it.
type Tier struct {
Type string `json:"type"`
ID string `json:"id"`
Attributes TierAttributes `json:"attributes"`
Relationships struct {
Benefits *BenefitsRelationship `json:"benefits,omitempty"`
Campaign *CampaignRelationship `json:"campaign,omitempty"`
TierImage *MediaRelationship `json:"tier_image,omitempty"`
} `json:"relationships"`
}
// TierAttributes is the attributes struct for Tier
type TierAttributes struct {
AmountCents int `json:"amount_cents"`
CreatedAt NullTime `json:"created_at"`
Description string `json:"description"`
DiscordRoleIds interface{} `json:"discord_role_ids"`
EditedAt NullTime `json:"edited_at"`
ImageURL string `json:"image_url"`
PatronCount int `json:"patron_count"`
PostCount int `json:"post_count"`
Published bool `json:"published"`
PublishedAt NullTime `json:"published_at"`
Remaining int `json:"remaining"`
RequiresShipping bool `json:"requires_shipping"`
Title string `json:"title"`
UnpublishedAt NullTime `json:"unpublished_at"`
URL string `json:"url"`
UserLimit int `json:"user_limit"`
}