บริการตัวแทนจำหน่าย Google Workspace สำหรับ Admin SDK
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บริการ Admin SDK Google Workspace Reseller ช่วยให้
คุณใช้ Admin SDK Reseller API ใน
Google Apps Script ได้ โดย API นี้อนุญาตให้ผู้ดูแลระบบตัวแทนจำหน่ายที่ได้รับอนุญาตสามารถสั่งซื้อให้ลูกค้าและจัดการการสมัครใช้บริการ Google Workspace แบบรายเดือนที่ชำระเงินภายหลังได้
/** * Logs the list of subscriptions, including the customer ID, date created, plan * name, and the sku ID. Notice the use of page tokens to access the full list * of results. * @see https://developers.google.com/admin-sdk/reseller/reference/rest/v1/subscriptions/list */functiongetSubscriptions(){letresult;letpageToken;do{result=AdminReseller.Subscriptions.list({pageToken:pageToken,});for(constsubofresult.subscriptions){constcreationDate=newDate();creationDate.setUTCSeconds(sub.creationTime);console.log("customer ID: %s, date created: %s, plan name: %s, sku id: %s",sub.customerId,creationDate.toDateString(),sub.plan.planName,sub.skuId,);}pageToken=result.nextPageToken;}while(pageToken);}