func (s *LicenseService) AddLicense(opt *AddLicenseOptions, options ...RequestOptionFunc) (*License, *Response, error) {
	req, err := s.client.NewRequest(http.MethodPost, "license", opt, options)
	if err != nil {
		return nil, nil, err
	}
	l := new(License)
	resp, err := s.client.Do(req, l)
	if err != nil {
		return nil, resp, err
	}
	return l, resp, err
}
AddLicense adds a new license.

GitLab API docs:
https://docs.gitlab.com/ee/api/license.html#add-a-new-license
package gitlab
import (
	"net/http"
	"time"
)
type LicenseService struct {
	client *Client
}
type License struct {
	ID               int        `json:"id"`
	Plan             string     `json:"plan"`
	CreatedAt        *time.Time `json:"created_at"`
	StartsAt         *ISOTime   `json:"starts_at"`
	ExpiresAt        *ISOTime   `json:"expires_at"`
	HistoricalMax    int        `json:"historical_max"`
	MaximumUserCount int        `json:"maximum_user_count"`
	Expired          bool       `json:"expired"`
	Overage          int        `json:"overage"`
	UserLimit        int        `json:"user_limit"`
	ActiveUsers      int        `json:"active_users"`
	Licensee         struct {
		Name    string `json:"Name"`
		Company string `json:"Company"`
		Email   string `json:"Email"`
	} `json:"licensee"`
	AddOns struct {
		GitLabAuditorUser int `json:"GitLab_Auditor_User"`
		GitLabDeployBoard int `json:"GitLab_DeployBoard"`
		GitLabFileLocks   int `json:"GitLab_FileLocks"`
		GitLabGeo         int `json:"GitLab_Geo"`
		GitLabServiceDesk int `json:"GitLab_ServiceDesk"`
	} `json:"add_ons"`
}
func (l License) String() string {
	return Stringify(l)
}
func (s *LicenseService) GetLicense() (*License, *Response, error) {
	req, err := s.client.NewRequest(http.MethodGet, "license", nil, nil)
	if err != nil {
		return nil, nil, err
	}
	l := new(License)
	resp, err := s.client.Do(req, l)
	if err != nil {
		return nil, resp, err
	}
	return l, resp, err
}
type AddLicenseOptions struct {
	License *string `url:"license" json:"license"`
}