Skip to content

Add Account field to MarketplacePurchase struct #2658

@lyspj

Description

@lyspj

Hi,

Thanks for all the work on this library!

According to the docs, the MarketplacePurchase struct should have an Account field, but that field is currently missing.

I've checked the data sent by GitHub in the webhook, and we could either use the existing MarketplacePlanAccount type for the missing Account field, or create a new type something like this:

// MarketplacePurchaseAccount represents a GitHub Account (user or organization) for a specific purchase.
type MarketplacePurchaseAccount struct {
    Type                     *string    `json:"type,omitempty"`
    ID                       *int64     `json:"id,omitempty"`
    Login                    *string    `json:"login,omitempty"`
    OrganizationBillingEmail *string    `json:"organization_billing_email,omitempty"`
}

The benefit of adding the new MarketplacePurchaseAccount type is that we would avoid making the definition of MarketplacePurchase recursive. (The existing MarketplacePlanAccount type has a MarketplacePurchase field).

Please let me know if you'd like me to open a PR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions