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

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/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:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResellerService

Returns a new instance of ResellerService.



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

def initialize
  super('https://reseller.googleapis.com/', '')
  @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.



39
40
41
# File 'generated/google/apis/reseller_v1/service.rb', line 39

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.



44
45
46
# File 'generated/google/apis/reseller_v1/service.rb', line 44

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

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



309
310
311
312
313
314
315
316
317
318
# File 'generated/google/apis/reseller_v1/service.rb', line 309

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

Update 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.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



352
353
354
355
356
357
358
359
360
361
362
363
# File 'generated/google/apis/reseller_v1/service.rb', line 352

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

Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



396
397
398
399
400
401
402
403
404
405
406
407
# File 'generated/google/apis/reseller_v1/service.rb', line 396

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

Update a subscription's user license settings.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



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

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.

Cancel, suspend, or transfer a subscription to direct.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



484
485
486
487
488
489
490
491
492
# File 'generated/google/apis/reseller_v1/service.rb', line 484

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

Get a customer account.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



74
75
76
77
78
79
80
81
82
# File 'generated/google/apis/reseller_v1/service.rb', line 74

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

Get a specific subscription.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



523
524
525
526
527
528
529
530
531
532
# File 'generated/google/apis/reseller_v1/service.rb', line 523

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



211
212
213
214
215
216
217
218
# File 'generated/google/apis/reseller_v1/service.rb', line 211

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

Order a new customer's 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



109
110
111
112
113
114
115
116
117
118
119
# File 'generated/google/apis/reseller_v1/service.rb', line 109

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, customer_auth_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription

Create or transfer a subscription.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • subscription_object (Google::Apis::ResellerV1::Subscription) (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



564
565
566
567
568
569
570
571
572
573
574
575
# File 'generated/google/apis/reseller_v1/service.rb', line 564

def insert_subscription(customer_id, subscription_object = nil, customer_auth_token: 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['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

#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

List 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.

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)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'generated/google/apis/reseller_v1/service.rb', line 621

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

Patch a customer account's settings via Apiary Patch Orchestration

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



145
146
147
148
149
150
151
152
153
154
155
# File 'generated/google/apis/reseller_v1/service.rb', line 145

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



240
241
242
243
244
245
246
247
248
# File 'generated/google/apis/reseller_v1/service.rb', line 240

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.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



665
666
667
668
669
670
671
672
673
674
# File 'generated/google/apis/reseller_v1/service.rb', line 665

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.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



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

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



270
271
272
273
274
275
276
277
278
# File 'generated/google/apis/reseller_v1/service.rb', line 270

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

Update a customer account's settings.

Parameters:

  • customer_id (String)

    Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.

  • 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



181
182
183
184
185
186
187
188
189
190
191
# File 'generated/google/apis/reseller_v1/service.rb', line 181

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