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
Update a subscription plan.
-
#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.
-
#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.
-
#delete_subscription(customer_id, subscription_id, deletion_type, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Cancel, suspend or transfer a subscription to direct.
-
#get_customer(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ResellerV1::Customer
Get a customer account.
-
#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.
-
#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.
-
#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
Order a new customer's account.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ ResellerService
Returns a new instance of ResellerService
51 52 53 54 |
# File 'generated/google/apis/reseller_v1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'apps/reseller/v1/') @batch_path = 'batch/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
353 354 355 356 357 358 359 360 361 362 363 |
# File 'generated/google/apis/reseller_v1/service.rb', line 353 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
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.
401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'generated/google/apis/reseller_v1/service.rb', line 401 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
Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only.
450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'generated/google/apis/reseller_v1/service.rb', line 450 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
Update a subscription's user license settings.
498 499 500 501 502 503 504 505 506 507 508 509 510 |
# File 'generated/google/apis/reseller_v1/service.rb', line 498 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.
Cancel, suspend or transfer a subscription to direct.
548 549 550 551 552 553 554 555 556 557 |
# File 'generated/google/apis/reseller_v1/service.rb', line 548 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
Get a customer account.
83 84 85 86 87 88 89 90 91 92 |
# File 'generated/google/apis/reseller_v1/service.rb', line 83 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
Get a specific subscription.
592 593 594 595 596 597 598 599 600 601 602 |
# File 'generated/google/apis/reseller_v1/service.rb', line 592 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 |
#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.
240 241 242 243 244 245 246 247 248 |
# File 'generated/google/apis/reseller_v1/service.rb', line 240 def getwatchdetails_resellernotify(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'resellernotify/getwatchdetails', ) 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.
123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'generated/google/apis/reseller_v1/service.rb', line 123 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
Create or transfer a subscription.
638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'generated/google/apis/reseller_v1/service.rb', line 638 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
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.
701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'generated/google/apis/reseller_v1/service.rb', line 701 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 account's settings. This method supports patch semantics.
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'generated/google/apis/reseller_v1/service.rb', line 164 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 |
#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.
274 275 276 277 278 279 280 281 282 283 |
# File 'generated/google/apis/reseller_v1/service.rb', line 274 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', ) command.response_representation = Google::Apis::ResellerV1::ResellernotifyResource::Representation command.response_class = Google::Apis::ResellerV1::ResellernotifyResource command.query['serviceAccountEmailAddress'] = service_account_email_address unless service_account_email_address.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.
750 751 752 753 754 755 756 757 758 759 760 |
# File 'generated/google/apis/reseller_v1/service.rb', line 750 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.
795 796 797 798 799 800 801 802 803 804 805 |
# File 'generated/google/apis/reseller_v1/service.rb', line 795 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 |
#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.
309 310 311 312 313 314 315 316 317 318 |
# File 'generated/google/apis/reseller_v1/service.rb', line 309 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', ) command.response_representation = Google::Apis::ResellerV1::ResellernotifyResource::Representation command.response_class = Google::Apis::ResellerV1::ResellernotifyResource command.query['serviceAccountEmailAddress'] = service_account_email_address unless service_account_email_address.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.
205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'generated/google/apis/reseller_v1/service.rb', line 205 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 |