@@ -28,6 +28,11 @@ type ResponseJamfAppCatalogDeploymentCreateAndUpdate struct {
2828 Href string `json:"href"`
2929}
3030
31+ type ResponseJamfAppCatalogDeploymentTermsAndConditionsStatus struct {
32+ Accepted bool `json:"accepted"`
33+ AcceptanceTime string `json:"acceptanceTime"`
34+ }
35+
3136// Resource
3237
3338type ResourceJamfAppCatalogAppInstaller struct {
@@ -61,13 +66,12 @@ type JamfAppCatalogAppInstallerSubsetMediaSource struct {
6166
6267// Struct which represents AppInstallers object JSON from Pro API
6368type ResourceJamfAppCatalogDeployment struct {
64- ID string `json:"id"`
65- Name string `json:"name,omitempty"`
66- Enabled * bool `json:"enabled"`
67- AppTitleId string `json:"appTitleId,omitempty"`
68- DeploymentType string `json:"deploymentType,omitempty"`
69- UpdateBehavior string `json:"updateBehavior,omitempty"`
70- // TODO why is this not the object?
69+ ID string `json:"id"`
70+ Name string `json:"name,omitempty"`
71+ Enabled * bool `json:"enabled"`
72+ AppTitleId string `json:"appTitleId,omitempty"`
73+ DeploymentType string `json:"deploymentType,omitempty"`
74+ UpdateBehavior string `json:"updateBehavior,omitempty"`
7175 CategoryId string `json:"categoryId,omitempty"`
7276 SiteId string `json:"siteId,omitempty"`
7377 SmartGroupId string `json:"smartGroupId,omitempty"`
@@ -110,6 +114,40 @@ type JamfAppCatalogDeploymentSubsetCategory struct {
110114
111115// CRUD
112116
117+ // GetJamfAppCatalogAppInstallerTermsAndConditionsStatus returns the terms and conditions status for the Jamf App Catalog
118+ func (c * Client ) GetJamfAppCatalogAppInstallerTermsAndConditionsStatus () (* ResponseJamfAppCatalogDeploymentTermsAndConditionsStatus , error ) {
119+ endpoint := fmt .Sprintf ("%s/terms-and-conditions" , uriJamfAppCatalogAppInstaller )
120+
121+ var globalSettings ResponseJamfAppCatalogDeploymentTermsAndConditionsStatus
122+ resp , err := c .HTTP .DoRequest ("GET" , endpoint , nil , & globalSettings )
123+ if err != nil {
124+ return nil , fmt .Errorf (errMsgFailedGet , "printers" , err )
125+ }
126+
127+ if resp != nil && resp .Body != nil {
128+ defer resp .Body .Close ()
129+ }
130+
131+ return & globalSettings , nil
132+ }
133+
134+ // AcceptJamfAppCatalogAppInstallerTermsAndConditions accepts the terms and conditions for the Jamf App Catalog
135+ // This is required on an account by account basis.
136+ func (c * Client ) AcceptJamfAppCatalogAppInstallerTermsAndConditions () error {
137+ endpoint := fmt .Sprintf ("%s/terms-and-conditions" , uriJamfAppCatalogAppInstaller )
138+
139+ resp , err := c .HTTP .DoRequest ("POST" , endpoint , nil , nil )
140+ if err != nil {
141+ return fmt .Errorf ("failed to accept terms and conditions: %v" , err )
142+ }
143+
144+ if resp != nil && resp .Body != nil {
145+ defer resp .Body .Close ()
146+ }
147+
148+ return nil
149+ }
150+
113151// Gets full list of Get Jamf App Catalog App Installer Titles & handles pagination
114152func (c * Client ) GetJamfAppCatalogAppInstallerTitles (sort_filter string ) (* ResponseJamfAppCatalogTitleList , error ) {
115153 resp , err := c .DoPaginatedGet (
0 commit comments