reseller

package
v0.0.0-...-375ceb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package reseller provides access to the Enterprise Apps Reseller API.

See https://developers.google.com/google-apps/reseller/

Usage example:

import "google.golang.org/api/reseller/v1"
...
resellerService, err := reseller.New(oauthHttpClient)

Index

Constants

View Source
const (
	// Manage users on your domain
	AppsOrderScope = "https://www.googleapis.com/auth/apps.order"

	// Manage users on your domain
	AppsOrderReadonlyScope = "https://www.googleapis.com/auth/apps.order.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// AddressLine1: Address line 1 of the address.
	AddressLine1 string `json:"addressLine1,omitempty"`

	// AddressLine2: Address line 2 of the address.
	AddressLine2 string `json:"addressLine2,omitempty"`

	// AddressLine3: Address line 3 of the address.
	AddressLine3 string `json:"addressLine3,omitempty"`

	// ContactName: Name of the contact person.
	ContactName string `json:"contactName,omitempty"`

	// CountryCode: ISO 3166 country code.
	CountryCode string `json:"countryCode,omitempty"`

	// Kind: Identifies the resource as a customer address.
	Kind string `json:"kind,omitempty"`

	// Locality: Name of the locality. This is in accordance with -
	// http://portablecontacts.net/draft-spec.html#address_element.
	Locality string `json:"locality,omitempty"`

	// OrganizationName: Name of the organization.
	OrganizationName string `json:"organizationName,omitempty"`

	// PostalCode: The postal code. This is in accordance with -
	// http://portablecontacts.net/draft-spec.html#address_element.
	PostalCode string `json:"postalCode,omitempty"`

	// Region: Name of the region. This is in accordance with -
	// http://portablecontacts.net/draft-spec.html#address_element.
	Region string `json:"region,omitempty"`
}

Address: JSON template for address of a customer.

type ChangePlanRequest

type ChangePlanRequest struct {
	// Kind: Identifies the resource as a subscription change plan request.
	Kind string `json:"kind,omitempty"`

	// PlanName: Name of the plan to change to.
	PlanName string `json:"planName,omitempty"`

	// PurchaseOrderId: Purchase order id for your order tracking purposes.
	PurchaseOrderId string `json:"purchaseOrderId,omitempty"`

	// Seats: Number/Limit of seats in the new plan.
	Seats *Seats `json:"seats,omitempty"`
}

ChangePlanRequest: JSON template for the ChangePlan rpc request.

type Customer

type Customer struct {
	// AlternateEmail: The alternate email of the customer.
	AlternateEmail string `json:"alternateEmail,omitempty"`

	// CustomerDomain: The domain name of the customer.
	CustomerDomain string `json:"customerDomain,omitempty"`

	// CustomerId: The id of the customer.
	CustomerId string `json:"customerId,omitempty"`

	// Kind: Identifies the resource as a customer.
	Kind string `json:"kind,omitempty"`

	// PhoneNumber: The phone number of the customer.
	PhoneNumber string `json:"phoneNumber,omitempty"`

	// PostalAddress: The postal address of the customer.
	PostalAddress *Address `json:"postalAddress,omitempty"`

	// ResourceUiUrl: Ui url for customer resource.
	ResourceUiUrl string `json:"resourceUiUrl,omitempty"`
}

Customer: JSON template for a customer.

type CustomersGetCall

type CustomersGetCall struct {
	// contains filtered or unexported fields
}

func (*CustomersGetCall) Do

func (c *CustomersGetCall) Do() (*Customer, error)

