def doInfoCustomer():
cd = buildGAPIObject(API.DIRECTORY)
checkForExtraneousArguments()
try:
customerInfo = callGAPI(cd.customers(), u'get',
throw_reasons=[GAPI.BAD_REQUEST, GAPI.RESOURCE_NOT_FOUND, GAPI.FORBIDDEN],
customerKey=GC.Values[GC.CUSTOMER_ID])
printKeyValueList([u'Customer ID', customerInfo[u'id']])
printKeyValueList([u'Primary Domain', customerInfo[u'customerDomain']])
printKeyValueList([u'Customer Creation Time', formatLocalTime(customerInfo[u'customerCreationTime'])])
verified = callGAPI(cd.domains(), u'get',
customer=customerInfo[u'id'], domainName=customerInfo[u'customerDomain'], fields=u'verified')[u'verified']
printKeyValueList([u'Primary Domain Verified', verified])
printKeyValueList([u'Default Language', customerInfo[u'language']])
_showCustomerAddressPhoneNumber(customerInfo)
printKeyValueList([u'Admin Secondary Email', customerInfo[u'alternateEmail']])
_showCustomerLicenseInfo(customerInfo[u'id'])
except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden):
accessErrorExit(cd)
# gam update customer [primary <DomainName>] [adminsecondaryemail|alternateemail <EmailAddress>] [language <LanguageCode] [phone|phonenumber <String>]
# [contact|contactname <String>] [name|organizationname <String>]
# [address1|addressline1 <String>] [address2|addressline2 <String>] [address3|addressline3 <String>]
# [locality <String>] [region <String>] [postalcode <String>] [country|countrycode <String>]
评论列表
文章目录