Class: Google::Apis::CloudcommerceprocurementV1::CloudCommercePartnerProcurementServiceService

Inherits:
Google::Apis::Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/cloudcommerceprocurement_v1/service.rb

Overview

Cloud Commerce Partner Procurement API

Partner API for the Cloud Commerce Procurement Service.

Examples:

require 'google/apis/cloudcommerceprocurement_v1'

Cloudcommerceprocurement = Google::Apis::CloudcommerceprocurementV1 # Alias the module
service = Cloudcommerceprocurement::CloudCommercePartnerProcurementServiceService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://cloudcommerceprocurement.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCloudCommercePartnerProcurementServiceService

Returns a new instance of CloudCommercePartnerProcurementServiceService.



47
48
49
50
51
52
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-cloudcommerceprocurement_v1',
        client_version: Google::Apis::CloudcommerceprocurementV1::GEM_VERSION)
  @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.



40
41
42
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 40

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.



45
46
47
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 45

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.

Parameters:

  • name (String)

    Required. The resource name of the account, with the format providers/ providerId/accounts/accountId``.

  • approve_account_request_object (Google::Apis::CloudcommerceprocurementV1::ApproveAccountRequest) (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



76
77
78
79
80
81
82
83
84
85
86
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 76

def (name,  = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:approve', options)
  command.request_representation = Google::Apis::CloudcommerceprocurementV1::ApproveAccountRequest::Representation
  command.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.

Parameters:

  • name (String)

    Required. The resource name of the entitlement, with the format providers/ providerId/entitlements/entitlementId``.

  • approve_entitlement_request_object (Google::Apis::CloudcommerceprocurementV1::ApproveEntitlementRequest) (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



249
250
251
252
253
254
255
256
257
258
259
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 249

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', options)
  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.

Parameters:

  • name (String)

    Required. The resource name of the entitlement.

  • approve_entitlement_plan_change_request_object (Google::Apis::CloudcommerceprocurementV1::ApproveEntitlementPlanChangeRequest) (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



284
285
286
287
288
289
290
291
292
293
294
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 284

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', options)
  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, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudcommerceprocurementV1::Account

Gets a requested Account resource.

Parameters:

  • name (String)

    Required. The name of the account to retrieve.

  • view (String) (defaults to: nil)

    Optional. What information to include in the response.

  • 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



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

def (name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::CloudcommerceprocurementV1::Account::Representation
  command.response_class = Google::Apis::CloudcommerceprocurementV1::Account
  command.params['name'] = name unless name.nil?
  command.query['view'] = view unless view.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.

Parameters:

  • name (String)

    Required. The name of the entitlement to retrieve.

  • 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



316
317
318
319
320
321
322
323
324
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 316

def get_provider_entitlement(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  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.

Parameters:

  • parent (String)

    Required. The parent resource name.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of entries that are requested. The default page size is 25 and the maximum page size is 200.

  • page_token (String) (defaults to: nil)

    The token for fetching the next page.

  • 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



146
147
148
149
150
151
152
153
154
155
156
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 146

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', options)
  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.

Parameters:

  • parent (String)

    Required. The parent resource name.

  • filter (String) (defaults to: nil)

    The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example account=E-1234-5678-ABCD-EFGH, state=pending_cancellation, and plan!=foo-plan. Supported query attributes are * account * customer_billing_account with value in the format of: billingAccounts/id`* product_external_name*quote_external_name*offer* new_pending_offer*plan*newPendingPlanornew_pending_plan*state`

    • services * consumers.project * change_history.new_offer Note that the consumers and change_history.new_offer match works on repeated structures, so equality (consumers.project=projects/123456789) is not supported. Set membership can be expressed with the : operator. For example, consumers. project:projects/123456789 finds entitlements with at least one consumer with project field equal to projects/123456789. change_history.new_offer retrieves all entitlements that were once associated or are currently active with the offer. Also note that the state name match is case-insensitive and query can omit the prefix "ENTITLEMENT_". For example, state=active is equivalent to state=ENTITLEMENT_ACTIVE. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, product="providerId:productId", where the product name needs to be quoted because it contains special character colon. Queries can be combined with AND, OR, and NOT to form more complex queries. They can also be grouped to force a desired evaluation order. For example, state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product). Connective AND can be omitted between two predicates. For example account=E-1234 state=active is equivalent to account=E-1234 AND state=active.
  • page_size (Fixnum) (defaults to: nil)

    The maximum number of entries that are requested. The default page size is 200.

  • page_token (String) (defaults to: nil)

    The token for fetching the next page.

  • 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



377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 377

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', options)
  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.

Parameters:

  • name (String)

    Required. The name of the entitlement to update.

  • entitlement_object (Google::Apis::CloudcommerceprocurementV1::Entitlement) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The update mask that applies to the resource. See the FieldMask definition for more details.

  • 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



415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 415

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}', options)
  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.

Parameters:

  • name (String)

    Required. The resource name of the account.

  • reject_account_request_object (Google::Apis::CloudcommerceprocurementV1::RejectAccountRequest) (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



179
180
181
182
183
184
185
186
187
188
189
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 179

def (name,  = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:reject', options)
  command.request_representation = Google::Apis::CloudcommerceprocurementV1::RejectAccountRequest::Representation
  command.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.

Parameters:

  • name (String)

    Required. The resource name of the entitlement.

  • reject_entitlement_request_object (Google::Apis::CloudcommerceprocurementV1::RejectEntitlementRequest) (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



451
452
453
454
455
456
457
458
459
460
461
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 451

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', options)
  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.

Parameters:

  • name (String)

    Required. The resource name of the entitlement.

  • reject_entitlement_plan_change_request_object (Google::Apis::CloudcommerceprocurementV1::RejectEntitlementPlanChangeRequest) (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



486
487
488
489
490
491
492
493
494
495
496
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 486

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', options)
  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 cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.

Parameters:

  • name (String)

    Required. The resource name of the account.

  • reset_account_request_object (Google::Apis::CloudcommerceprocurementV1::ResetAccountRequest) (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



213
214
215
216
217
218
219
220
221
222
223
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 213

def (name,  = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:reset', options)
  command.request_representation = Google::Apis::CloudcommerceprocurementV1::ResetAccountRequest::Representation
  command.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.

Parameters:

  • name (String)

    Required. The name of the entitlement to suspend.

  • suspend_entitlement_request_object (Google::Apis::CloudcommerceprocurementV1::SuspendEntitlementRequest) (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



519
520
521
522
523
524
525
526
527
528
529
# File 'lib/google/apis/cloudcommerceprocurement_v1/service.rb', line 519

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', options)
  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