@@ -27,36 +27,52 @@ type MarketplaceService struct {
27
27
28
28
// MarketplacePlan represents a GitHub Apps Marketplace Listing Plan.
29
29
type MarketplacePlan struct {
30
- URL * string `json:"url,omitempty"`
31
- AccountsURL * string `json:"accounts_url,omitempty"`
32
- ID * int64 `json:"id,omitempty"`
33
- Name * string `json:"name,omitempty"`
34
- Description * string `json:"description,omitempty"`
35
- MonthlyPriceInCents * int `json:"monthly_price_in_cents,omitempty"`
36
- YearlyPriceInCents * int `json:"yearly_price_in_cents,omitempty"`
37
- PriceModel * string `json:"price_model,omitempty"`
38
- UnitName * string `json:"unit_name,omitempty"`
39
- Bullets * []string `json:"bullets,omitempty"`
30
+ URL * string `json:"url,omitempty"`
31
+ AccountsURL * string `json:"accounts_url,omitempty"`
32
+ ID * int64 `json:"id,omitempty"`
33
+ Name * string `json:"name,omitempty"`
34
+ Description * string `json:"description,omitempty"`
35
+ MonthlyPriceInCents * int `json:"monthly_price_in_cents,omitempty"`
36
+ YearlyPriceInCents * int `json:"yearly_price_in_cents,omitempty"`
37
+ // The pricing model for this listing. Can be one of "flat-rate", "per-unit", or "free".
38
+ PriceModel * string `json:"price_model,omitempty"`
39
+ UnitName * string `json:"unit_name,omitempty"`
40
+ Bullets * []string `json:"bullets,omitempty"`
41
+ // State can be one of the values "draft" or "published".
42
+ State * string `json:"state,omitempty"`
43
+ HasFreeTrial * bool `json:"has_free_trial,omitempty"`
40
44
}
41
45
42
46
// MarketplacePurchase represents a GitHub Apps Marketplace Purchase.
43
47
type MarketplacePurchase struct {
48
+ // BillingCycle can be one of the values "yearly", "monthly" or nil.
44
49
BillingCycle * string `json:"billing_cycle,omitempty"`
45
- NextBillingDate * string `json:"next_billing_date,omitempty"`
50
+ NextBillingDate * Timestamp `json:"next_billing_date,omitempty"`
46
51
UnitCount * int `json:"unit_count,omitempty"`
47
52
Plan * MarketplacePlan `json:"plan,omitempty"`
48
53
Account * MarketplacePlanAccount `json:"account,omitempty"`
54
+ OnFreeTrial * bool `json:"on_free_trial,omitempty"`
55
+ FreeTrialEndsOn * Timestamp `json:"free_trial_ends_on,omitempty"`
56
+ }
57
+
58
+ // MarketplacePendingChange represents a pending change to a GitHub Apps Marketplace Plan.
59
+ type MarketplacePendingChange struct {
60
+ EffectiveDate * Timestamp `json:"effective_date,omitempty"`
61
+ UnitCount * int `json:"unit_count,omitempty"`
62
+ ID * int64 `json:"id,omitempty"`
63
+ Plan * MarketplacePlan `json:"plan,omitempty"`
49
64
}
50
65
51
66
// MarketplacePlanAccount represents a GitHub Account (user or organization) on a specific plan.
52
67
type MarketplacePlanAccount struct {
53
- URL * string `json:"url,omitempty"`
54
- Type * string `json:"type,omitempty"`
55
- ID * int64 `json:"id,omitempty"`
56
- Login * string `json:"login,omitempty"`
57
- Email * string `json:"email,omitempty"`
58
- OrganizationBillingEmail * string `json:"organization_billing_email,omitempty"`
59
- MarketplacePurchase * MarketplacePurchase `json:"marketplace_purchase,omitempty"`
68
+ URL * string `json:"url,omitempty"`
69
+ Type * string `json:"type,omitempty"`
70
+ ID * int64 `json:"id,omitempty"`
71
+ Login * string `json:"login,omitempty"`
72
+ Email * string `json:"email,omitempty"`
73
+ OrganizationBillingEmail * string `json:"organization_billing_email,omitempty"`
74
+ MarketplacePurchase * MarketplacePurchase `json:"marketplace_purchase,omitempty"`
75
+ MarketplacePendingChange * MarketplacePendingChange `json:"marketplace_pending_change,omitempty"`
60
76
}
61
77
62
78
// ListPlans lists all plans for your Marketplace listing.
@@ -155,7 +171,6 @@ func (s *MarketplaceService) ListMarketplacePurchasesForUser(ctx context.Context
155
171
if err != nil {
156
172
return nil , resp , err
157
173
}
158
-
159
174
return purchases , resp , nil
160
175
}
161
176
0 commit comments