google-cloud-channel-v1 0.9.4 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/channel/v1/channel_partner_links_pb.rb +2 -2
- data/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +1435 -223
- data/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb +38 -0
- data/lib/google/cloud/channel/v1/common_pb.rb +2 -2
- data/lib/google/cloud/channel/v1/customers_pb.rb +2 -2
- data/lib/google/cloud/channel/v1/entitlements_pb.rb +2 -3
- data/lib/google/cloud/channel/v1/offers_pb.rb +2 -2
- data/lib/google/cloud/channel/v1/operations_pb.rb +0 -1
- data/lib/google/cloud/channel/v1/products_pb.rb +2 -2
- data/lib/google/cloud/channel/v1/repricing_pb.rb +69 -0
- data/lib/google/cloud/channel/v1/service_pb.rb +62 -1
- data/lib/google/cloud/channel/v1/service_services_pb.rb +238 -0
- data/lib/google/cloud/channel/v1/subscriber_event_pb.rb +2 -2
- data/lib/google/cloud/channel/v1/version.rb +1 -1
- data/lib/google/cloud/channel/v1.rb +2 -0
- data/proto_docs/google/cloud/channel/v1/entitlements.rb +5 -3
- data/proto_docs/google/cloud/channel/v1/repricing.rb +148 -0
- data/proto_docs/google/cloud/channel/v1/service.rb +191 -0
- data/proto_docs/google/cloud/channel/v1/subscriber_event.rb +3 -3
- data/proto_docs/google/protobuf/any.rb +3 -3
- data/proto_docs/google/type/date.rb +53 -0
- data/proto_docs/google/type/decimal.rb +96 -0
- metadata +6 -3
- data/proto_docs/google/protobuf/wrappers.rb +0 -121
@@ -224,7 +224,7 @@ module Google
|
|
224
224
|
# @param options [::Gapic::CallOptions, ::Hash]
|
225
225
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
226
226
|
#
|
227
|
-
# @overload list_customers(parent: nil, page_size: nil, page_token: nil)
|
227
|
+
# @overload list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
228
228
|
# Pass arguments to `list_customers` via keyword arguments. Note that at
|
229
229
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
230
230
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -241,6 +241,10 @@ module Google
|
|
241
241
|
# Obtained through
|
242
242
|
# {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} of the previous
|
243
243
|
# {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} call.
|
244
|
+
# @param filter [::String]
|
245
|
+
# Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See
|
246
|
+
# https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers
|
247
|
+
# for more information.
|
244
248
|
#
|
245
249
|
# @yield [response, operation] Access the result along with the RPC operation
|
246
250
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>]
|
@@ -3313,42 +3317,46 @@ module Google
|
|
3313
3317
|
end
|
3314
3318
|
|
3315
3319
|
##
|
3316
|
-
#
|
3320
|
+
# Gets information about how a Reseller modifies their bill before sending
|
3321
|
+
# it to a Customer.
|
3317
3322
|
#
|
3318
|
-
# Possible
|
3323
|
+
# Possible Error Codes:
|
3319
3324
|
#
|
3320
|
-
# * PERMISSION_DENIED:
|
3321
|
-
#
|
3322
|
-
# * NOT_FOUND:
|
3325
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3326
|
+
# being queried are different.
|
3327
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} was not found.
|
3328
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3329
|
+
# backend. In this case, contact Cloud Channel support.
|
3323
3330
|
#
|
3324
|
-
# Return
|
3325
|
-
#
|
3331
|
+
# Return Value:
|
3332
|
+
# If successful, the {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} resource, otherwise returns
|
3333
|
+
# an error.
|
3326
3334
|
#
|
3327
|
-
# @overload
|
3328
|
-
# Pass arguments to `
|
3329
|
-
# {::Google::Cloud::Channel::V1::
|
3335
|
+
# @overload get_customer_repricing_config(request, options = nil)
|
3336
|
+
# Pass arguments to `get_customer_repricing_config` via a request object, either of type
|
3337
|
+
# {::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest} or an equivalent Hash.
|
3330
3338
|
#
|
3331
|
-
# @param request [::Google::Cloud::Channel::V1::
|
3339
|
+
# @param request [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, ::Hash]
|
3332
3340
|
# A request object representing the call parameters. Required. To specify no
|
3333
3341
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3334
3342
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3335
3343
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3336
3344
|
#
|
3337
|
-
# @overload
|
3338
|
-
# Pass arguments to `
|
3345
|
+
# @overload get_customer_repricing_config(name: nil)
|
3346
|
+
# Pass arguments to `get_customer_repricing_config` via keyword arguments. Note that at
|
3339
3347
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3340
3348
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3341
3349
|
#
|
3342
|
-
# @param
|
3343
|
-
# Required. The resource name of the
|
3344
|
-
#
|
3345
|
-
# accounts/\\{account_id}/customers/\\{customer_id}/
|
3350
|
+
# @param name [::String]
|
3351
|
+
# Required. The resource name of the CustomerRepricingConfig.
|
3352
|
+
# Format:
|
3353
|
+
# accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}.
|
3346
3354
|
#
|
3347
3355
|
# @yield [response, operation] Access the result along with the RPC operation
|
3348
|
-
# @yieldparam response [::Google::Cloud::Channel::V1::
|
3356
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3349
3357
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3350
3358
|
#
|
3351
|
-
# @return [::Google::Cloud::Channel::V1::
|
3359
|
+
# @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3352
3360
|
#
|
3353
3361
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3354
3362
|
#
|
@@ -3359,24 +3367,24 @@ module Google
|
|
3359
3367
|
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3360
3368
|
#
|
3361
3369
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3362
|
-
# request = Google::Cloud::Channel::V1::
|
3370
|
+
# request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new
|
3363
3371
|
#
|
3364
|
-
# # Call the
|
3365
|
-
# result = client.
|
3372
|
+
# # Call the get_customer_repricing_config method.
|
3373
|
+
# result = client.get_customer_repricing_config request
|
3366
3374
|
#
|
3367
|
-
# # The returned object is of type Google::Cloud::Channel::V1::
|
3375
|
+
# # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3368
3376
|
# p result
|
3369
3377
|
#
|
3370
|
-
def
|
3378
|
+
def get_customer_repricing_config request, options = nil
|
3371
3379
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3372
3380
|
|
3373
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::
|
3381
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest
|
3374
3382
|
|
3375
3383
|
# Converts hash and nil to an options object
|
3376
3384
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3377
3385
|
|
3378
3386
|
# Customize the options with defaults
|
3379
|
-
metadata = @config.rpcs.
|
3387
|
+
metadata = @config.rpcs.get_customer_repricing_config.metadata.to_h
|
3380
3388
|
|
3381
3389
|
# Set x-goog-api-client and x-goog-user-project headers
|
3382
3390
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3385,22 +3393,22 @@ module Google
|
|
3385
3393
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3386
3394
|
|
3387
3395
|
header_params = {}
|
3388
|
-
if request.
|
3389
|
-
header_params["
|
3396
|
+
if request.name
|
3397
|
+
header_params["name"] = request.name
|
3390
3398
|
end
|
3391
3399
|
|
3392
3400
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3393
3401
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3394
3402
|
|
3395
|
-
options.apply_defaults timeout: @config.rpcs.
|
3403
|
+
options.apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout,
|
3396
3404
|
metadata: metadata,
|
3397
|
-
retry_policy: @config.rpcs.
|
3405
|
+
retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy
|
3398
3406
|
|
3399
3407
|
options.apply_defaults timeout: @config.timeout,
|
3400
3408
|
metadata: @config.metadata,
|
3401
3409
|
retry_policy: @config.retry_policy
|
3402
3410
|
|
3403
|
-
@cloud_channel_service_stub.call_rpc :
|
3411
|
+
@cloud_channel_service_stub.call_rpc :get_customer_repricing_config, request, options: options do |response, operation|
|
3404
3412
|
yield response, operation if block_given?
|
3405
3413
|
return response
|
3406
3414
|
end
|
@@ -3409,46 +3417,71 @@ module Google
|
|
3409
3417
|
end
|
3410
3418
|
|
3411
3419
|
##
|
3412
|
-
# Lists
|
3420
|
+
# Lists information about how a Reseller modifies their bill before sending
|
3421
|
+
# it to a Customer.
|
3413
3422
|
#
|
3414
|
-
# Possible
|
3423
|
+
# Possible Error Codes:
|
3415
3424
|
#
|
3416
|
-
# *
|
3425
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3426
|
+
# being queried are different.
|
3427
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} specified does not exist or is
|
3428
|
+
# not associated with the given account.
|
3429
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3430
|
+
# backend. In this case, contact Cloud Channel support.
|
3417
3431
|
#
|
3418
|
-
#
|
3419
|
-
#
|
3420
|
-
#
|
3432
|
+
# Return Value:
|
3433
|
+
# If successful, the {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} resources. The
|
3434
|
+
# data for each resource is displayed in the ascending order of:
|
3435
|
+
# * customer ID
|
3436
|
+
# * {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}
|
3437
|
+
# * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}
|
3438
|
+
# * {::Google::Cloud::Channel::V1::CustomerRepricingConfig#update_time CustomerRepricingConfig.update_time}
|
3421
3439
|
#
|
3422
|
-
#
|
3440
|
+
# If unsuccessful, returns an error.
|
3441
|
+
#
|
3442
|
+
# @overload list_customer_repricing_configs(request, options = nil)
|
3443
|
+
# Pass arguments to `list_customer_repricing_configs` via a request object, either of type
|
3444
|
+
# {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest} or an equivalent Hash.
|
3445
|
+
#
|
3446
|
+
# @param request [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, ::Hash]
|
3423
3447
|
# A request object representing the call parameters. Required. To specify no
|
3424
3448
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3425
3449
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3426
3450
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3427
3451
|
#
|
3428
|
-
# @overload
|
3429
|
-
# Pass arguments to `
|
3452
|
+
# @overload list_customer_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
3453
|
+
# Pass arguments to `list_customer_repricing_configs` via keyword arguments. Note that at
|
3430
3454
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3431
3455
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3432
3456
|
#
|
3433
|
-
# @param
|
3434
|
-
# Required. The resource name of the
|
3435
|
-
#
|
3457
|
+
# @param parent [::String]
|
3458
|
+
# Required. The resource name of the customer.
|
3459
|
+
# Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id}.
|
3460
|
+
# Supports accounts/\\{account_id}/customers/- to retrieve configs for all
|
3461
|
+
# customers.
|
3436
3462
|
# @param page_size [::Integer]
|
3437
|
-
# Optional.
|
3438
|
-
# If unspecified, returns
|
3439
|
-
#
|
3463
|
+
# Optional. The maximum number of repricing configs to return. The service may return
|
3464
|
+
# fewer than this value. If unspecified, returns a maximum of 50 rules. The
|
3465
|
+
# maximum value is 100; values above 100 will be coerced to 100.
|
3440
3466
|
# @param page_token [::String]
|
3441
|
-
# Optional. A token
|
3442
|
-
#
|
3443
|
-
#
|
3444
|
-
#
|
3445
|
-
#
|
3467
|
+
# Optional. A token identifying a page of results beyond the first page.
|
3468
|
+
# Obtained through
|
3469
|
+
# {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} of the previous
|
3470
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} call.
|
3471
|
+
# @param filter [::String]
|
3472
|
+
# Optional. A filter for [CloudChannelService.ListCustomerRepricingConfigs]
|
3473
|
+
# results (customer only). You can use this filter when you support
|
3474
|
+
# a BatchGet-like query.
|
3475
|
+
# To use the filter, you must set `parent=accounts/{account_id}/customers/-`.
|
3476
|
+
#
|
3477
|
+
# Example: customer = accounts/account_id/customers/c1 OR
|
3478
|
+
# customer = accounts/account_id/customers/c2.
|
3446
3479
|
#
|
3447
3480
|
# @yield [response, operation] Access the result along with the RPC operation
|
3448
|
-
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::
|
3481
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>]
|
3449
3482
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3450
3483
|
#
|
3451
|
-
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::
|
3484
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>]
|
3452
3485
|
#
|
3453
3486
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3454
3487
|
#
|
@@ -3459,30 +3492,30 @@ module Google
|
|
3459
3492
|
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3460
3493
|
#
|
3461
3494
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3462
|
-
# request = Google::Cloud::Channel::V1::
|
3495
|
+
# request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new
|
3463
3496
|
#
|
3464
|
-
# # Call the
|
3465
|
-
# result = client.
|
3497
|
+
# # Call the list_customer_repricing_configs method.
|
3498
|
+
# result = client.list_customer_repricing_configs request
|
3466
3499
|
#
|
3467
3500
|
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3468
3501
|
# # iterate over all elements by calling #each, and the enumerable
|
3469
3502
|
# # will lazily make API calls to fetch subsequent pages. Other
|
3470
3503
|
# # methods are also available for managing paging directly.
|
3471
3504
|
# result.each do |response|
|
3472
|
-
# # Each element is of type ::Google::Cloud::Channel::V1::
|
3505
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3473
3506
|
# p response
|
3474
3507
|
# end
|
3475
3508
|
#
|
3476
|
-
def
|
3509
|
+
def list_customer_repricing_configs request, options = nil
|
3477
3510
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3478
3511
|
|
3479
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::
|
3512
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest
|
3480
3513
|
|
3481
3514
|
# Converts hash and nil to an options object
|
3482
3515
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3483
3516
|
|
3484
3517
|
# Customize the options with defaults
|
3485
|
-
metadata = @config.rpcs.
|
3518
|
+
metadata = @config.rpcs.list_customer_repricing_configs.metadata.to_h
|
3486
3519
|
|
3487
3520
|
# Set x-goog-api-client and x-goog-user-project headers
|
3488
3521
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3490,16 +3523,24 @@ module Google
|
|
3490
3523
|
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3491
3524
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3492
3525
|
|
3493
|
-
|
3526
|
+
header_params = {}
|
3527
|
+
if request.parent
|
3528
|
+
header_params["parent"] = request.parent
|
3529
|
+
end
|
3530
|
+
|
3531
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3532
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3533
|
+
|
3534
|
+
options.apply_defaults timeout: @config.rpcs.list_customer_repricing_configs.timeout,
|
3494
3535
|
metadata: metadata,
|
3495
|
-
retry_policy: @config.rpcs.
|
3536
|
+
retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy
|
3496
3537
|
|
3497
3538
|
options.apply_defaults timeout: @config.timeout,
|
3498
3539
|
metadata: @config.metadata,
|
3499
3540
|
retry_policy: @config.retry_policy
|
3500
3541
|
|
3501
|
-
@cloud_channel_service_stub.call_rpc :
|
3502
|
-
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :
|
3542
|
+
@cloud_channel_service_stub.call_rpc :list_customer_repricing_configs, request, options: options do |response, operation|
|
3543
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, request, response, operation, options
|
3503
3544
|
yield response, operation if block_given?
|
3504
3545
|
return response
|
3505
3546
|
end
|
@@ -3508,51 +3549,71 @@ module Google
|
|
3508
3549
|
end
|
3509
3550
|
|
3510
3551
|
##
|
3511
|
-
#
|
3512
|
-
#
|
3513
|
-
#
|
3514
|
-
#
|
3515
|
-
#
|
3516
|
-
#
|
3517
|
-
#
|
3518
|
-
#
|
3519
|
-
#
|
3520
|
-
#
|
3521
|
-
#
|
3552
|
+
# Creates a CustomerRepricingConfig. Call this method to set modifications
|
3553
|
+
# for a specific customer's bill. You can only create configs if the
|
3554
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} is a
|
3555
|
+
# future month. If needed, you can create a config for the current month,
|
3556
|
+
# with some restrictions.
|
3557
|
+
#
|
3558
|
+
# When creating a config for a future month, make sure there are no existing
|
3559
|
+
# configs for that
|
3560
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
3561
|
+
#
|
3562
|
+
# The following restrictions are for creating configs in the current month.
|
3563
|
+
#
|
3564
|
+
# * This functionality is reserved for recovering from an erroneous config,
|
3565
|
+
# and should not be used for regular business cases.
|
3566
|
+
# * The new config will not modify exports used with other configs.
|
3567
|
+
# Changes to the config may be immediate, but may take up to 24 hours.
|
3568
|
+
# * There is a limit of ten configs for any
|
3569
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}
|
3570
|
+
# or {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
3571
|
+
# * The contained {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config} vaule must be
|
3572
|
+
# different from the value used in the current config for a
|
3573
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}.
|
3574
|
+
#
|
3575
|
+
# Possible Error Codes:
|
3576
|
+
#
|
3577
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3578
|
+
# being queried are different.
|
3579
|
+
# * INVALID_ARGUMENT: Missing or invalid required parameters in the
|
3580
|
+
# request. Also displays if the updated config is for the current month or
|
3581
|
+
# past months.
|
3582
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} specified does not exist or is
|
3583
|
+
# not associated with the given account.
|
3584
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3585
|
+
# backend. In this case, contact Cloud Channel support.
|
3586
|
+
#
|
3587
|
+
# Return Value:
|
3588
|
+
# If successful, the updated {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} resource, otherwise
|
3589
|
+
# returns an error.
|
3590
|
+
#
|
3591
|
+
# @overload create_customer_repricing_config(request, options = nil)
|
3592
|
+
# Pass arguments to `create_customer_repricing_config` via a request object, either of type
|
3593
|
+
# {::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest} or an equivalent Hash.
|
3594
|
+
#
|
3595
|
+
# @param request [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, ::Hash]
|
3522
3596
|
# A request object representing the call parameters. Required. To specify no
|
3523
3597
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3524
3598
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3525
3599
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3526
3600
|
#
|
3527
|
-
# @overload
|
3528
|
-
# Pass arguments to `
|
3601
|
+
# @overload create_customer_repricing_config(parent: nil, customer_repricing_config: nil)
|
3602
|
+
# Pass arguments to `create_customer_repricing_config` via keyword arguments. Note that at
|
3529
3603
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3530
3604
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3531
3605
|
#
|
3532
3606
|
# @param parent [::String]
|
3533
|
-
# Required. The resource name of the
|
3534
|
-
# Parent uses the format:
|
3535
|
-
#
|
3536
|
-
#
|
3537
|
-
# Required. Resource name of the reseller.
|
3538
|
-
# Format: accounts/\\{account_id}.
|
3539
|
-
# @param page_size [::Integer]
|
3540
|
-
# Optional. Requested page size. Server might return fewer results than requested.
|
3541
|
-
# If unspecified, returns at most 100 SKUs.
|
3542
|
-
# The maximum value is 1000; the server will coerce values above 1000.
|
3543
|
-
# @param page_token [::String]
|
3544
|
-
# Optional. A token for a page of results other than the first page.
|
3545
|
-
# Optional.
|
3546
|
-
# @param language_code [::String]
|
3547
|
-
# Optional. The BCP-47 language code. For example, "en-US". The
|
3548
|
-
# response will localize in the corresponding language code, if specified.
|
3549
|
-
# The default value is "en-US".
|
3607
|
+
# Required. The resource name of the customer that will receive this repricing config.
|
3608
|
+
# Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id}
|
3609
|
+
# @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash]
|
3610
|
+
# Required. The CustomerRepricingConfig object to update.
|
3550
3611
|
#
|
3551
3612
|
# @yield [response, operation] Access the result along with the RPC operation
|
3552
|
-
# @yieldparam response [::
|
3613
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3553
3614
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3554
3615
|
#
|
3555
|
-
# @return [::
|
3616
|
+
# @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3556
3617
|
#
|
3557
3618
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3558
3619
|
#
|
@@ -3563,30 +3624,24 @@ module Google
|
|
3563
3624
|
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3564
3625
|
#
|
3565
3626
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3566
|
-
# request = Google::Cloud::Channel::V1::
|
3627
|
+
# request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new
|
3567
3628
|
#
|
3568
|
-
# # Call the
|
3569
|
-
# result = client.
|
3629
|
+
# # Call the create_customer_repricing_config method.
|
3630
|
+
# result = client.create_customer_repricing_config request
|
3570
3631
|
#
|
3571
|
-
# # The returned object is of type
|
3572
|
-
#
|
3573
|
-
# # will lazily make API calls to fetch subsequent pages. Other
|
3574
|
-
# # methods are also available for managing paging directly.
|
3575
|
-
# result.each do |response|
|
3576
|
-
# # Each element is of type ::Google::Cloud::Channel::V1::Sku.
|
3577
|
-
# p response
|
3578
|
-
# end
|
3632
|
+
# # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3633
|
+
# p result
|
3579
3634
|
#
|
3580
|
-
def
|
3635
|
+
def create_customer_repricing_config request, options = nil
|
3581
3636
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3582
3637
|
|
3583
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::
|
3638
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest
|
3584
3639
|
|
3585
3640
|
# Converts hash and nil to an options object
|
3586
3641
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3587
3642
|
|
3588
3643
|
# Customize the options with defaults
|
3589
|
-
metadata = @config.rpcs.
|
3644
|
+
metadata = @config.rpcs.create_customer_repricing_config.metadata.to_h
|
3590
3645
|
|
3591
3646
|
# Set x-goog-api-client and x-goog-user-project headers
|
3592
3647
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3602,16 +3657,15 @@ module Google
|
|
3602
3657
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3603
3658
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3604
3659
|
|
3605
|
-
options.apply_defaults timeout: @config.rpcs.
|
3660
|
+
options.apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout,
|
3606
3661
|
metadata: metadata,
|
3607
|
-
retry_policy: @config.rpcs.
|
3662
|
+
retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy
|
3608
3663
|
|
3609
3664
|
options.apply_defaults timeout: @config.timeout,
|
3610
3665
|
metadata: @config.metadata,
|
3611
3666
|
retry_policy: @config.retry_policy
|
3612
3667
|
|
3613
|
-
@cloud_channel_service_stub.call_rpc :
|
3614
|
-
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, request, response, operation, options
|
3668
|
+
@cloud_channel_service_stub.call_rpc :create_customer_repricing_config, request, options: options do |response, operation|
|
3615
3669
|
yield response, operation if block_given?
|
3616
3670
|
return response
|
3617
3671
|
end
|
@@ -3620,52 +3674,59 @@ module Google
|
|
3620
3674
|
end
|
3621
3675
|
|
3622
3676
|
##
|
3623
|
-
#
|
3677
|
+
# Updates a CustomerRepricingConfig. Call this method to set modifications
|
3678
|
+
# for a specific customer's bill. This method overwrites the existing
|
3679
|
+
# CustomerRepricingConfig.
|
3624
3680
|
#
|
3625
|
-
#
|
3681
|
+
# You can only update configs if the
|
3682
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} is a
|
3683
|
+
# future month. To make changes to configs for the current month, use
|
3684
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config CreateCustomerRepricingConfig}, taking note of its restrictions. You
|
3685
|
+
# cannot update the {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
3626
3686
|
#
|
3627
|
-
#
|
3687
|
+
# When updating a config in the future:
|
3628
3688
|
#
|
3629
|
-
#
|
3630
|
-
# Pass arguments to `list_offers` via a request object, either of type
|
3631
|
-
# {::Google::Cloud::Channel::V1::ListOffersRequest} or an equivalent Hash.
|
3689
|
+
# * This config must already exist.
|
3632
3690
|
#
|
3633
|
-
#
|
3691
|
+
# Possible Error Codes:
|
3692
|
+
#
|
3693
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3694
|
+
# being queried are different.
|
3695
|
+
# * INVALID_ARGUMENT: Missing or invalid required parameters in the
|
3696
|
+
# request. Also displays if the updated config is for the current month or
|
3697
|
+
# past months.
|
3698
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} specified does not exist or is
|
3699
|
+
# not associated with the given account.
|
3700
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3701
|
+
# backend. In this case, contact Cloud Channel support.
|
3702
|
+
#
|
3703
|
+
# Return Value:
|
3704
|
+
# If successful, the updated {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} resource, otherwise
|
3705
|
+
# returns an error.
|
3706
|
+
#
|
3707
|
+
# @overload update_customer_repricing_config(request, options = nil)
|
3708
|
+
# Pass arguments to `update_customer_repricing_config` via a request object, either of type
|
3709
|
+
# {::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest} or an equivalent Hash.
|
3710
|
+
#
|
3711
|
+
# @param request [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, ::Hash]
|
3634
3712
|
# A request object representing the call parameters. Required. To specify no
|
3635
3713
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3636
3714
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3637
3715
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3638
3716
|
#
|
3639
|
-
# @overload
|
3640
|
-
# Pass arguments to `
|
3717
|
+
# @overload update_customer_repricing_config(customer_repricing_config: nil)
|
3718
|
+
# Pass arguments to `update_customer_repricing_config` via keyword arguments. Note that at
|
3641
3719
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3642
3720
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3643
3721
|
#
|
3644
|
-
# @param
|
3645
|
-
# Required. The
|
3646
|
-
# Parent uses the format: accounts/\\{account_id}.
|
3647
|
-
# @param page_size [::Integer]
|
3648
|
-
# Optional. Requested page size. Server might return fewer results than requested.
|
3649
|
-
# If unspecified, returns at most 500 Offers.
|
3650
|
-
# The maximum value is 1000; the server will coerce values above 1000.
|
3651
|
-
# @param page_token [::String]
|
3652
|
-
# Optional. A token for a page of results other than the first page.
|
3653
|
-
# @param filter [::String]
|
3654
|
-
# Optional. The expression to filter results by name (name of
|
3655
|
-
# the Offer), sku.name (name of the SKU), or sku.product.name (name of the
|
3656
|
-
# Product).
|
3657
|
-
# Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
|
3658
|
-
# Example 2: name=accounts/a1/offers/o1
|
3659
|
-
# @param language_code [::String]
|
3660
|
-
# Optional. The BCP-47 language code. For example, "en-US". The
|
3661
|
-
# response will localize in the corresponding language code, if specified.
|
3662
|
-
# The default value is "en-US".
|
3722
|
+
# @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash]
|
3723
|
+
# Required. The CustomerRepricingConfig object to update.
|
3663
3724
|
#
|
3664
3725
|
# @yield [response, operation] Access the result along with the RPC operation
|
3665
|
-
# @yieldparam response [::
|
3726
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3666
3727
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3667
3728
|
#
|
3668
|
-
# @return [::
|
3729
|
+
# @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3669
3730
|
#
|
3670
3731
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3671
3732
|
#
|
@@ -3676,30 +3737,24 @@ module Google
|
|
3676
3737
|
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3677
3738
|
#
|
3678
3739
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3679
|
-
# request = Google::Cloud::Channel::V1::
|
3740
|
+
# request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new
|
3680
3741
|
#
|
3681
|
-
# # Call the
|
3682
|
-
# result = client.
|
3742
|
+
# # Call the update_customer_repricing_config method.
|
3743
|
+
# result = client.update_customer_repricing_config request
|
3683
3744
|
#
|
3684
|
-
# # The returned object is of type
|
3685
|
-
#
|
3686
|
-
# # will lazily make API calls to fetch subsequent pages. Other
|
3687
|
-
# # methods are also available for managing paging directly.
|
3688
|
-
# result.each do |response|
|
3689
|
-
# # Each element is of type ::Google::Cloud::Channel::V1::Offer.
|
3690
|
-
# p response
|
3691
|
-
# end
|
3745
|
+
# # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3746
|
+
# p result
|
3692
3747
|
#
|
3693
|
-
def
|
3748
|
+
def update_customer_repricing_config request, options = nil
|
3694
3749
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3695
3750
|
|
3696
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::
|
3751
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest
|
3697
3752
|
|
3698
3753
|
# Converts hash and nil to an options object
|
3699
3754
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3700
3755
|
|
3701
3756
|
# Customize the options with defaults
|
3702
|
-
metadata = @config.rpcs.
|
3757
|
+
metadata = @config.rpcs.update_customer_repricing_config.metadata.to_h
|
3703
3758
|
|
3704
3759
|
# Set x-goog-api-client and x-goog-user-project headers
|
3705
3760
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3708,23 +3763,22 @@ module Google
|
|
3708
3763
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3709
3764
|
|
3710
3765
|
header_params = {}
|
3711
|
-
if request.
|
3712
|
-
header_params["
|
3766
|
+
if request.customer_repricing_config&.name
|
3767
|
+
header_params["customer_repricing_config.name"] = request.customer_repricing_config.name
|
3713
3768
|
end
|
3714
3769
|
|
3715
3770
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3716
3771
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3717
3772
|
|
3718
|
-
options.apply_defaults timeout: @config.rpcs.
|
3773
|
+
options.apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout,
|
3719
3774
|
metadata: metadata,
|
3720
|
-
retry_policy: @config.rpcs.
|
3775
|
+
retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy
|
3721
3776
|
|
3722
3777
|
options.apply_defaults timeout: @config.timeout,
|
3723
3778
|
metadata: @config.metadata,
|
3724
3779
|
retry_policy: @config.retry_policy
|
3725
3780
|
|
3726
|
-
@cloud_channel_service_stub.call_rpc :
|
3727
|
-
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, request, response, operation, options
|
3781
|
+
@cloud_channel_service_stub.call_rpc :update_customer_repricing_config, request, options: options do |response, operation|
|
3728
3782
|
yield response, operation if block_given?
|
3729
3783
|
return response
|
3730
3784
|
end
|
@@ -3733,54 +3787,45 @@ module Google
|
|
3733
3787
|
end
|
3734
3788
|
|
3735
3789
|
##
|
3736
|
-
#
|
3737
|
-
#
|
3738
|
-
#
|
3739
|
-
# * SKUs that you can upgrade or downgrade for an entitlement.
|
3790
|
+
# Deletes the given {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} permanently. You can only
|
3791
|
+
# delete configs if their {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} is set
|
3792
|
+
# to a date after the current month.
|
3740
3793
|
#
|
3741
3794
|
# Possible error codes:
|
3742
3795
|
#
|
3743
|
-
# * PERMISSION_DENIED: The
|
3796
|
+
# * PERMISSION_DENIED: The account making the request does not own
|
3797
|
+
# this customer.
|
3744
3798
|
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
3799
|
+
# * FAILED_PRECONDITION: The {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} is active or in the
|
3800
|
+
# past.
|
3801
|
+
# * NOT_FOUND: No {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} found for the name in the
|
3802
|
+
# request.
|
3745
3803
|
#
|
3746
|
-
# @overload
|
3747
|
-
# Pass arguments to `
|
3748
|
-
# {::Google::Cloud::Channel::V1::
|
3804
|
+
# @overload delete_customer_repricing_config(request, options = nil)
|
3805
|
+
# Pass arguments to `delete_customer_repricing_config` via a request object, either of type
|
3806
|
+
# {::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest} or an equivalent Hash.
|
3749
3807
|
#
|
3750
|
-
# @param request [::Google::Cloud::Channel::V1::
|
3808
|
+
# @param request [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, ::Hash]
|
3751
3809
|
# A request object representing the call parameters. Required. To specify no
|
3752
3810
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3753
3811
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3754
3812
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3755
3813
|
#
|
3756
|
-
# @overload
|
3757
|
-
# Pass arguments to `
|
3814
|
+
# @overload delete_customer_repricing_config(name: nil)
|
3815
|
+
# Pass arguments to `delete_customer_repricing_config` via keyword arguments. Note that at
|
3758
3816
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3759
3817
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3760
3818
|
#
|
3761
|
-
# @param
|
3762
|
-
#
|
3763
|
-
#
|
3764
|
-
#
|
3765
|
-
# @param customer [::String]
|
3766
|
-
# Required. The resource name of the customer to list SKUs for.
|
3767
|
-
# Format: accounts/\\{account_id}/customers/\\{customer_id}.
|
3768
|
-
# @param page_size [::Integer]
|
3769
|
-
# Optional. Requested page size. Server might return fewer results than requested.
|
3770
|
-
# If unspecified, returns at most 100 SKUs.
|
3771
|
-
# The maximum value is 1000; the server will coerce values above 1000.
|
3772
|
-
# @param page_token [::String]
|
3773
|
-
# Optional. A token for a page of results other than the first page.
|
3774
|
-
# @param language_code [::String]
|
3775
|
-
# Optional. The BCP-47 language code. For example, "en-US". The
|
3776
|
-
# response will localize in the corresponding language code, if specified.
|
3777
|
-
# The default value is "en-US".
|
3819
|
+
# @param name [::String]
|
3820
|
+
# Required. The resource name of the customer repricing config rule to delete.
|
3821
|
+
# Format:
|
3822
|
+
# accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}.
|
3778
3823
|
#
|
3779
3824
|
# @yield [response, operation] Access the result along with the RPC operation
|
3780
|
-
# @yieldparam response [::
|
3825
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3781
3826
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3782
3827
|
#
|
3783
|
-
# @return [::
|
3828
|
+
# @return [::Google::Protobuf::Empty]
|
3784
3829
|
#
|
3785
3830
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3786
3831
|
#
|
@@ -3791,30 +3836,24 @@ module Google
|
|
3791
3836
|
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3792
3837
|
#
|
3793
3838
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3794
|
-
# request = Google::Cloud::Channel::V1::
|
3839
|
+
# request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new
|
3795
3840
|
#
|
3796
|
-
# # Call the
|
3797
|
-
# result = client.
|
3841
|
+
# # Call the delete_customer_repricing_config method.
|
3842
|
+
# result = client.delete_customer_repricing_config request
|
3798
3843
|
#
|
3799
|
-
# # The returned object is of type
|
3800
|
-
#
|
3801
|
-
# # will lazily make API calls to fetch subsequent pages. Other
|
3802
|
-
# # methods are also available for managing paging directly.
|
3803
|
-
# result.each do |response|
|
3804
|
-
# # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku.
|
3805
|
-
# p response
|
3806
|
-
# end
|
3844
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3845
|
+
# p result
|
3807
3846
|
#
|
3808
|
-
def
|
3847
|
+
def delete_customer_repricing_config request, options = nil
|
3809
3848
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3810
3849
|
|
3811
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::
|
3850
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest
|
3812
3851
|
|
3813
3852
|
# Converts hash and nil to an options object
|
3814
3853
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3815
3854
|
|
3816
3855
|
# Customize the options with defaults
|
3817
|
-
metadata = @config.rpcs.
|
3856
|
+
metadata = @config.rpcs.delete_customer_repricing_config.metadata.to_h
|
3818
3857
|
|
3819
3858
|
# Set x-goog-api-client and x-goog-user-project headers
|
3820
3859
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3823,23 +3862,22 @@ module Google
|
|
3823
3862
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3824
3863
|
|
3825
3864
|
header_params = {}
|
3826
|
-
if request.
|
3827
|
-
header_params["
|
3865
|
+
if request.name
|
3866
|
+
header_params["name"] = request.name
|
3828
3867
|
end
|
3829
3868
|
|
3830
3869
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3831
3870
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3832
3871
|
|
3833
|
-
options.apply_defaults timeout: @config.rpcs.
|
3872
|
+
options.apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout,
|
3834
3873
|
metadata: metadata,
|
3835
|
-
retry_policy: @config.rpcs.
|
3874
|
+
retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy
|
3836
3875
|
|
3837
3876
|
options.apply_defaults timeout: @config.timeout,
|
3838
3877
|
metadata: @config.metadata,
|
3839
3878
|
retry_policy: @config.retry_policy
|
3840
3879
|
|
3841
|
-
@cloud_channel_service_stub.call_rpc :
|
3842
|
-
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, request, response, operation, options
|
3880
|
+
@cloud_channel_service_stub.call_rpc :delete_customer_repricing_config, request, options: options do |response, operation|
|
3843
3881
|
yield response, operation if block_given?
|
3844
3882
|
return response
|
3845
3883
|
end
|
@@ -3848,18 +3886,1122 @@ module Google
|
|
3848
3886
|
end
|
3849
3887
|
|
3850
3888
|
##
|
3851
|
-
#
|
3889
|
+
# Gets information about how a Distributor modifies their bill before sending
|
3890
|
+
# it to a ChannelPartner.
|
3852
3891
|
#
|
3853
|
-
#
|
3854
|
-
# * Offers that you can change for an entitlement.
|
3892
|
+
# Possible Error Codes:
|
3855
3893
|
#
|
3856
|
-
#
|
3894
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3895
|
+
# being queried are different.
|
3896
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} was not found.
|
3897
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3898
|
+
# backend. In this case, contact Cloud Channel support.
|
3857
3899
|
#
|
3858
|
-
#
|
3859
|
-
#
|
3900
|
+
# Return Value:
|
3901
|
+
# If successful, the {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} resource, otherwise
|
3902
|
+
# returns an error.
|
3860
3903
|
#
|
3861
|
-
# @overload
|
3862
|
-
# Pass arguments to `
|
3904
|
+
# @overload get_channel_partner_repricing_config(request, options = nil)
|
3905
|
+
# Pass arguments to `get_channel_partner_repricing_config` via a request object, either of type
|
3906
|
+
# {::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest} or an equivalent Hash.
|
3907
|
+
#
|
3908
|
+
# @param request [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, ::Hash]
|
3909
|
+
# A request object representing the call parameters. Required. To specify no
|
3910
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3911
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3912
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3913
|
+
#
|
3914
|
+
# @overload get_channel_partner_repricing_config(name: nil)
|
3915
|
+
# Pass arguments to `get_channel_partner_repricing_config` via keyword arguments. Note that at
|
3916
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3917
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3918
|
+
#
|
3919
|
+
# @param name [::String]
|
3920
|
+
# Required. The resource name of the ChannelPartnerRepricingConfig
|
3921
|
+
# Format:
|
3922
|
+
# accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}.
|
3923
|
+
#
|
3924
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3925
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig]
|
3926
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3927
|
+
#
|
3928
|
+
# @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig]
|
3929
|
+
#
|
3930
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3931
|
+
#
|
3932
|
+
# @example Basic example
|
3933
|
+
# require "google/cloud/channel/v1"
|
3934
|
+
#
|
3935
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3936
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3937
|
+
#
|
3938
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3939
|
+
# request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new
|
3940
|
+
#
|
3941
|
+
# # Call the get_channel_partner_repricing_config method.
|
3942
|
+
# result = client.get_channel_partner_repricing_config request
|
3943
|
+
#
|
3944
|
+
# # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.
|
3945
|
+
# p result
|
3946
|
+
#
|
3947
|
+
def get_channel_partner_repricing_config request, options = nil
|
3948
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3949
|
+
|
3950
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest
|
3951
|
+
|
3952
|
+
# Converts hash and nil to an options object
|
3953
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3954
|
+
|
3955
|
+
# Customize the options with defaults
|
3956
|
+
metadata = @config.rpcs.get_channel_partner_repricing_config.metadata.to_h
|
3957
|
+
|
3958
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3959
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3960
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3961
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3962
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3963
|
+
|
3964
|
+
header_params = {}
|
3965
|
+
if request.name
|
3966
|
+
header_params["name"] = request.name
|
3967
|
+
end
|
3968
|
+
|
3969
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3970
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3971
|
+
|
3972
|
+
options.apply_defaults timeout: @config.rpcs.get_channel_partner_repricing_config.timeout,
|
3973
|
+
metadata: metadata,
|
3974
|
+
retry_policy: @config.rpcs.get_channel_partner_repricing_config.retry_policy
|
3975
|
+
|
3976
|
+
options.apply_defaults timeout: @config.timeout,
|
3977
|
+
metadata: @config.metadata,
|
3978
|
+
retry_policy: @config.retry_policy
|
3979
|
+
|
3980
|
+
@cloud_channel_service_stub.call_rpc :get_channel_partner_repricing_config, request, options: options do |response, operation|
|
3981
|
+
yield response, operation if block_given?
|
3982
|
+
return response
|
3983
|
+
end
|
3984
|
+
rescue ::GRPC::BadStatus => e
|
3985
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3986
|
+
end
|
3987
|
+
|
3988
|
+
##
|
3989
|
+
# Lists information about how a Reseller modifies their bill before sending
|
3990
|
+
# it to a ChannelPartner.
|
3991
|
+
#
|
3992
|
+
# Possible Error Codes:
|
3993
|
+
#
|
3994
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3995
|
+
# being queried are different.
|
3996
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} specified does not exist
|
3997
|
+
# or is not associated with the given account.
|
3998
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3999
|
+
# backend. In this case, contact Cloud Channel support.
|
4000
|
+
#
|
4001
|
+
# Return Value:
|
4002
|
+
# If successful, the {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} resources.
|
4003
|
+
# The data for each resource is displayed in the ascending order of:
|
4004
|
+
# * channel partner ID
|
4005
|
+
# * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}
|
4006
|
+
# * {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#update_time ChannelPartnerRepricingConfig.update_time}
|
4007
|
+
#
|
4008
|
+
# If unsuccessful, returns an error.
|
4009
|
+
#
|
4010
|
+
# @overload list_channel_partner_repricing_configs(request, options = nil)
|
4011
|
+
# Pass arguments to `list_channel_partner_repricing_configs` via a request object, either of type
|
4012
|
+
# {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest} or an equivalent Hash.
|
4013
|
+
#
|
4014
|
+
# @param request [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, ::Hash]
|
4015
|
+
# A request object representing the call parameters. Required. To specify no
|
4016
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4017
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4018
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4019
|
+
#
|
4020
|
+
# @overload list_channel_partner_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
4021
|
+
# Pass arguments to `list_channel_partner_repricing_configs` via keyword arguments. Note that at
|
4022
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4023
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4024
|
+
#
|
4025
|
+
# @param parent [::String]
|
4026
|
+
# Required. The resource name of the account's {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}.
|
4027
|
+
# Parent uses the format:
|
4028
|
+
# accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}.
|
4029
|
+
# Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs
|
4030
|
+
# for all channel partners.
|
4031
|
+
# @param page_size [::Integer]
|
4032
|
+
# Optional. The maximum number of repricing configs to return. The service may return
|
4033
|
+
# fewer than this value. If unspecified, returns a maximum of 50 rules. The
|
4034
|
+
# maximum value is 100; values above 100 will be coerced to 100.
|
4035
|
+
# @param page_token [::String]
|
4036
|
+
# Optional. A token identifying a page of results beyond the first page.
|
4037
|
+
# Obtained through
|
4038
|
+
# {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} of the
|
4039
|
+
# previous {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} call.
|
4040
|
+
# @param filter [::String]
|
4041
|
+
# Optional. A filter for [CloudChannelService.ListChannelPartnerRepricingConfigs]
|
4042
|
+
# results (channel_partner_link only). You can use this filter when you
|
4043
|
+
# support a BatchGet-like query.
|
4044
|
+
# To use the filter, you must set
|
4045
|
+
# `parent=accounts/{account_id}/channelPartnerLinks/-`.
|
4046
|
+
#
|
4047
|
+
# Example: `channel_partner_link =
|
4048
|
+
# accounts/account_id/channelPartnerLinks/c1` OR `channel_partner_link =
|
4049
|
+
# accounts/account_id/channelPartnerLinks/c2`.
|
4050
|
+
#
|
4051
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4052
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>]
|
4053
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4054
|
+
#
|
4055
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>]
|
4056
|
+
#
|
4057
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4058
|
+
#
|
4059
|
+
# @example Basic example
|
4060
|
+
# require "google/cloud/channel/v1"
|
4061
|
+
#
|
4062
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4063
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4064
|
+
#
|
4065
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4066
|
+
# request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new
|
4067
|
+
#
|
4068
|
+
# # Call the list_channel_partner_repricing_configs method.
|
4069
|
+
# result = client.list_channel_partner_repricing_configs request
|
4070
|
+
#
|
4071
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4072
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4073
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4074
|
+
# # methods are also available for managing paging directly.
|
4075
|
+
# result.each do |response|
|
4076
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.
|
4077
|
+
# p response
|
4078
|
+
# end
|
4079
|
+
#
|
4080
|
+
def list_channel_partner_repricing_configs request, options = nil
|
4081
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4082
|
+
|
4083
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest
|
4084
|
+
|
4085
|
+
# Converts hash and nil to an options object
|
4086
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4087
|
+
|
4088
|
+
# Customize the options with defaults
|
4089
|
+
metadata = @config.rpcs.list_channel_partner_repricing_configs.metadata.to_h
|
4090
|
+
|
4091
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4092
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4093
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4094
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4095
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4096
|
+
|
4097
|
+
header_params = {}
|
4098
|
+
if request.parent
|
4099
|
+
header_params["parent"] = request.parent
|
4100
|
+
end
|
4101
|
+
|
4102
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4103
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4104
|
+
|
4105
|
+
options.apply_defaults timeout: @config.rpcs.list_channel_partner_repricing_configs.timeout,
|
4106
|
+
metadata: metadata,
|
4107
|
+
retry_policy: @config.rpcs.list_channel_partner_repricing_configs.retry_policy
|
4108
|
+
|
4109
|
+
options.apply_defaults timeout: @config.timeout,
|
4110
|
+
metadata: @config.metadata,
|
4111
|
+
retry_policy: @config.retry_policy
|
4112
|
+
|
4113
|
+
@cloud_channel_service_stub.call_rpc :list_channel_partner_repricing_configs, request, options: options do |response, operation|
|
4114
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, request, response, operation, options
|
4115
|
+
yield response, operation if block_given?
|
4116
|
+
return response
|
4117
|
+
end
|
4118
|
+
rescue ::GRPC::BadStatus => e
|
4119
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4120
|
+
end
|
4121
|
+
|
4122
|
+
##
|
4123
|
+
# Creates a ChannelPartnerRepricingConfig. Call this method to set
|
4124
|
+
# modifications for a specific ChannelPartner's bill. You can only create
|
4125
|
+
# configs if the {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} is a future
|
4126
|
+
# month. If needed, you can create a config for the current month, with some
|
4127
|
+
# restrictions.
|
4128
|
+
#
|
4129
|
+
# When creating a config for a future month, make sure there are no existing
|
4130
|
+
# configs for that
|
4131
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
4132
|
+
#
|
4133
|
+
# The following restrictions are for creating configs in the current month.
|
4134
|
+
#
|
4135
|
+
# * This functionality is reserved for recovering from an erroneous config,
|
4136
|
+
# and should not be used for regular business cases.
|
4137
|
+
# * The new config will not modify exports used with other configs.
|
4138
|
+
# Changes to the config may be immediate, but may take up to 24 hours.
|
4139
|
+
# * There is a limit of ten configs for any ChannelPartner or
|
4140
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
4141
|
+
# * The contained {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config} vaule
|
4142
|
+
# must be different from the value used in the current config for a
|
4143
|
+
# ChannelPartner.
|
4144
|
+
#
|
4145
|
+
# Possible Error Codes:
|
4146
|
+
#
|
4147
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
4148
|
+
# being queried are different.
|
4149
|
+
# * INVALID_ARGUMENT: Missing or invalid required parameters in the
|
4150
|
+
# request. Also displays if the updated config is for the current month or
|
4151
|
+
# past months.
|
4152
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} specified does not exist
|
4153
|
+
# or is not associated with the given account.
|
4154
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
4155
|
+
# backend. In this case, contact Cloud Channel support.
|
4156
|
+
#
|
4157
|
+
# Return Value:
|
4158
|
+
# If successful, the updated {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} resource,
|
4159
|
+
# otherwise returns an error.
|
4160
|
+
#
|
4161
|
+
# @overload create_channel_partner_repricing_config(request, options = nil)
|
4162
|
+
# Pass arguments to `create_channel_partner_repricing_config` via a request object, either of type
|
4163
|
+
# {::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest} or an equivalent Hash.
|
4164
|
+
#
|
4165
|
+
# @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, ::Hash]
|
4166
|
+
# A request object representing the call parameters. Required. To specify no
|
4167
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4168
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4169
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4170
|
+
#
|
4171
|
+
# @overload create_channel_partner_repricing_config(parent: nil, channel_partner_repricing_config: nil)
|
4172
|
+
# Pass arguments to `create_channel_partner_repricing_config` via keyword arguments. Note that at
|
4173
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4174
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4175
|
+
#
|
4176
|
+
# @param parent [::String]
|
4177
|
+
# Required. The resource name of the ChannelPartner that will receive the repricing
|
4178
|
+
# config. Parent uses the format:
|
4179
|
+
# accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}
|
4180
|
+
# @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash]
|
4181
|
+
# Required. The ChannelPartnerRepricingConfig object to update.
|
4182
|
+
#
|
4183
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4184
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig]
|
4185
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4186
|
+
#
|
4187
|
+
# @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig]
|
4188
|
+
#
|
4189
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4190
|
+
#
|
4191
|
+
# @example Basic example
|
4192
|
+
# require "google/cloud/channel/v1"
|
4193
|
+
#
|
4194
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4195
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4196
|
+
#
|
4197
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4198
|
+
# request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new
|
4199
|
+
#
|
4200
|
+
# # Call the create_channel_partner_repricing_config method.
|
4201
|
+
# result = client.create_channel_partner_repricing_config request
|
4202
|
+
#
|
4203
|
+
# # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.
|
4204
|
+
# p result
|
4205
|
+
#
|
4206
|
+
def create_channel_partner_repricing_config request, options = nil
|
4207
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4208
|
+
|
4209
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest
|
4210
|
+
|
4211
|
+
# Converts hash and nil to an options object
|
4212
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4213
|
+
|
4214
|
+
# Customize the options with defaults
|
4215
|
+
metadata = @config.rpcs.create_channel_partner_repricing_config.metadata.to_h
|
4216
|
+
|
4217
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4218
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4219
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4220
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4221
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4222
|
+
|
4223
|
+
header_params = {}
|
4224
|
+
if request.parent
|
4225
|
+
header_params["parent"] = request.parent
|
4226
|
+
end
|
4227
|
+
|
4228
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4229
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4230
|
+
|
4231
|
+
options.apply_defaults timeout: @config.rpcs.create_channel_partner_repricing_config.timeout,
|
4232
|
+
metadata: metadata,
|
4233
|
+
retry_policy: @config.rpcs.create_channel_partner_repricing_config.retry_policy
|
4234
|
+
|
4235
|
+
options.apply_defaults timeout: @config.timeout,
|
4236
|
+
metadata: @config.metadata,
|
4237
|
+
retry_policy: @config.retry_policy
|
4238
|
+
|
4239
|
+
@cloud_channel_service_stub.call_rpc :create_channel_partner_repricing_config, request, options: options do |response, operation|
|
4240
|
+
yield response, operation if block_given?
|
4241
|
+
return response
|
4242
|
+
end
|
4243
|
+
rescue ::GRPC::BadStatus => e
|
4244
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4245
|
+
end
|
4246
|
+
|
4247
|
+
##
|
4248
|
+
# Updates a ChannelPartnerRepricingConfig. Call this method to set
|
4249
|
+
# modifications for a specific ChannelPartner's bill. This method overwrites
|
4250
|
+
# the existing CustomerRepricingConfig.
|
4251
|
+
#
|
4252
|
+
# You can only update configs if the
|
4253
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} is a
|
4254
|
+
# future month. To make changes to configs for the current month, use
|
4255
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config CreateChannelPartnerRepricingConfig}, taking note of its restrictions.
|
4256
|
+
# You cannot update the {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
4257
|
+
#
|
4258
|
+
# When updating a config in the future:
|
4259
|
+
#
|
4260
|
+
# * This config must already exist.
|
4261
|
+
#
|
4262
|
+
# Possible Error Codes:
|
4263
|
+
#
|
4264
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
4265
|
+
# being queried are different.
|
4266
|
+
# * INVALID_ARGUMENT: Missing or invalid required parameters in the
|
4267
|
+
# request. Also displays if the updated config is for the current month or
|
4268
|
+
# past months.
|
4269
|
+
# * NOT_FOUND: The {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} specified does not exist
|
4270
|
+
# or is not associated with the given account.
|
4271
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
4272
|
+
# backend. In this case, contact Cloud Channel support.
|
4273
|
+
#
|
4274
|
+
# Return Value:
|
4275
|
+
# If successful, the updated {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} resource,
|
4276
|
+
# otherwise returns an error.
|
4277
|
+
#
|
4278
|
+
# @overload update_channel_partner_repricing_config(request, options = nil)
|
4279
|
+
# Pass arguments to `update_channel_partner_repricing_config` via a request object, either of type
|
4280
|
+
# {::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest} or an equivalent Hash.
|
4281
|
+
#
|
4282
|
+
# @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, ::Hash]
|
4283
|
+
# A request object representing the call parameters. Required. To specify no
|
4284
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4285
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4286
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4287
|
+
#
|
4288
|
+
# @overload update_channel_partner_repricing_config(channel_partner_repricing_config: nil)
|
4289
|
+
# Pass arguments to `update_channel_partner_repricing_config` via keyword arguments. Note that at
|
4290
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4291
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4292
|
+
#
|
4293
|
+
# @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash]
|
4294
|
+
# Required. The ChannelPartnerRepricingConfig object to update.
|
4295
|
+
#
|
4296
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4297
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig]
|
4298
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4299
|
+
#
|
4300
|
+
# @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig]
|
4301
|
+
#
|
4302
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4303
|
+
#
|
4304
|
+
# @example Basic example
|
4305
|
+
# require "google/cloud/channel/v1"
|
4306
|
+
#
|
4307
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4308
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4309
|
+
#
|
4310
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4311
|
+
# request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new
|
4312
|
+
#
|
4313
|
+
# # Call the update_channel_partner_repricing_config method.
|
4314
|
+
# result = client.update_channel_partner_repricing_config request
|
4315
|
+
#
|
4316
|
+
# # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.
|
4317
|
+
# p result
|
4318
|
+
#
|
4319
|
+
def update_channel_partner_repricing_config request, options = nil
|
4320
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4321
|
+
|
4322
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest
|
4323
|
+
|
4324
|
+
# Converts hash and nil to an options object
|
4325
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4326
|
+
|
4327
|
+
# Customize the options with defaults
|
4328
|
+
metadata = @config.rpcs.update_channel_partner_repricing_config.metadata.to_h
|
4329
|
+
|
4330
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4331
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4332
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4333
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4334
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4335
|
+
|
4336
|
+
header_params = {}
|
4337
|
+
if request.channel_partner_repricing_config&.name
|
4338
|
+
header_params["channel_partner_repricing_config.name"] = request.channel_partner_repricing_config.name
|
4339
|
+
end
|
4340
|
+
|
4341
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4342
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4343
|
+
|
4344
|
+
options.apply_defaults timeout: @config.rpcs.update_channel_partner_repricing_config.timeout,
|
4345
|
+
metadata: metadata,
|
4346
|
+
retry_policy: @config.rpcs.update_channel_partner_repricing_config.retry_policy
|
4347
|
+
|
4348
|
+
options.apply_defaults timeout: @config.timeout,
|
4349
|
+
metadata: @config.metadata,
|
4350
|
+
retry_policy: @config.retry_policy
|
4351
|
+
|
4352
|
+
@cloud_channel_service_stub.call_rpc :update_channel_partner_repricing_config, request, options: options do |response, operation|
|
4353
|
+
yield response, operation if block_given?
|
4354
|
+
return response
|
4355
|
+
end
|
4356
|
+
rescue ::GRPC::BadStatus => e
|
4357
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4358
|
+
end
|
4359
|
+
|
4360
|
+
##
|
4361
|
+
# Deletes the given {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} permanently. You can
|
4362
|
+
# only delete configs if their {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} is
|
4363
|
+
# set to a date after the current month.
|
4364
|
+
#
|
4365
|
+
# Possible error codes:
|
4366
|
+
#
|
4367
|
+
# * PERMISSION_DENIED: The account making the request does not own
|
4368
|
+
# this customer.
|
4369
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
4370
|
+
# * FAILED_PRECONDITION: The {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} is active or
|
4371
|
+
# in the past.
|
4372
|
+
# * NOT_FOUND: No {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} found for the name in the
|
4373
|
+
# request.
|
4374
|
+
#
|
4375
|
+
# @overload delete_channel_partner_repricing_config(request, options = nil)
|
4376
|
+
# Pass arguments to `delete_channel_partner_repricing_config` via a request object, either of type
|
4377
|
+
# {::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest} or an equivalent Hash.
|
4378
|
+
#
|
4379
|
+
# @param request [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, ::Hash]
|
4380
|
+
# A request object representing the call parameters. Required. To specify no
|
4381
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4382
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4383
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4384
|
+
#
|
4385
|
+
# @overload delete_channel_partner_repricing_config(name: nil)
|
4386
|
+
# Pass arguments to `delete_channel_partner_repricing_config` via keyword arguments. Note that at
|
4387
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4388
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4389
|
+
#
|
4390
|
+
# @param name [::String]
|
4391
|
+
# Required. The resource name of the channel partner repricing config rule to delete.
|
4392
|
+
#
|
4393
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4394
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
4395
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4396
|
+
#
|
4397
|
+
# @return [::Google::Protobuf::Empty]
|
4398
|
+
#
|
4399
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4400
|
+
#
|
4401
|
+
# @example Basic example
|
4402
|
+
# require "google/cloud/channel/v1"
|
4403
|
+
#
|
4404
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4405
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4406
|
+
#
|
4407
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4408
|
+
# request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new
|
4409
|
+
#
|
4410
|
+
# # Call the delete_channel_partner_repricing_config method.
|
4411
|
+
# result = client.delete_channel_partner_repricing_config request
|
4412
|
+
#
|
4413
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
4414
|
+
# p result
|
4415
|
+
#
|
4416
|
+
def delete_channel_partner_repricing_config request, options = nil
|
4417
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4418
|
+
|
4419
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest
|
4420
|
+
|
4421
|
+
# Converts hash and nil to an options object
|
4422
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4423
|
+
|
4424
|
+
# Customize the options with defaults
|
4425
|
+
metadata = @config.rpcs.delete_channel_partner_repricing_config.metadata.to_h
|
4426
|
+
|
4427
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4428
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4429
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4430
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4431
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4432
|
+
|
4433
|
+
header_params = {}
|
4434
|
+
if request.name
|
4435
|
+
header_params["name"] = request.name
|
4436
|
+
end
|
4437
|
+
|
4438
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4439
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4440
|
+
|
4441
|
+
options.apply_defaults timeout: @config.rpcs.delete_channel_partner_repricing_config.timeout,
|
4442
|
+
metadata: metadata,
|
4443
|
+
retry_policy: @config.rpcs.delete_channel_partner_repricing_config.retry_policy
|
4444
|
+
|
4445
|
+
options.apply_defaults timeout: @config.timeout,
|
4446
|
+
metadata: @config.metadata,
|
4447
|
+
retry_policy: @config.retry_policy
|
4448
|
+
|
4449
|
+
@cloud_channel_service_stub.call_rpc :delete_channel_partner_repricing_config, request, options: options do |response, operation|
|
4450
|
+
yield response, operation if block_given?
|
4451
|
+
return response
|
4452
|
+
end
|
4453
|
+
rescue ::GRPC::BadStatus => e
|
4454
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4455
|
+
end
|
4456
|
+
|
4457
|
+
##
|
4458
|
+
# Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource.
|
4459
|
+
#
|
4460
|
+
# Possible error codes:
|
4461
|
+
#
|
4462
|
+
# * PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
|
4463
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
4464
|
+
# * NOT_FOUND: Entitlement or offer was not found.
|
4465
|
+
#
|
4466
|
+
# Return value:
|
4467
|
+
# The {::Google::Cloud::Channel::V1::Offer Offer} resource.
|
4468
|
+
#
|
4469
|
+
# @overload lookup_offer(request, options = nil)
|
4470
|
+
# Pass arguments to `lookup_offer` via a request object, either of type
|
4471
|
+
# {::Google::Cloud::Channel::V1::LookupOfferRequest} or an equivalent Hash.
|
4472
|
+
#
|
4473
|
+
# @param request [::Google::Cloud::Channel::V1::LookupOfferRequest, ::Hash]
|
4474
|
+
# A request object representing the call parameters. Required. To specify no
|
4475
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4476
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4477
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4478
|
+
#
|
4479
|
+
# @overload lookup_offer(entitlement: nil)
|
4480
|
+
# Pass arguments to `lookup_offer` via keyword arguments. Note that at
|
4481
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4482
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4483
|
+
#
|
4484
|
+
# @param entitlement [::String]
|
4485
|
+
# Required. The resource name of the entitlement to retrieve the Offer.
|
4486
|
+
# Entitlement uses the format:
|
4487
|
+
# accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id}
|
4488
|
+
#
|
4489
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4490
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::Offer]
|
4491
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4492
|
+
#
|
4493
|
+
# @return [::Google::Cloud::Channel::V1::Offer]
|
4494
|
+
#
|
4495
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4496
|
+
#
|
4497
|
+
# @example Basic example
|
4498
|
+
# require "google/cloud/channel/v1"
|
4499
|
+
#
|
4500
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4501
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4502
|
+
#
|
4503
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4504
|
+
# request = Google::Cloud::Channel::V1::LookupOfferRequest.new
|
4505
|
+
#
|
4506
|
+
# # Call the lookup_offer method.
|
4507
|
+
# result = client.lookup_offer request
|
4508
|
+
#
|
4509
|
+
# # The returned object is of type Google::Cloud::Channel::V1::Offer.
|
4510
|
+
# p result
|
4511
|
+
#
|
4512
|
+
def lookup_offer request, options = nil
|
4513
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4514
|
+
|
4515
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::LookupOfferRequest
|
4516
|
+
|
4517
|
+
# Converts hash and nil to an options object
|
4518
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4519
|
+
|
4520
|
+
# Customize the options with defaults
|
4521
|
+
metadata = @config.rpcs.lookup_offer.metadata.to_h
|
4522
|
+
|
4523
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4524
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4525
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4526
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4527
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4528
|
+
|
4529
|
+
header_params = {}
|
4530
|
+
if request.entitlement
|
4531
|
+
header_params["entitlement"] = request.entitlement
|
4532
|
+
end
|
4533
|
+
|
4534
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4535
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4536
|
+
|
4537
|
+
options.apply_defaults timeout: @config.rpcs.lookup_offer.timeout,
|
4538
|
+
metadata: metadata,
|
4539
|
+
retry_policy: @config.rpcs.lookup_offer.retry_policy
|
4540
|
+
|
4541
|
+
options.apply_defaults timeout: @config.timeout,
|
4542
|
+
metadata: @config.metadata,
|
4543
|
+
retry_policy: @config.retry_policy
|
4544
|
+
|
4545
|
+
@cloud_channel_service_stub.call_rpc :lookup_offer, request, options: options do |response, operation|
|
4546
|
+
yield response, operation if block_given?
|
4547
|
+
return response
|
4548
|
+
end
|
4549
|
+
rescue ::GRPC::BadStatus => e
|
4550
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4551
|
+
end
|
4552
|
+
|
4553
|
+
##
|
4554
|
+
# Lists the Products the reseller is authorized to sell.
|
4555
|
+
#
|
4556
|
+
# Possible error codes:
|
4557
|
+
#
|
4558
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
4559
|
+
#
|
4560
|
+
# @overload list_products(request, options = nil)
|
4561
|
+
# Pass arguments to `list_products` via a request object, either of type
|
4562
|
+
# {::Google::Cloud::Channel::V1::ListProductsRequest} or an equivalent Hash.
|
4563
|
+
#
|
4564
|
+
# @param request [::Google::Cloud::Channel::V1::ListProductsRequest, ::Hash]
|
4565
|
+
# A request object representing the call parameters. Required. To specify no
|
4566
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4567
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4568
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4569
|
+
#
|
4570
|
+
# @overload list_products(account: nil, page_size: nil, page_token: nil, language_code: nil)
|
4571
|
+
# Pass arguments to `list_products` via keyword arguments. Note that at
|
4572
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4573
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4574
|
+
#
|
4575
|
+
# @param account [::String]
|
4576
|
+
# Required. The resource name of the reseller account.
|
4577
|
+
# Format: accounts/\\{account_id}.
|
4578
|
+
# @param page_size [::Integer]
|
4579
|
+
# Optional. Requested page size. Server might return fewer results than requested.
|
4580
|
+
# If unspecified, returns at most 100 Products.
|
4581
|
+
# The maximum value is 1000; the server will coerce values above 1000.
|
4582
|
+
# @param page_token [::String]
|
4583
|
+
# Optional. A token for a page of results other than the first page.
|
4584
|
+
# @param language_code [::String]
|
4585
|
+
# Optional. The BCP-47 language code. For example, "en-US". The
|
4586
|
+
# response will localize in the corresponding language code, if specified.
|
4587
|
+
# The default value is "en-US".
|
4588
|
+
#
|
4589
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4590
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>]
|
4591
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4592
|
+
#
|
4593
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>]
|
4594
|
+
#
|
4595
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4596
|
+
#
|
4597
|
+
# @example Basic example
|
4598
|
+
# require "google/cloud/channel/v1"
|
4599
|
+
#
|
4600
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4601
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4602
|
+
#
|
4603
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4604
|
+
# request = Google::Cloud::Channel::V1::ListProductsRequest.new
|
4605
|
+
#
|
4606
|
+
# # Call the list_products method.
|
4607
|
+
# result = client.list_products request
|
4608
|
+
#
|
4609
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4610
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4611
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4612
|
+
# # methods are also available for managing paging directly.
|
4613
|
+
# result.each do |response|
|
4614
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::Product.
|
4615
|
+
# p response
|
4616
|
+
# end
|
4617
|
+
#
|
4618
|
+
def list_products request, options = nil
|
4619
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4620
|
+
|
4621
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListProductsRequest
|
4622
|
+
|
4623
|
+
# Converts hash and nil to an options object
|
4624
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4625
|
+
|
4626
|
+
# Customize the options with defaults
|
4627
|
+
metadata = @config.rpcs.list_products.metadata.to_h
|
4628
|
+
|
4629
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4630
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4631
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4632
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4633
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4634
|
+
|
4635
|
+
options.apply_defaults timeout: @config.rpcs.list_products.timeout,
|
4636
|
+
metadata: metadata,
|
4637
|
+
retry_policy: @config.rpcs.list_products.retry_policy
|
4638
|
+
|
4639
|
+
options.apply_defaults timeout: @config.timeout,
|
4640
|
+
metadata: @config.metadata,
|
4641
|
+
retry_policy: @config.retry_policy
|
4642
|
+
|
4643
|
+
@cloud_channel_service_stub.call_rpc :list_products, request, options: options do |response, operation|
|
4644
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_products, request, response, operation, options
|
4645
|
+
yield response, operation if block_given?
|
4646
|
+
return response
|
4647
|
+
end
|
4648
|
+
rescue ::GRPC::BadStatus => e
|
4649
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4650
|
+
end
|
4651
|
+
|
4652
|
+
##
|
4653
|
+
# Lists the SKUs for a product the reseller is authorized to sell.
|
4654
|
+
#
|
4655
|
+
# Possible error codes:
|
4656
|
+
#
|
4657
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
4658
|
+
#
|
4659
|
+
# @overload list_skus(request, options = nil)
|
4660
|
+
# Pass arguments to `list_skus` via a request object, either of type
|
4661
|
+
# {::Google::Cloud::Channel::V1::ListSkusRequest} or an equivalent Hash.
|
4662
|
+
#
|
4663
|
+
# @param request [::Google::Cloud::Channel::V1::ListSkusRequest, ::Hash]
|
4664
|
+
# A request object representing the call parameters. Required. To specify no
|
4665
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4666
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4667
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4668
|
+
#
|
4669
|
+
# @overload list_skus(parent: nil, account: nil, page_size: nil, page_token: nil, language_code: nil)
|
4670
|
+
# Pass arguments to `list_skus` via keyword arguments. Note that at
|
4671
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4672
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4673
|
+
#
|
4674
|
+
# @param parent [::String]
|
4675
|
+
# Required. The resource name of the Product to list SKUs for.
|
4676
|
+
# Parent uses the format: products/\\{product_id}.
|
4677
|
+
# Supports products/- to retrieve SKUs for all products.
|
4678
|
+
# @param account [::String]
|
4679
|
+
# Required. Resource name of the reseller.
|
4680
|
+
# Format: accounts/\\{account_id}.
|
4681
|
+
# @param page_size [::Integer]
|
4682
|
+
# Optional. Requested page size. Server might return fewer results than requested.
|
4683
|
+
# If unspecified, returns at most 100 SKUs.
|
4684
|
+
# The maximum value is 1000; the server will coerce values above 1000.
|
4685
|
+
# @param page_token [::String]
|
4686
|
+
# Optional. A token for a page of results other than the first page.
|
4687
|
+
# Optional.
|
4688
|
+
# @param language_code [::String]
|
4689
|
+
# Optional. The BCP-47 language code. For example, "en-US". The
|
4690
|
+
# response will localize in the corresponding language code, if specified.
|
4691
|
+
# The default value is "en-US".
|
4692
|
+
#
|
4693
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4694
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>]
|
4695
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4696
|
+
#
|
4697
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>]
|
4698
|
+
#
|
4699
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4700
|
+
#
|
4701
|
+
# @example Basic example
|
4702
|
+
# require "google/cloud/channel/v1"
|
4703
|
+
#
|
4704
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4705
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4706
|
+
#
|
4707
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4708
|
+
# request = Google::Cloud::Channel::V1::ListSkusRequest.new
|
4709
|
+
#
|
4710
|
+
# # Call the list_skus method.
|
4711
|
+
# result = client.list_skus request
|
4712
|
+
#
|
4713
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4714
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4715
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4716
|
+
# # methods are also available for managing paging directly.
|
4717
|
+
# result.each do |response|
|
4718
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::Sku.
|
4719
|
+
# p response
|
4720
|
+
# end
|
4721
|
+
#
|
4722
|
+
def list_skus request, options = nil
|
4723
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4724
|
+
|
4725
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkusRequest
|
4726
|
+
|
4727
|
+
# Converts hash and nil to an options object
|
4728
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4729
|
+
|
4730
|
+
# Customize the options with defaults
|
4731
|
+
metadata = @config.rpcs.list_skus.metadata.to_h
|
4732
|
+
|
4733
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4734
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4735
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4736
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4737
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4738
|
+
|
4739
|
+
header_params = {}
|
4740
|
+
if request.parent
|
4741
|
+
header_params["parent"] = request.parent
|
4742
|
+
end
|
4743
|
+
|
4744
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4745
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4746
|
+
|
4747
|
+
options.apply_defaults timeout: @config.rpcs.list_skus.timeout,
|
4748
|
+
metadata: metadata,
|
4749
|
+
retry_policy: @config.rpcs.list_skus.retry_policy
|
4750
|
+
|
4751
|
+
options.apply_defaults timeout: @config.timeout,
|
4752
|
+
metadata: @config.metadata,
|
4753
|
+
retry_policy: @config.retry_policy
|
4754
|
+
|
4755
|
+
@cloud_channel_service_stub.call_rpc :list_skus, request, options: options do |response, operation|
|
4756
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, request, response, operation, options
|
4757
|
+
yield response, operation if block_given?
|
4758
|
+
return response
|
4759
|
+
end
|
4760
|
+
rescue ::GRPC::BadStatus => e
|
4761
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4762
|
+
end
|
4763
|
+
|
4764
|
+
##
|
4765
|
+
# Lists the Offers the reseller can sell.
|
4766
|
+
#
|
4767
|
+
# Possible error codes:
|
4768
|
+
#
|
4769
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
4770
|
+
#
|
4771
|
+
# @overload list_offers(request, options = nil)
|
4772
|
+
# Pass arguments to `list_offers` via a request object, either of type
|
4773
|
+
# {::Google::Cloud::Channel::V1::ListOffersRequest} or an equivalent Hash.
|
4774
|
+
#
|
4775
|
+
# @param request [::Google::Cloud::Channel::V1::ListOffersRequest, ::Hash]
|
4776
|
+
# A request object representing the call parameters. Required. To specify no
|
4777
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4778
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4779
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4780
|
+
#
|
4781
|
+
# @overload list_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, language_code: nil)
|
4782
|
+
# Pass arguments to `list_offers` via keyword arguments. Note that at
|
4783
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4784
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4785
|
+
#
|
4786
|
+
# @param parent [::String]
|
4787
|
+
# Required. The resource name of the reseller account from which to list Offers.
|
4788
|
+
# Parent uses the format: accounts/\\{account_id}.
|
4789
|
+
# @param page_size [::Integer]
|
4790
|
+
# Optional. Requested page size. Server might return fewer results than requested.
|
4791
|
+
# If unspecified, returns at most 500 Offers.
|
4792
|
+
# The maximum value is 1000; the server will coerce values above 1000.
|
4793
|
+
# @param page_token [::String]
|
4794
|
+
# Optional. A token for a page of results other than the first page.
|
4795
|
+
# @param filter [::String]
|
4796
|
+
# Optional. The expression to filter results by name (name of
|
4797
|
+
# the Offer), sku.name (name of the SKU), or sku.product.name (name of the
|
4798
|
+
# Product).
|
4799
|
+
# Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
|
4800
|
+
# Example 2: name=accounts/a1/offers/o1
|
4801
|
+
# @param language_code [::String]
|
4802
|
+
# Optional. The BCP-47 language code. For example, "en-US". The
|
4803
|
+
# response will localize in the corresponding language code, if specified.
|
4804
|
+
# The default value is "en-US".
|
4805
|
+
#
|
4806
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4807
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>]
|
4808
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4809
|
+
#
|
4810
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>]
|
4811
|
+
#
|
4812
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4813
|
+
#
|
4814
|
+
# @example Basic example
|
4815
|
+
# require "google/cloud/channel/v1"
|
4816
|
+
#
|
4817
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4818
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4819
|
+
#
|
4820
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4821
|
+
# request = Google::Cloud::Channel::V1::ListOffersRequest.new
|
4822
|
+
#
|
4823
|
+
# # Call the list_offers method.
|
4824
|
+
# result = client.list_offers request
|
4825
|
+
#
|
4826
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4827
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4828
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4829
|
+
# # methods are also available for managing paging directly.
|
4830
|
+
# result.each do |response|
|
4831
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::Offer.
|
4832
|
+
# p response
|
4833
|
+
# end
|
4834
|
+
#
|
4835
|
+
def list_offers request, options = nil
|
4836
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4837
|
+
|
4838
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListOffersRequest
|
4839
|
+
|
4840
|
+
# Converts hash and nil to an options object
|
4841
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4842
|
+
|
4843
|
+
# Customize the options with defaults
|
4844
|
+
metadata = @config.rpcs.list_offers.metadata.to_h
|
4845
|
+
|
4846
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4847
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4848
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4849
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4850
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4851
|
+
|
4852
|
+
header_params = {}
|
4853
|
+
if request.parent
|
4854
|
+
header_params["parent"] = request.parent
|
4855
|
+
end
|
4856
|
+
|
4857
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4858
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4859
|
+
|
4860
|
+
options.apply_defaults timeout: @config.rpcs.list_offers.timeout,
|
4861
|
+
metadata: metadata,
|
4862
|
+
retry_policy: @config.rpcs.list_offers.retry_policy
|
4863
|
+
|
4864
|
+
options.apply_defaults timeout: @config.timeout,
|
4865
|
+
metadata: @config.metadata,
|
4866
|
+
retry_policy: @config.retry_policy
|
4867
|
+
|
4868
|
+
@cloud_channel_service_stub.call_rpc :list_offers, request, options: options do |response, operation|
|
4869
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, request, response, operation, options
|
4870
|
+
yield response, operation if block_given?
|
4871
|
+
return response
|
4872
|
+
end
|
4873
|
+
rescue ::GRPC::BadStatus => e
|
4874
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4875
|
+
end
|
4876
|
+
|
4877
|
+
##
|
4878
|
+
# Lists the following:
|
4879
|
+
#
|
4880
|
+
# * SKUs that you can purchase for a customer
|
4881
|
+
# * SKUs that you can upgrade or downgrade for an entitlement.
|
4882
|
+
#
|
4883
|
+
# Possible error codes:
|
4884
|
+
#
|
4885
|
+
# * PERMISSION_DENIED: The customer doesn't belong to the reseller.
|
4886
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
4887
|
+
#
|
4888
|
+
# @overload list_purchasable_skus(request, options = nil)
|
4889
|
+
# Pass arguments to `list_purchasable_skus` via a request object, either of type
|
4890
|
+
# {::Google::Cloud::Channel::V1::ListPurchasableSkusRequest} or an equivalent Hash.
|
4891
|
+
#
|
4892
|
+
# @param request [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, ::Hash]
|
4893
|
+
# A request object representing the call parameters. Required. To specify no
|
4894
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4895
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4896
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4897
|
+
#
|
4898
|
+
# @overload list_purchasable_skus(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil)
|
4899
|
+
# Pass arguments to `list_purchasable_skus` via keyword arguments. Note that at
|
4900
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4901
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4902
|
+
#
|
4903
|
+
# @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash]
|
4904
|
+
# List SKUs for CreateEntitlement purchase.
|
4905
|
+
# @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash]
|
4906
|
+
# List SKUs for ChangeOffer purchase with a new SKU.
|
4907
|
+
# @param customer [::String]
|
4908
|
+
# Required. The resource name of the customer to list SKUs for.
|
4909
|
+
# Format: accounts/\\{account_id}/customers/\\{customer_id}.
|
4910
|
+
# @param page_size [::Integer]
|
4911
|
+
# Optional. Requested page size. Server might return fewer results than requested.
|
4912
|
+
# If unspecified, returns at most 100 SKUs.
|
4913
|
+
# The maximum value is 1000; the server will coerce values above 1000.
|
4914
|
+
# @param page_token [::String]
|
4915
|
+
# Optional. A token for a page of results other than the first page.
|
4916
|
+
# @param language_code [::String]
|
4917
|
+
# Optional. The BCP-47 language code. For example, "en-US". The
|
4918
|
+
# response will localize in the corresponding language code, if specified.
|
4919
|
+
# The default value is "en-US".
|
4920
|
+
#
|
4921
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4922
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>]
|
4923
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4924
|
+
#
|
4925
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>]
|
4926
|
+
#
|
4927
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4928
|
+
#
|
4929
|
+
# @example Basic example
|
4930
|
+
# require "google/cloud/channel/v1"
|
4931
|
+
#
|
4932
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4933
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4934
|
+
#
|
4935
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4936
|
+
# request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new
|
4937
|
+
#
|
4938
|
+
# # Call the list_purchasable_skus method.
|
4939
|
+
# result = client.list_purchasable_skus request
|
4940
|
+
#
|
4941
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
4942
|
+
# # iterate over all elements by calling #each, and the enumerable
|
4943
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
4944
|
+
# # methods are also available for managing paging directly.
|
4945
|
+
# result.each do |response|
|
4946
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku.
|
4947
|
+
# p response
|
4948
|
+
# end
|
4949
|
+
#
|
4950
|
+
def list_purchasable_skus request, options = nil
|
4951
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4952
|
+
|
4953
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest
|
4954
|
+
|
4955
|
+
# Converts hash and nil to an options object
|
4956
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4957
|
+
|
4958
|
+
# Customize the options with defaults
|
4959
|
+
metadata = @config.rpcs.list_purchasable_skus.metadata.to_h
|
4960
|
+
|
4961
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4962
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4963
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4964
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4965
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4966
|
+
|
4967
|
+
header_params = {}
|
4968
|
+
if request.customer
|
4969
|
+
header_params["customer"] = request.customer
|
4970
|
+
end
|
4971
|
+
|
4972
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4973
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4974
|
+
|
4975
|
+
options.apply_defaults timeout: @config.rpcs.list_purchasable_skus.timeout,
|
4976
|
+
metadata: metadata,
|
4977
|
+
retry_policy: @config.rpcs.list_purchasable_skus.retry_policy
|
4978
|
+
|
4979
|
+
options.apply_defaults timeout: @config.timeout,
|
4980
|
+
metadata: @config.metadata,
|
4981
|
+
retry_policy: @config.retry_policy
|
4982
|
+
|
4983
|
+
@cloud_channel_service_stub.call_rpc :list_purchasable_skus, request, options: options do |response, operation|
|
4984
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, request, response, operation, options
|
4985
|
+
yield response, operation if block_given?
|
4986
|
+
return response
|
4987
|
+
end
|
4988
|
+
rescue ::GRPC::BadStatus => e
|
4989
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4990
|
+
end
|
4991
|
+
|
4992
|
+
##
|
4993
|
+
# Lists the following:
|
4994
|
+
#
|
4995
|
+
# * Offers that you can purchase for a customer.
|
4996
|
+
# * Offers that you can change for an entitlement.
|
4997
|
+
#
|
4998
|
+
# Possible error codes:
|
4999
|
+
#
|
5000
|
+
# * PERMISSION_DENIED: The customer doesn't belong to the reseller
|
5001
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
5002
|
+
#
|
5003
|
+
# @overload list_purchasable_offers(request, options = nil)
|
5004
|
+
# Pass arguments to `list_purchasable_offers` via a request object, either of type
|
3863
5005
|
# {::Google::Cloud::Channel::V1::ListPurchasableOffersRequest} or an equivalent Hash.
|
3864
5006
|
#
|
3865
5007
|
# @param request [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, ::Hash]
|
@@ -4550,6 +5692,56 @@ module Google
|
|
4550
5692
|
#
|
4551
5693
|
attr_reader :update_channel_partner_link
|
4552
5694
|
##
|
5695
|
+
# RPC-specific configuration for `get_customer_repricing_config`
|
5696
|
+
# @return [::Gapic::Config::Method]
|
5697
|
+
#
|
5698
|
+
attr_reader :get_customer_repricing_config
|
5699
|
+
##
|
5700
|
+
# RPC-specific configuration for `list_customer_repricing_configs`
|
5701
|
+
# @return [::Gapic::Config::Method]
|
5702
|
+
#
|
5703
|
+
attr_reader :list_customer_repricing_configs
|
5704
|
+
##
|
5705
|
+
# RPC-specific configuration for `create_customer_repricing_config`
|
5706
|
+
# @return [::Gapic::Config::Method]
|
5707
|
+
#
|
5708
|
+
attr_reader :create_customer_repricing_config
|
5709
|
+
##
|
5710
|
+
# RPC-specific configuration for `update_customer_repricing_config`
|
5711
|
+
# @return [::Gapic::Config::Method]
|
5712
|
+
#
|
5713
|
+
attr_reader :update_customer_repricing_config
|
5714
|
+
##
|
5715
|
+
# RPC-specific configuration for `delete_customer_repricing_config`
|
5716
|
+
# @return [::Gapic::Config::Method]
|
5717
|
+
#
|
5718
|
+
attr_reader :delete_customer_repricing_config
|
5719
|
+
##
|
5720
|
+
# RPC-specific configuration for `get_channel_partner_repricing_config`
|
5721
|
+
# @return [::Gapic::Config::Method]
|
5722
|
+
#
|
5723
|
+
attr_reader :get_channel_partner_repricing_config
|
5724
|
+
##
|
5725
|
+
# RPC-specific configuration for `list_channel_partner_repricing_configs`
|
5726
|
+
# @return [::Gapic::Config::Method]
|
5727
|
+
#
|
5728
|
+
attr_reader :list_channel_partner_repricing_configs
|
5729
|
+
##
|
5730
|
+
# RPC-specific configuration for `create_channel_partner_repricing_config`
|
5731
|
+
# @return [::Gapic::Config::Method]
|
5732
|
+
#
|
5733
|
+
attr_reader :create_channel_partner_repricing_config
|
5734
|
+
##
|
5735
|
+
# RPC-specific configuration for `update_channel_partner_repricing_config`
|
5736
|
+
# @return [::Gapic::Config::Method]
|
5737
|
+
#
|
5738
|
+
attr_reader :update_channel_partner_repricing_config
|
5739
|
+
##
|
5740
|
+
# RPC-specific configuration for `delete_channel_partner_repricing_config`
|
5741
|
+
# @return [::Gapic::Config::Method]
|
5742
|
+
#
|
5743
|
+
attr_reader :delete_channel_partner_repricing_config
|
5744
|
+
##
|
4553
5745
|
# RPC-specific configuration for `lookup_offer`
|
4554
5746
|
# @return [::Gapic::Config::Method]
|
4555
5747
|
#
|
@@ -4649,6 +5841,26 @@ module Google
|
|
4649
5841
|
@create_channel_partner_link = ::Gapic::Config::Method.new create_channel_partner_link_config
|
4650
5842
|
update_channel_partner_link_config = parent_rpcs.update_channel_partner_link if parent_rpcs.respond_to? :update_channel_partner_link
|
4651
5843
|
@update_channel_partner_link = ::Gapic::Config::Method.new update_channel_partner_link_config
|
5844
|
+
get_customer_repricing_config_config = parent_rpcs.get_customer_repricing_config if parent_rpcs.respond_to? :get_customer_repricing_config
|
5845
|
+
@get_customer_repricing_config = ::Gapic::Config::Method.new get_customer_repricing_config_config
|
5846
|
+
list_customer_repricing_configs_config = parent_rpcs.list_customer_repricing_configs if parent_rpcs.respond_to? :list_customer_repricing_configs
|
5847
|
+
@list_customer_repricing_configs = ::Gapic::Config::Method.new list_customer_repricing_configs_config
|
5848
|
+
create_customer_repricing_config_config = parent_rpcs.create_customer_repricing_config if parent_rpcs.respond_to? :create_customer_repricing_config
|
5849
|
+
@create_customer_repricing_config = ::Gapic::Config::Method.new create_customer_repricing_config_config
|
5850
|
+
update_customer_repricing_config_config = parent_rpcs.update_customer_repricing_config if parent_rpcs.respond_to? :update_customer_repricing_config
|
5851
|
+
@update_customer_repricing_config = ::Gapic::Config::Method.new update_customer_repricing_config_config
|
5852
|
+
delete_customer_repricing_config_config = parent_rpcs.delete_customer_repricing_config if parent_rpcs.respond_to? :delete_customer_repricing_config
|
5853
|
+
@delete_customer_repricing_config = ::Gapic::Config::Method.new delete_customer_repricing_config_config
|
5854
|
+
get_channel_partner_repricing_config_config = parent_rpcs.get_channel_partner_repricing_config if parent_rpcs.respond_to? :get_channel_partner_repricing_config
|
5855
|
+
@get_channel_partner_repricing_config = ::Gapic::Config::Method.new get_channel_partner_repricing_config_config
|
5856
|
+
list_channel_partner_repricing_configs_config = parent_rpcs.list_channel_partner_repricing_configs if parent_rpcs.respond_to? :list_channel_partner_repricing_configs
|
5857
|
+
@list_channel_partner_repricing_configs = ::Gapic::Config::Method.new list_channel_partner_repricing_configs_config
|
5858
|
+
create_channel_partner_repricing_config_config = parent_rpcs.create_channel_partner_repricing_config if parent_rpcs.respond_to? :create_channel_partner_repricing_config
|
5859
|
+
@create_channel_partner_repricing_config = ::Gapic::Config::Method.new create_channel_partner_repricing_config_config
|
5860
|
+
update_channel_partner_repricing_config_config = parent_rpcs.update_channel_partner_repricing_config if parent_rpcs.respond_to? :update_channel_partner_repricing_config
|
5861
|
+
@update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config
|
5862
|
+
delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config
|
5863
|
+
@delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config
|
4652
5864
|
lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer
|
4653
5865
|
@lookup_offer = ::Gapic::Config::Method.new lookup_offer_config
|
4654
5866
|
list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products
|