Class: Google::Apis::ResellerV1::ResellerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::ResellerV1::ResellerService
- Defined in:
- generated/google/apis/reseller_v1/service.rb
Overview
Enterprise Apps Reseller API
Creates and manages your customers and their subscriptions.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#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.
-
#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
Changes the plan of a subscription.
-
#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
Changes the renewal settings of a subscription.
-
#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
Changes the seats configuration of a subscription.
-
#delete_subscription(customer_id, subscription_id, deletion_type, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Cancels/Downgrades a subscription.
-
#get_customer(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Customer
Gets a customer resource if one exists and is owned by the reseller.
-
#get_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription
Gets a subscription of the customer.
-
#initialize ⇒ ResellerService
constructor
A new instance of ResellerService.
-
#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
Creates a customer resource if one does not already exist.
-
#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
Creates/Transfers a subscription for the customer.
-
#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
Lists subscriptions of a reseller, optionally filtered by a customer name prefix.
-
#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 resource if one it exists and is owned by the reseller.
-
#start_subscription_paid_service(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription
Starts paid service of a trial subscription.
-
#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.
-
#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 resource if one it exists and is owned by the reseller.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ ResellerService
Returns a new instance of ResellerService
51 52 53 |
# File 'generated/google/apis/reseller_v1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'apps/reseller/v1/') end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/reseller_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
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. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/reseller_v1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/reseller_v1/service.rb', line 49 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
232 233 234 235 236 237 238 239 240 241 242 |
# File 'generated/google/apis/reseller_v1/service.rb', line 232 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', ) 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
Changes the plan of a subscription
271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'generated/google/apis/reseller_v1/service.rb', line 271 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', ) 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
Changes the renewal settings of a subscription
312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'generated/google/apis/reseller_v1/service.rb', line 312 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', ) 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
Changes the seats configuration of a subscription
353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'generated/google/apis/reseller_v1/service.rb', line 353 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', ) 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.
Cancels/Downgrades a subscription.
395 396 397 398 399 400 401 402 403 404 |
# File 'generated/google/apis/reseller_v1/service.rb', line 395 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}', ) 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
Gets a customer resource if one exists and is owned by the reseller.
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}', ) 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
Gets a subscription of the customer.
432 433 434 435 436 437 438 439 440 441 442 |
# File 'generated/google/apis/reseller_v1/service.rb', line 432 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}', ) 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 |
#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
Creates a customer resource if one does not already exist.
116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'generated/google/apis/reseller_v1/service.rb', line 116 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', ) 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
Creates/Transfers a subscription for the customer.
472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'generated/google/apis/reseller_v1/service.rb', line 472 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', ) 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
Lists subscriptions of a reseller, optionally filtered by a customer name prefix.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'generated/google/apis/reseller_v1/service.rb', line 522 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', ) 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 resource if one it exists and is owned by the reseller. This method supports patch semantics.
155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'generated/google/apis/reseller_v1/service.rb', line 155 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}', ) 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 |
#start_subscription_paid_service(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Subscription
Starts paid service of a trial subscription
563 564 565 566 567 568 569 570 571 572 573 |
# File 'generated/google/apis/reseller_v1/service.rb', line 563 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', ) 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
601 602 603 604 605 606 607 608 609 610 611 |
# File 'generated/google/apis/reseller_v1/service.rb', line 601 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', ) 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 |
#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 resource if one it exists and is owned by the reseller.
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'generated/google/apis/reseller_v1/service.rb', line 193 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}', ) 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 |