Class: Google::Apis::ResellerV1::ResellerService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/reseller_v1/service.rb

Overview

Google Workspace Reseller API

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

Examples:

require 'google/apis/reseller_v1'

Reseller = Google::Apis::ResellerV1 # Alias the module
service = Reseller::ResellerService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://reseller.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResellerService

Returns a new instance of ResellerService.



48
49
50
51
52
53
# File 'lib/google/apis/reseller_v1/service.rb', line 48

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-reseller_v1',
        client_version: Google::Apis::ResellerV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



41
42
43
# File 'lib/google/apis/reseller_v1/service.rb', line 41

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



46
47
48
# File 'lib/google/apis/reseller_v1/service.rb', line 46

def quota_user
  @quota_user
end

Instance Method Details

#activate_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



345
346
347
348
349
350
351
352
353
354
# File 'lib/google/apis/reseller_v1/service.rb', line 345

def activate_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/activate', options)
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#change_subscription_plan(customer_id, subscription_id, change_plan_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • change_plan_request_object (Google::Apis::ResellerV1::ChangePlanRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/google/apis/reseller_v1/service.rb', line 392

def change_subscription_plan(customer_id, subscription_id, change_plan_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan', options)
  command.request_representation = Google::Apis::ResellerV1::ChangePlanRequest::Representation
  command.request_object = change_plan_request_object
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#change_subscription_renewal_settings(customer_id, subscription_id, renewal_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • renewal_settings_object (Google::Apis::ResellerV1::RenewalSettings) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/google/apis/reseller_v1/service.rb', line 439

def change_subscription_renewal_settings(customer_id, subscription_id, renewal_settings_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings', options)
  command.request_representation = Google::Apis::ResellerV1::RenewalSettings::Representation
  command.request_object = renewal_settings_object
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#change_subscription_seats(customer_id, subscription_id, seats_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • seats_object (Google::Apis::ResellerV1::Seats) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/google/apis/reseller_v1/service.rb', line 486

def change_subscription_seats(customer_id, subscription_id, seats_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changeSeats', options)
  command.request_representation = Google::Apis::ResellerV1::Seats::Representation
  command.request_object = seats_object
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_subscription(customer_id, subscription_id, deletion_type, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Cancels, suspends, or transfers a subscription to direct.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • deletion_type (String)

    The deletionType query string enables the cancellation, downgrade, or suspension of a subscription.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



532
533
534
535
536
537
538
539
540
# File 'lib/google/apis/reseller_v1/service.rb', line 532

def delete_subscription(customer_id, subscription_id, deletion_type, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['deletionType'] = deletion_type unless deletion_type.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_customer(customer_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Customer

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.

Parameters:

  • customer_id (String)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



83
84
85
86
87
88
89
90
91
# File 'lib/google/apis/reseller_v1/service.rb', line 83

def get_customer(customer_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'apps/reseller/v1/customers/{customerId}', options)
  command.response_representation = Google::Apis::ResellerV1::Customer::Representation
  command.response_class = Google::Apis::ResellerV1::Customer
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



577
578
579
580
581
582
583
584
585
586
# File 'lib/google/apis/reseller_v1/service.rb', line 577

def get_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}', options)
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#getwatchdetails_resellernotify(fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::ResellernotifyGetwatchdetailsResponse

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

Parameters:

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



243
244
245
246
247
248
249
250
# File 'lib/google/apis/reseller_v1/service.rb', line 243

def getwatchdetails_resellernotify(fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'apps/reseller/v1/resellernotify/getwatchdetails', options)
  command.response_representation = Google::Apis::ResellerV1::ResellernotifyGetwatchdetailsResponse::Representation
  command.response_class = Google::Apis::ResellerV1::ResellernotifyGetwatchdetailsResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_customer(customer_object = nil, customer_auth_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Customer

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.

Parameters:

  • customer_object (Google::Apis::ResellerV1::Customer) (defaults to: nil)
  • customer_auth_token (String) (defaults to: nil)

    The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



132
133
134
135
136
137
138
139
140
141
142
# File 'lib/google/apis/reseller_v1/service.rb', line 132

def insert_customer(customer_object = nil, customer_auth_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers', options)
  command.request_representation = Google::Apis::ResellerV1::Customer::Representation
  command.request_object = customer_object
  command.response_representation = Google::Apis::ResellerV1::Customer::Representation
  command.response_class = Google::Apis::ResellerV1::Customer
  command.query['customerAuthToken'] = customer_auth_token unless customer_auth_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_subscription(customer_id, subscription_object = nil, action: nil, customer_auth_token: nil, source_sku_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_object (Google::Apis::ResellerV1::Subscription) (defaults to: nil)
  • action (String) (defaults to: nil)

    The intented insert action. The usage of this field is governed by certain policies which are being developed & tested currently. Hence, these might not work as intended. Once this is fully tested & available to consume, we will share more information about its usage, limitations and policy documentation.

  • customer_auth_token (String) (defaults to: nil)

    The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.

  • source_sku_id (String) (defaults to: nil)

    The sku_id of the existing subscription to be upgraded or downgraded. This is required when action is SWITCH. The usage of this field is governed by certain policies which are being developed & tested currently. Hence, these might not work as intended. Once this is fully tested & available to consume, we will share more information about its usage, limitations and policy documentation.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



641
642
643
644
645
646
647
648
649
650
651
652
653
654
# File 'lib/google/apis/reseller_v1/service.rb', line 641

def insert_subscription(customer_id, subscription_object = nil, action: nil, customer_auth_token: nil, source_sku_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions', options)
  command.request_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.request_object = subscription_object
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['action'] = action unless action.nil?
  command.query['customerAuthToken'] = customer_auth_token unless customer_auth_token.nil?
  command.query['sourceSkuId'] = source_sku_id unless source_sku_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_subscriptions(customer_auth_token: nil, customer_id: nil, customer_name_prefix: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscriptions

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.

Parameters:

  • customer_auth_token (String) (defaults to: nil)

    The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.

  • customer_id (String) (defaults to: nil)

    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.

  • customer_name_prefix (String) (defaults to: nil)

    When retrieving all of your subscriptions and filtering for specific customers, you can enter a prefix for a customer name. Using an example customer group that includes exam.com, example20.com and example.com: - exa -- Returns all customer names that start with 'exa' which could include exam.com , example20.com, and example.com. A name prefix is similar to using a regular expression's asterisk, exa*. - example -- Returns example20.com and example.com.

  • max_results (Fixnum) (defaults to: nil)

    When retrieving a large list, the maxResults is the maximum number of results per page. The nextPageToken value takes you to the next page. The default is 20.

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



704
705
706
707
708
709
710
711
712
713
714
715
716
# File 'lib/google/apis/reseller_v1/service.rb', line 704

def list_subscriptions(customer_auth_token: nil, customer_id: nil, customer_name_prefix: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'apps/reseller/v1/subscriptions', options)
  command.response_representation = Google::Apis::ResellerV1::Subscriptions::Representation
  command.response_class = Google::Apis::ResellerV1::Subscriptions
  command.query['customerAuthToken'] = customer_auth_token unless customer_auth_token.nil?
  command.query['customerId'] = customer_id unless customer_id.nil?
  command.query['customerNamePrefix'] = customer_name_prefix unless customer_name_prefix.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Customer

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.

Parameters:

  • customer_id (String)

    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.

  • customer_object (Google::Apis::ResellerV1::Customer) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



173
174
175
176
177
178
179
180
181
182
183
# File 'lib/google/apis/reseller_v1/service.rb', line 173

def patch_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'apps/reseller/v1/customers/{customerId}', options)
  command.request_representation = Google::Apis::ResellerV1::Customer::Representation
  command.request_object = customer_object
  command.response_representation = Google::Apis::ResellerV1::Customer::Representation
  command.response_class = Google::Apis::ResellerV1::Customer
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#register_resellernotify(service_account_email_address: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::ResellernotifyResource

Registers a Reseller for receiving notifications.

Parameters:

  • service_account_email_address (String) (defaults to: nil)

    The service account which will own the created Cloud-PubSub topic.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



272
273
274
275
276
277
278
279
280
# File 'lib/google/apis/reseller_v1/service.rb', line 272

def register_resellernotify(service_account_email_address: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/resellernotify/register', options)
  command.response_representation = Google::Apis::ResellerV1::ResellernotifyResource::Representation
  command.response_class = Google::Apis::ResellerV1::ResellernotifyResource
  command.query['serviceAccountEmailAddress'] =  unless .nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_subscription_paid_service(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



752
753
754
755
756
757
758
759
760
761
# File 'lib/google/apis/reseller_v1/service.rb', line 752

def start_subscription_paid_service(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/startPaidService', options)
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#suspend_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

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.

Parameters:

  • customer_id (String)

    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.

  • subscription_id (String)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



802
803
804
805
806
807
808
809
810
811
# File 'lib/google/apis/reseller_v1/service.rb', line 802

def suspend_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/suspend', options)
  command.response_representation = Google::Apis::ResellerV1::Subscription::Representation
  command.response_class = Google::Apis::ResellerV1::Subscription
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#unregister_resellernotify(service_account_email_address: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::ResellernotifyResource

Unregisters a Reseller for receiving notifications.

Parameters:

  • service_account_email_address (String) (defaults to: nil)

    The service account which owns the Cloud-PubSub topic.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



302
303
304
305
306
307
308
309
310
# File 'lib/google/apis/reseller_v1/service.rb', line 302

def unregister_resellernotify(service_account_email_address: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'apps/reseller/v1/resellernotify/unregister', options)
  command.response_representation = Google::Apis::ResellerV1::ResellernotifyResource::Representation
  command.response_class = Google::Apis::ResellerV1::ResellernotifyResource
  command.query['serviceAccountEmailAddress'] =  unless .nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Customer

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.

Parameters:

  • customer_id (String)

    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.

  • customer_object (Google::Apis::ResellerV1::Customer) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



213
214
215
216
217
218
219
220
221
222
223
# File 'lib/google/apis/reseller_v1/service.rb', line 213

def update_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'apps/reseller/v1/customers/{customerId}', options)
  command.request_representation = Google::Apis::ResellerV1::Customer::Representation
  command.request_object = customer_object
  command.response_representation = Google::Apis::ResellerV1::Customer::Representation
  command.response_class = Google::Apis::ResellerV1::Customer
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end