func (*CustomersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CustomersInsertCall

type CustomersInsertCall struct {
	// contains filtered or unexported fields
}

func (*CustomersInsertCall) CustomerAuthToken

func (c *CustomersInsertCall) CustomerAuthToken(customerAuthToken string) *CustomersInsertCall

CustomerAuthToken sets the optional parameter "customerAuthToken": An auth token needed for inserting a customer for which domain already exists. Can be generated at https://www.google.com/a/cpanel//TransferToken.

func (*CustomersInsertCall) Do

func (c *CustomersInsertCall) Do() (*Customer, error)

func (*CustomersInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CustomersPatchCall

type CustomersPatchCall struct {
	// contains filtered or unexported fields
}

func (*CustomersPatchCall) Do

func (c *CustomersPatchCall) Do() (*Customer, error)

func (*CustomersPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CustomersService

type CustomersService struct {
	// contains filtered or unexported fields
}

func NewCustomersService

func NewCustomersService(s *Service) *CustomersService

func (*CustomersService) Get

func (r *CustomersService) Get(customerId string) *CustomersGetCall

Get: Gets a customer resource if one exists and is owned by the reseller.

func (*CustomersService) Insert

func (r *CustomersService) Insert(customer *Customer) *CustomersInsertCall

Insert: Creates a customer resource if one does not already exist.

func (*CustomersService) Patch

func (r *CustomersService) Patch(customerId string, customer *Customer) *CustomersPatchCall

Patch: Update a customer resource if one it exists and is owned by the reseller. This method supports patch semantics.

func (*CustomersService) Update

func (r *CustomersService) Update(customerId string, customer *Customer) *CustomersUpdateCall

Update: Update a customer resource if one it exists and is owned by the reseller.

type CustomersUpdateCall

type CustomersUpdateCall struct {
	// contains filtered or unexported fields
}

func (*CustomersUpdateCall) Do

func (c *CustomersUpdateCall) Do() (*Customer, error)

func (*CustomersUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type RenewalSettings

type RenewalSettings struct {
	// Kind: Identifies the resource as a subscription renewal setting.
	Kind string `json:"kind,omitempty"`

	// RenewalType: Subscription renewal type.
	RenewalType string `json:"renewalType,omitempty"`
}

RenewalSettings: JSON template for a subscription renewal settings.

type Seats

type Seats struct {
	// Kind: Identifies the resource as a subscription change plan request.
	Kind string `json:"kind,omitempty"`

	// LicensedNumberOfSeats: Read-only field containing the current number
	// of licensed seats for FLEXIBLE Google-Apps subscriptions and
	// secondary subscriptions such as Google-Vault and Drive-storage.
	LicensedNumberOfSeats int64 `json:"licensedNumberOfSeats,omitempty"`

	// MaximumNumberOfSeats: Maximum number of seats that can be purchased.
	// This needs to be provided only for a non-commitment plan. For a
	// commitment plan it is decided by the contract.
	MaximumNumberOfSeats int64 `json:"maximumNumberOfSeats,omitempty"`

	// NumberOfSeats: Number of seats to purchase. This is applicable only
	// for a commitment plan.
	NumberOfSeats int64 `json:"numberOfSeats,omitempty"`
}

Seats: JSON template for subscription seats.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Customers *CustomersService

	Subscriptions *SubscriptionsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Subscription

type Subscription struct {
	// BillingMethod: Billing method of this subscription.
	BillingMethod string `json:"billingMethod,omitempty"`

	// CreationTime: Creation time of this subscription in milliseconds
	// since Unix epoch.
	CreationTime int64 `json:"creationTime,omitempty,string"`

	// CustomerId: The id of the customer to whom the subscription belongs.
	CustomerId string `json:"customerId,omitempty"`

	// Kind: Identifies the resource as a Subscription.
	Kind string `json:"kind,omitempty"`

	// Plan: Plan details of the subscription
	Plan *SubscriptionPlan `json:"plan,omitempty"`

	// PurchaseOrderId: Purchase order id for your order tracking purposes.
	PurchaseOrderId string `json:"purchaseOrderId,omitempty"`

	// RenewalSettings: Renewal settings of the subscription.
	RenewalSettings *RenewalSettings `json:"renewalSettings,omitempty"`

	// ResourceUiUrl: Ui url for subscription resource.
	ResourceUiUrl string `json:"resourceUiUrl,omitempty"`

	// Seats: Number/Limit of seats in the new plan.
	Seats *Seats `json:"seats,omitempty"`

	// SkuId: Name of the sku for which this subscription is purchased.
	SkuId string `json:"skuId,omitempty"`

	// Status: Status of the subscription.
	Status string `json:"status,omitempty"`

	// SubscriptionId: The id of the subscription.
	SubscriptionId string `json:"subscriptionId,omitempty"`

	// SuspensionReasons: Suspension Reasons
	SuspensionReasons []string `json:"suspensionReasons,omitempty"`

	// TransferInfo: Transfer related information for the subscription.
	TransferInfo *SubscriptionTransferInfo `json:"transferInfo,omitempty"`

	// TrialSettings: Trial Settings of the subscription.
	TrialSettings *SubscriptionTrialSettings `json:"trialSettings,omitempty"`
}

Subscription: JSON template for a subscription.

type SubscriptionPlan

type SubscriptionPlan struct {
	// CommitmentInterval: Interval of the commitment if it is a commitment
	// plan.
	CommitmentInterval *SubscriptionPlanCommitmentInterval `json:"commitmentInterval,omitempty"`

	// IsCommitmentPlan: Whether the plan is a commitment plan or not.
	IsCommitmentPlan bool `json:"isCommitmentPlan,omitempty"`

	// PlanName: The plan name of this subscription's plan.
	PlanName string `json:"planName,omitempty"`
}

SubscriptionPlan: Plan details of the subscription

type SubscriptionPlanCommitmentInterval

type SubscriptionPlanCommitmentInterval struct {
	// EndTime: End time of the commitment interval in milliseconds since
	// Unix epoch.
	EndTime int64 `json:"endTime,omitempty,string"`

	// StartTime: Start time of the commitment interval in milliseconds
	// since Unix epoch.
	StartTime int64 `json:"startTime,omitempty,string"`
}

SubscriptionPlanCommitmentInterval: Interval of the commitment if it is a commitment plan.

type SubscriptionTransferInfo

type SubscriptionTransferInfo struct {
	MinimumTransferableSeats int64 `json:"minimumTransferableSeats,omitempty"`

	// TransferabilityExpirationTime: Time when transfer token or intent to
	// transfer will expire.
	TransferabilityExpirationTime int64 `json:"transferabilityExpirationTime,omitempty,string"`
}

SubscriptionTransferInfo: Transfer related information for the subscription.

type SubscriptionTrialSettings

type SubscriptionTrialSettings struct {
	// IsInTrial: Whether the subscription is in trial.
	IsInTrial bool `json:"isInTrial,omitempty"`

	// TrialEndTime: End time of the trial in milliseconds since Unix epoch.
	TrialEndTime int64 `json:"trialEndTime,omitempty,string"`
}

SubscriptionTrialSettings: Trial Settings of the subscription.

type Subscriptions

type Subscriptions struct {
	// Kind: Identifies the resource as a collection of subscriptions.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: The continuation token, used to page through large
	// result sets. Provide this value in a subsequent request to return the
	// next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Subscriptions: The subscriptions in this page of results.
	Subscriptions []*Subscription `json:"subscriptions,omitempty"`
}

Subscriptions: JSON template for a subscription list.

type SubscriptionsActivateCall

type SubscriptionsActivateCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsActivateCall) Do

func (*SubscriptionsActivateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsChangePlanCall

type SubscriptionsChangePlanCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsChangePlanCall) Do

func (*SubscriptionsChangePlanCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsChangeRenewalSettingsCall

type SubscriptionsChangeRenewalSettingsCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsChangeRenewalSettingsCall) Do

func (*SubscriptionsChangeRenewalSettingsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsChangeSeatsCall

type SubscriptionsChangeSeatsCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsChangeSeatsCall) Do

func (*SubscriptionsChangeSeatsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsDeleteCall

type SubscriptionsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsDeleteCall) Do

func (*SubscriptionsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsGetCall

type SubscriptionsGetCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsGetCall) Do

func (*SubscriptionsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsInsertCall

type SubscriptionsInsertCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsInsertCall) CustomerAuthToken

func (c *SubscriptionsInsertCall) CustomerAuthToken(customerAuthToken string) *SubscriptionsInsertCall

CustomerAuthToken sets the optional parameter "customerAuthToken": An auth token needed for transferring a subscription. Can be generated at https://www.google.com/a/cpanel/customer-domain/TransferToken.

func (*SubscriptionsInsertCall) Do

func (*SubscriptionsInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsListCall

type SubscriptionsListCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsListCall) CustomerAuthToken

func (c *SubscriptionsListCall) CustomerAuthToken(customerAuthToken string) *SubscriptionsListCall

CustomerAuthToken sets the optional parameter "customerAuthToken": An auth token needed if the customer is not a resold customer of this reseller. Can be generated at https://www.google.com/a/cpanel/customer-domain/TransferToken.

func (*SubscriptionsListCall) CustomerId

func (c *SubscriptionsListCall) CustomerId(customerId string) *SubscriptionsListCall

CustomerId sets the optional parameter "customerId": Id of the Customer

func (*SubscriptionsListCall) CustomerNamePrefix

func (c *SubscriptionsListCall) CustomerNamePrefix(customerNamePrefix string) *SubscriptionsListCall

CustomerNamePrefix sets the optional parameter "customerNamePrefix": Prefix of the customer's domain name by which the subscriptions should be filtered. Optional

func (*SubscriptionsListCall) Do

func (*SubscriptionsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SubscriptionsListCall) MaxResults

func (c *SubscriptionsListCall) MaxResults(maxResults int64) *SubscriptionsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of results to return

func (*SubscriptionsListCall) PageToken

func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall

PageToken sets the optional parameter "pageToken": Token to specify next page in the list

type SubscriptionsService

type SubscriptionsService struct {
	// contains filtered or unexported fields
}

func NewSubscriptionsService

func NewSubscriptionsService(s *Service) *SubscriptionsService

func (*SubscriptionsService) Activate

func (r *SubscriptionsService) Activate(customerId string, subscriptionId string) *SubscriptionsActivateCall

Activate: Activates a subscription previously suspended by the reseller

func (*SubscriptionsService) ChangePlan

func (r *SubscriptionsService) ChangePlan(customerId string, subscriptionId string, changeplanrequest *ChangePlanRequest) *SubscriptionsChangePlanCall

ChangePlan: Changes the plan of a subscription

func (*SubscriptionsService) ChangeRenewalSettings

func (r *SubscriptionsService) ChangeRenewalSettings(customerId string, subscriptionId string, renewalsettings *RenewalSettings) *SubscriptionsChangeRenewalSettingsCall

ChangeRenewalSettings: Changes the renewal settings of a subscription

func (*SubscriptionsService) ChangeSeats

func (r *SubscriptionsService) ChangeSeats(customerId string, subscriptionId string, seats *Seats) *SubscriptionsChangeSeatsCall

ChangeSeats: Changes the seats configuration of a subscription

func (*SubscriptionsService) Delete

func (r *SubscriptionsService) Delete(customerId string, subscriptionId string, deletionType string) *SubscriptionsDeleteCall

Delete: Cancels/Downgrades a subscription.

func (*SubscriptionsService) Get

func (r *SubscriptionsService) Get(customerId string, subscriptionId string) *SubscriptionsGetCall

Get: Gets a subscription of the customer.

func (*SubscriptionsService) Insert

func (r *SubscriptionsService) Insert(customerId string, subscription *Subscription) *SubscriptionsInsertCall

Insert: Creates/Transfers a subscription for the customer.

func (*SubscriptionsService) List

List: Lists subscriptions of a reseller, optionally filtered by a customer name prefix.

func (*SubscriptionsService) StartPaidService

func (r *SubscriptionsService) StartPaidService(customerId string, subscriptionId string) *SubscriptionsStartPaidServiceCall

StartPaidService: Starts paid service of a trial subscription

func (*SubscriptionsService) Suspend

func (r *SubscriptionsService) Suspend(customerId string, subscriptionId string) *SubscriptionsSuspendCall

Suspend: Suspends an active subscription

type SubscriptionsStartPaidServiceCall

type SubscriptionsStartPaidServiceCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsStartPaidServiceCall) Do

func (*SubscriptionsStartPaidServiceCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type SubscriptionsSuspendCall

type SubscriptionsSuspendCall struct {
	// contains filtered or unexported fields
}

func (*SubscriptionsSuspendCall) Do

func (*SubscriptionsSuspendCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL