/** * List Admin SDK reseller. * @see https://developers.google.com/admin-sdk/reseller/reference/rest/v1/subscriptions/list */functionlistSubscriptions(){constoptionalArgs={maxResults:10};try{constresponse=AdminReseller.Subscriptions.list(optionalArgs);constsubscriptions=response.subscriptions;if(!subscriptions||subscriptions.length===0){console.log('Nosubscriptionsfound.');return;}console.log('Subscriptions:');for(constsubscriptionofsubscriptions){console.log('%s(%s,%s)',subscription.customerId,subscription.skuId,subscription.plan.planName);}}catch(err){// TODO (developer)- Handle exception from the Reseller APIconsole.log('Failedwitherror%s',err.message);}}
[null,null,["最后更新时间 (UTC):2025-01-29。"],[[["This quickstart demonstrates how to use Google Apps Script to interact with the Google Workspace Reseller API."],["You will learn to set up a script, enable the Reseller API, and run the script to list subscriptions for a reseller domain."],["Before starting, ensure you have a Google Reseller domain, a partner agreement, and access to Google Drive."],["This quickstart uses simplified authentication suitable for testing environments; for production, review Google's authentication and authorization guides for best practices."],["Further resources on Google Apps Script, Reseller API, and reference documentation are provided to expand your knowledge."]]],[]]