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

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/reseller_v1/service.rb

Overview

Enterprise Apps Reseller API

Creates and manages your customers and their subscriptions.

Examples:

require 'google/apis/reseller_v1'

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

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeResellerService


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

def initialize
  super('https://www.googleapis.com/', 'apps/reseller/v1/')
  @batch_path = 'batch/reseller/v1'
end

Instance Attribute Details

#keyString


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

def key
  @key
end

#quota_userString


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

def quota_user
  @quota_user
end

#user_ipString


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

def user_ip
  @user_ip
end

Instance Method Details

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

Activates a subscription previously suspended by the reseller

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


335
336
337
338
339
340
341
342
343
344
345
# File 'generated/google/apis/reseller_v1/service.rb', line 335

def activate_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'generated/google/apis/reseller_v1/service.rb', line 381

def change_subscription_plan(customer_id, subscription_id, change_plan_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'generated/google/apis/reseller_v1/service.rb', line 428

def change_subscription_renewal_settings(customer_id, subscription_id, renewal_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Update a subscription's user license settings.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'generated/google/apis/reseller_v1/service.rb', line 474

def change_subscription_seats(customer_id, subscription_id, seats_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

This method returns an undefined value.

Cancel, suspend or transfer a subscription to direct.

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:


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

def delete_subscription(customer_id, subscription_id, deletion_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Get a customer account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


79
80
81
82
83
84
85
86
87
88
# File 'generated/google/apis/reseller_v1/service.rb', line 79

def get_customer(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Get a specific subscription.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


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

def get_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


228
229
230
231
232
233
234
235
236
# File 'generated/google/apis/reseller_v1/service.rb', line 228

def getwatchdetails_resellernotify(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Order a new customer's account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


117
118
119
120
121
122
123
124
125
126
127
128
# File 'generated/google/apis/reseller_v1/service.rb', line 117

def insert_customer(customer_object = nil, customer_auth_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Create or transfer a subscription.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'generated/google/apis/reseller_v1/service.rb', line 608

def insert_subscription(customer_id, subscription_object = nil, customer_auth_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


669
670
671
672
673
674
675
676
677
678
679
680
681
682
# File 'generated/google/apis/reseller_v1/service.rb', line 669

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, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Update a customer account's settings. This method supports patch semantics.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


156
157
158
159
160
161
162
163
164
165
166
167
# File 'generated/google/apis/reseller_v1/service.rb', line 156

def patch_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Registers a Reseller for receiving notifications.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


260
261
262
263
264
265
266
267
268
269
# File 'generated/google/apis/reseller_v1/service.rb', line 260

def register_resellernotify(service_account_email_address: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Immediately move a 30-day free trial subscription to a paid service subscription.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


716
717
718
719
720
721
722
723
724
725
726
# File 'generated/google/apis/reseller_v1/service.rb', line 716

def start_subscription_paid_service(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Suspends an active subscription.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


759
760
761
762
763
764
765
766
767
768
769
# File 'generated/google/apis/reseller_v1/service.rb', line 759

def suspend_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Unregisters a Reseller for receiving notifications.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


293
294
295
296
297
298
299
300
301
302
# File 'generated/google/apis/reseller_v1/service.rb', line 293

def unregister_resellernotify(service_account_email_address: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Update a customer account's settings.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


195
196
197
198
199
200
201
202
203
204
205
206
# File 'generated/google/apis/reseller_v1/service.rb', line 195

def update_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end