@@ -27,36 +27,52 @@ type MarketplaceService struct {
2727
2828// MarketplacePlan represents a GitHub Apps Marketplace Listing Plan.
2929type 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"`
4044}
4145
4246// MarketplacePurchase represents a GitHub Apps Marketplace Purchase.
4347type MarketplacePurchase struct {
48+ // BillingCycle can be one of the values "yearly", "monthly" or nil.
4449 BillingCycle * string `json:"billing_cycle,omitempty"`
45- NextBillingDate * string `json:"next_billing_date,omitempty"`
50+ NextBillingDate * Timestamp `json:"next_billing_date,omitempty"`
4651 UnitCount * int `json:"unit_count,omitempty"`
4752 Plan * MarketplacePlan `json:"plan,omitempty"`
4853 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"`
4964}
5065
5166// MarketplacePlanAccount represents a GitHub Account (user or organization) on a specific plan.
5267type 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"`
6076}
6177
6278// ListPlans lists all plans for your Marketplace listing.
@@ -155,7 +171,6 @@ func (s *MarketplaceService) ListMarketplacePurchasesForUser(ctx context.Context
155171 if err != nil {
156172 return nil , resp , err
157173 }
158-
159174 return purchases , resp , nil
160175}
161176
0 commit comments