#' Retrieves a customer.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{http://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.customer
#' \item https://www.googleapis.com/auth/admin.directory.customer.readonly
#' }
#' @param customerKey Id of the customer to be retrieved
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
customers.get <- function(customerKey, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.customers.get']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.customers.get']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' NA
#'
#' NA Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{http://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.customer
#' }
#' @param customerKey Id of the customer to be updated
#' @param language The customer's ISO 639-2 language code. See the [Language Codes](/admin-sdk/directory/v1/languages) page for the list of supported codes. Valid language codes outside the supported set will be accepted by the API but may lead to unexpected behavior. The default value is `en`.
#' @param id The unique ID for the customer's Google Workspace account. (Readonly)
#' @param kind Identifies the resource as a customer. Value: `admin#directory#customer`
#' @param customerCreationTime The customer's creation time (Readonly)
#' @param alternateEmail The customer's secondary contact email address. This email address cannot be on the same domain as the `customerDomain`
#' @param phoneNumber The customer's contact phone number in [E.164](http://en.wikipedia.org/wiki/E.164) format.
#' @param postalAddress The customer's postal address information.
#' @param customerDomain The customer's primary domain name string. Do not include the `www` prefix when creating a new customer.
#' @param etag ETag of the resource.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
customers.patch <- function(customerKey, language = NULL, id = NULL, kind = NULL, customerCreationTime = NULL, alternateEmail = NULL, phoneNumber = NULL, postalAddress = NULL, customerDomain = NULL, etag = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.customers.patch']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.customers.patch']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Updates a customer.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{http://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.customer
#' }
#' @param customerKey Id of the customer to be updated
#' @param language The customer's ISO 639-2 language code. See the [Language Codes](/admin-sdk/directory/v1/languages) page for the list of supported codes. Valid language codes outside the supported set will be accepted by the API but may lead to unexpected behavior. The default value is `en`.
#' @param id The unique ID for the customer's Google Workspace account. (Readonly)
#' @param kind Identifies the resource as a customer. Value: `admin#directory#customer`
#' @param customerCreationTime The customer's creation time (Readonly)
#' @param alternateEmail The customer's secondary contact email address. This email address cannot be on the same domain as the `customerDomain`
#' @param phoneNumber The customer's contact phone number in [E.164](http://en.wikipedia.org/wiki/E.164) format.
#' @param postalAddress The customer's postal address information.
#' @param customerDomain The customer's primary domain name string. Do not include the `www` prefix when creating a new customer.
#' @param etag ETag of the resource.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
customers.update <- function(customerKey, language = NULL, id = NULL, kind = NULL, customerCreationTime = NULL, alternateEmail = NULL, phoneNumber = NULL, postalAddress = NULL, customerDomain = NULL, etag = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.customers.update']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.customers.update']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.