Class: Google::Apis::CloudcommerceprocurementV1::CloudCommercePartnerProcurementServiceService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudcommerceprocurementV1::CloudCommercePartnerProcurementServiceService
- Defined in:
- lib/google/apis/cloudcommerceprocurement_v1/service.rb
Overview
Cloud Commerce Partner Procurement API
Partner API for the Cloud Commerce Procurement Service.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#approve_account(name, approve_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Grants an approval on an Account.
-
#approve_entitlement(name, approve_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Approves an entitlement that is in the EntitlementState.
-
#approve_provider_entitlement_plan_change(name, approve_entitlement_plan_change_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Approves an entitlement plan change that is in the EntitlementState.
-
#get_provider_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Account
Gets a requested Account resource.
-
#get_provider_entitlement(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Entitlement
Gets a requested Entitlement resource.
-
#initialize ⇒ CloudCommercePartnerProcurementServiceService
constructor
A new instance of CloudCommercePartnerProcurementServiceService.
-
#list_provider_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::ListAccountsResponse
Lists Accounts that the provider has access to.
-
#list_provider_entitlements(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::ListEntitlementsResponse
Lists Entitlements for which the provider has read access.
-
#patch_provider_entitlement(name, entitlement_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Entitlement
Updates an existing Entitlement.
-
#reject_account(name, reject_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Rejects an approval on an Account.
-
#reject_entitlement(name, reject_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Rejects an entitlement that is in the EntitlementState.
-
#reject_provider_entitlement_plan_change(name, reject_entitlement_plan_change_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Rejects an entitlement plan change that is in the EntitlementState.
-
#reset_account(name, reset_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Resets an Account and cancel all associated Entitlements.
-
#suspend_entitlement(name, suspend_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Requests suspension of an active Entitlement.
Constructor Details
#initialize ⇒ CloudCommercePartnerProcurementServiceService
Returns a new instance of CloudCommercePartnerProcurementServiceService.
45 46 47 48 49 50 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 45 def initialize super('https://cloudcommerceprocurement.googleapis.com/', '', client_name: 'google-apis-cloudcommerceprocurement_v1', client_version: Google::Apis::CloudcommerceprocurementV1::GEM_VERSION) @batch_path = 'batch' 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 'lib/google/apis/cloudcommerceprocurement_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.
43 44 45 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#approve_account(name, approve_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Grants an approval on an Account.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 73 def approve_account(name, approve_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:approve', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::ApproveAccountRequest::Representation command.request_object = approve_account_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#approve_entitlement(name, approve_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Approves an entitlement that is in the EntitlementState. ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource.
241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 241 def approve_entitlement(name, approve_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:approve', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::ApproveEntitlementRequest::Representation command.request_object = approve_entitlement_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#approve_provider_entitlement_plan_change(name, approve_entitlement_plan_change_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Approves an entitlement plan change that is in the EntitlementState. ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource.
276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 276 def approve_provider_entitlement_plan_change(name, approve_entitlement_plan_change_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:approvePlanChange', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::ApproveEntitlementPlanChangeRequest::Representation command.request_object = approve_entitlement_plan_change_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.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_provider_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Account
Gets a requested Account resource.
105 106 107 108 109 110 111 112 113 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 105 def get_provider_account(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudcommerceprocurementV1::Account::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Account command.params['name'] = name unless name.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_provider_entitlement(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Entitlement
Gets a requested Entitlement resource.
308 309 310 311 312 313 314 315 316 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 308 def get_provider_entitlement(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudcommerceprocurementV1::Entitlement::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Entitlement command.params['name'] = name unless name.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_provider_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::ListAccountsResponse
Lists Accounts that the provider has access to.
139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 139 def list_provider_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/accounts', ) command.response_representation = Google::Apis::CloudcommerceprocurementV1::ListAccountsResponse::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::ListAccountsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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 |
#list_provider_entitlements(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::ListEntitlementsResponse
Lists Entitlements for which the provider has read access.
366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 366 def list_provider_entitlements(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/entitlements', ) command.response_representation = Google::Apis::CloudcommerceprocurementV1::ListEntitlementsResponse::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::ListEntitlementsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.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_provider_entitlement(name, entitlement_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Entitlement
Updates an existing Entitlement.
404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 404 def patch_provider_entitlement(name, entitlement_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::Entitlement::Representation command.request_object = entitlement_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Entitlement::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Entitlement command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reject_account(name, reject_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Rejects an approval on an Account.
172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 172 def reject_account(name, reject_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:reject', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::RejectAccountRequest::Representation command.request_object = reject_account_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reject_entitlement(name, reject_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Rejects an entitlement that is in the EntitlementState. ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource.
440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 440 def reject_entitlement(name, reject_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:reject', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::RejectEntitlementRequest::Representation command.request_object = reject_entitlement_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reject_provider_entitlement_plan_change(name, reject_entitlement_plan_change_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Rejects an entitlement plan change that is in the EntitlementState. ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource.
475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 475 def reject_provider_entitlement_plan_change(name, reject_entitlement_plan_change_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:rejectPlanChange', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::RejectEntitlementPlanChangeRequest::Representation command.request_object = reject_entitlement_plan_change_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reset_account(name, reset_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Resets an Account and cancel all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.
206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 206 def reset_account(name, reset_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:reset', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::ResetAccountRequest::Representation command.request_object = reset_account_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.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_entitlement(name, suspend_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Empty
Requests suspension of an active Entitlement. This is not yet supported.
508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 508 def suspend_entitlement(name, suspend_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:suspend', ) command.request_representation = Google::Apis::CloudcommerceprocurementV1::SuspendEntitlementRequest::Representation command.request_object = suspend_entitlement_request_object command.response_representation = Google::Apis::CloudcommerceprocurementV1::Empty::Representation command.response_class = Google::Apis::CloudcommerceprocurementV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |