Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Reseller

import { Reseller } from "https://googleapis.deno.dev/v1/reseller:v1.ts";

Perform common functions that are available on the Channel Services console at scale, like placing orders and viewing customer information

class Reseller {
constructor(client?: CredentialsClient, baseUrl?: string);
async customersGet(customerId: string): Promise<Customer>;
async customersInsert(req: Customer, opts?: CustomersInsertOptions): Promise<Customer>;
async customersPatch(customerId: string, req: Customer): Promise<Customer>;
async customersUpdate(customerId: string, req: Customer): Promise<Customer>;
async resellernotifyGetwatchdetails(): Promise<ResellernotifyGetwatchdetailsResponse>;
async resellernotifyRegister(opts?: ResellernotifyRegisterOptions): Promise<ResellernotifyResource>;
async resellernotifyUnregister(opts?: ResellernotifyUnregisterOptions): Promise<ResellernotifyResource>;
async subscriptionsActivate(customerId: string, subscriptionId: string): Promise<Subscription>;
async subscriptionsChangePlan(
customerId: string,
subscriptionId: string,
): Promise<Subscription>;
async subscriptionsChangeRenewalSettings(
customerId: string,
subscriptionId: string,
): Promise<Subscription>;
async subscriptionsChangeSeats(
customerId: string,
subscriptionId: string,
req: Seats,
): Promise<Subscription>;
async subscriptionsDelete(
customerId: string,
subscriptionId: string,
): Promise<void>;
async subscriptionsGet(customerId: string, subscriptionId: string): Promise<Subscription>;
async subscriptionsInsert(
customerId: string,
): Promise<Subscription>;
async subscriptionsList(opts?: SubscriptionsListOptions): Promise<Subscriptions>;
async subscriptionsStartPaidService(customerId: string, subscriptionId: string): Promise<Subscription>;
async subscriptionsSuspend(customerId: string, subscriptionId: string): Promise<Subscription>;
}

§Constructors

§
new Reseller(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
customersGet(customerId: string): Promise<Customer>
[src]

Gets a customer account. Use this operation to see a customer account already in your reseller management, or to see the minimal account information for an existing customer that you do not manage. For more information about the API response for existing customers, see retrieving a customer account.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

§
customersInsert(req: Customer, opts?: CustomersInsertOptions): Promise<Customer>
[src]

Orders a new customer's account. Before ordering a new customer account, establish whether the customer account already exists using the customers.get If the customer account exists as a direct Google account or as a resold customer account from another reseller, use the customerAuthToken\ as described in order a resold account for an existing customer. For more information about ordering a new customer account, see order a new customer account. After creating a new customer account, you must provision a user as an administrator. The customer's administrator is required to sign in to the Admin console and sign the G Suite via Reseller agreement to activate the account. Resellers are prohibited from signing the G Suite via Reseller agreement on the customer's behalf. For more information, see order a new customer account.

§
customersPatch(customerId: string, req: Customer): Promise<Customer>
[src]

Updates a customer account's settings. This method supports patch semantics. You cannot update customerType via the Reseller API, but a "team" customer can verify their domain and become customerType = "domain". For more information, see Verify your domain to unlock Essentials features.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

§
customersUpdate(customerId: string, req: Customer): Promise<Customer>
[src]

Updates a customer account's settings. You cannot update customerType via the Reseller API, but a "team" customer can verify their domain and become customerType = "domain". For more information, see update a customer's settings.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

§
resellernotifyGetwatchdetails(): Promise<ResellernotifyGetwatchdetailsResponse>
[src]

Returns all the details of the watch corresponding to the reseller.

§
resellernotifyRegister(opts?: ResellernotifyRegisterOptions): Promise<ResellernotifyResource>
[src]

Registers a Reseller for receiving notifications.

§
resellernotifyUnregister(opts?: ResellernotifyUnregisterOptions): Promise<ResellernotifyResource>
[src]

Unregisters a Reseller for receiving notifications.

§
subscriptionsActivate(customerId: string, subscriptionId: string): Promise<Subscription>
[src]

Activates a subscription previously suspended by the reseller. If you did not suspend the customer subscription and it is suspended for any other reason, such as for abuse or a pending ToS acceptance, this call will not reactivate the customer subscription.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsChangePlan(customerId: string, subscriptionId: string, req: ChangePlanRequest): Promise<Subscription>
[src]

Updates a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments. How a plan is updated differs depending on the plan and the products. For more information, see the description in manage subscriptions.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsChangeRenewalSettings(customerId: string, subscriptionId: string, req: RenewalSettings): Promise<Subscription>
[src]

Updates a user license's renewal settings. This is applicable for accounts with annual commitment plans only. For more information, see the description in manage subscriptions.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsChangeSeats(customerId: string, subscriptionId: string, req: Seats): Promise<Subscription>
[src]

Updates a subscription's user license settings. For more information about updating an annual commitment plan or a flexible plan subscription’s licenses, see Manage Subscriptions.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsDelete(customerId: string, subscriptionId: string, opts?: SubscriptionsDeleteOptions): Promise<void>
[src]

Cancels, suspends, or transfers a subscription to direct.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsGet(customerId: string, subscriptionId: string): Promise<Subscription>
[src]

Gets a specific subscription. The subscriptionId can be found using the Retrieve all reseller subscriptions method. For more information about retrieving a specific subscription, see the information descrived in manage subscriptions.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsInsert(customerId: string, req: Subscription, opts?: SubscriptionsInsertOptions): Promise<Subscription>
[src]

Creates or transfer a subscription. Create a subscription for a customer's account that you ordered using the Order a new customer account method. For more information about creating a subscription for different payment plans, see manage subscriptions.
If you did not order the customer's account using the customer insert method, use the customer's customerAuthToken when creating a subscription for that customer. If transferring a G Suite subscription with an associated Google Drive or Google Vault subscription, use the batch operation to transfer all of these subscriptions. For more information, see how to transfer subscriptions.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

§
subscriptionsList(opts?: SubscriptionsListOptions): Promise<Subscriptions>
[src]

Lists of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions. Optionally, this method can filter the response by a customerNamePrefix. For more information, see manage subscriptions.

§
subscriptionsStartPaidService(customerId: string, subscriptionId: string): Promise<Subscription>
[src]

Immediately move a 30-day free trial subscription to a paid service subscription. This method is only applicable if a payment plan has already been set up for the 30-day trial subscription. For more information, see manage subscriptions.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.

§
subscriptionsSuspend(customerId: string, subscriptionId: string): Promise<Subscription>
[src]

Suspends an active subscription. You can use this method to suspend a paid subscription that is currently in the ACTIVE state. * For FLEXIBLE subscriptions, billing is paused. * For ANNUAL_MONTHLY_PAY or ANNUAL_YEARLY_PAY subscriptions: * Suspending the subscription does not change the renewal date that was originally committed to. * A suspended subscription does not renew. If you activate the subscription after the original renewal date, a new annual subscription will be created, starting on the day of activation. We strongly encourage you to suspend subscriptions only for short periods of time as suspensions over 60 days may result in the subscription being cancelled.

@param customerId

This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.

@param subscriptionId

This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.