google-cloud-channel-v1 0.10.0 → 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/lib/google/cloud/channel/v1/channel_partner_links_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +1208 -0
- data/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb +38 -0
- data/lib/google/cloud/channel/v1/common_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/customers_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/entitlements_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/offers_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/products_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/repricing_pb.rb +69 -0
- data/lib/google/cloud/channel/v1/service_pb.rb +61 -1
- data/lib/google/cloud/channel/v1/service_services_pb.rb +238 -0
- data/lib/google/cloud/channel/v1/subscriber_event_pb.rb +2 -1
- data/lib/google/cloud/channel/v1/version.rb +1 -1
- data/proto_docs/google/cloud/channel/v1/repricing.rb +148 -0
- data/proto_docs/google/cloud/channel/v1/service.rb +186 -0
- 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 -2
@@ -3316,6 +3316,1144 @@ module Google
|
|
3316
3316
|
raise ::Google::Cloud::Error.from_error(e)
|
3317
3317
|
end
|
3318
3318
|
|
3319
|
+
##
|
3320
|
+
# Gets information about how a Reseller modifies their bill before sending
|
3321
|
+
# it to a Customer.
|
3322
|
+
#
|
3323
|
+
# Possible Error Codes:
|
3324
|
+
#
|
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.
|
3330
|
+
#
|
3331
|
+
# Return Value:
|
3332
|
+
# If successful, the {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} resource, otherwise returns
|
3333
|
+
# an error.
|
3334
|
+
#
|
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.
|
3338
|
+
#
|
3339
|
+
# @param request [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, ::Hash]
|
3340
|
+
# A request object representing the call parameters. Required. To specify no
|
3341
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3342
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3343
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3344
|
+
#
|
3345
|
+
# @overload get_customer_repricing_config(name: nil)
|
3346
|
+
# Pass arguments to `get_customer_repricing_config` via keyword arguments. Note that at
|
3347
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3348
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3349
|
+
#
|
3350
|
+
# @param name [::String]
|
3351
|
+
# Required. The resource name of the CustomerRepricingConfig.
|
3352
|
+
# Format:
|
3353
|
+
# accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}.
|
3354
|
+
#
|
3355
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3356
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3357
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3358
|
+
#
|
3359
|
+
# @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3360
|
+
#
|
3361
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3362
|
+
#
|
3363
|
+
# @example Basic example
|
3364
|
+
# require "google/cloud/channel/v1"
|
3365
|
+
#
|
3366
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3367
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3368
|
+
#
|
3369
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3370
|
+
# request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new
|
3371
|
+
#
|
3372
|
+
# # Call the get_customer_repricing_config method.
|
3373
|
+
# result = client.get_customer_repricing_config request
|
3374
|
+
#
|
3375
|
+
# # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3376
|
+
# p result
|
3377
|
+
#
|
3378
|
+
def get_customer_repricing_config request, options = nil
|
3379
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3380
|
+
|
3381
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest
|
3382
|
+
|
3383
|
+
# Converts hash and nil to an options object
|
3384
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3385
|
+
|
3386
|
+
# Customize the options with defaults
|
3387
|
+
metadata = @config.rpcs.get_customer_repricing_config.metadata.to_h
|
3388
|
+
|
3389
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3390
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3391
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3392
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3393
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3394
|
+
|
3395
|
+
header_params = {}
|
3396
|
+
if request.name
|
3397
|
+
header_params["name"] = request.name
|
3398
|
+
end
|
3399
|
+
|
3400
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3401
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3402
|
+
|
3403
|
+
options.apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout,
|
3404
|
+
metadata: metadata,
|
3405
|
+
retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy
|
3406
|
+
|
3407
|
+
options.apply_defaults timeout: @config.timeout,
|
3408
|
+
metadata: @config.metadata,
|
3409
|
+
retry_policy: @config.retry_policy
|
3410
|
+
|
3411
|
+
@cloud_channel_service_stub.call_rpc :get_customer_repricing_config, request, options: options do |response, operation|
|
3412
|
+
yield response, operation if block_given?
|
3413
|
+
return response
|
3414
|
+
end
|
3415
|
+
rescue ::GRPC::BadStatus => e
|
3416
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3417
|
+
end
|
3418
|
+
|
3419
|
+
##
|
3420
|
+
# Lists information about how a Reseller modifies their bill before sending
|
3421
|
+
# it to a Customer.
|
3422
|
+
#
|
3423
|
+
# Possible Error Codes:
|
3424
|
+
#
|
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.
|
3431
|
+
#
|
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}
|
3439
|
+
#
|
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]
|
3447
|
+
# A request object representing the call parameters. Required. To specify no
|
3448
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3449
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3450
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3451
|
+
#
|
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
|
3454
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3455
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3456
|
+
#
|
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.
|
3462
|
+
# @param page_size [::Integer]
|
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.
|
3466
|
+
# @param page_token [::String]
|
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.
|
3479
|
+
#
|
3480
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3481
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>]
|
3482
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3483
|
+
#
|
3484
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>]
|
3485
|
+
#
|
3486
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3487
|
+
#
|
3488
|
+
# @example Basic example
|
3489
|
+
# require "google/cloud/channel/v1"
|
3490
|
+
#
|
3491
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3492
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3493
|
+
#
|
3494
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3495
|
+
# request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new
|
3496
|
+
#
|
3497
|
+
# # Call the list_customer_repricing_configs method.
|
3498
|
+
# result = client.list_customer_repricing_configs request
|
3499
|
+
#
|
3500
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3501
|
+
# # iterate over all elements by calling #each, and the enumerable
|
3502
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
3503
|
+
# # methods are also available for managing paging directly.
|
3504
|
+
# result.each do |response|
|
3505
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3506
|
+
# p response
|
3507
|
+
# end
|
3508
|
+
#
|
3509
|
+
def list_customer_repricing_configs request, options = nil
|
3510
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3511
|
+
|
3512
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest
|
3513
|
+
|
3514
|
+
# Converts hash and nil to an options object
|
3515
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3516
|
+
|
3517
|
+
# Customize the options with defaults
|
3518
|
+
metadata = @config.rpcs.list_customer_repricing_configs.metadata.to_h
|
3519
|
+
|
3520
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3521
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3522
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3523
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3524
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3525
|
+
|
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,
|
3535
|
+
metadata: metadata,
|
3536
|
+
retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy
|
3537
|
+
|
3538
|
+
options.apply_defaults timeout: @config.timeout,
|
3539
|
+
metadata: @config.metadata,
|
3540
|
+
retry_policy: @config.retry_policy
|
3541
|
+
|
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
|
3544
|
+
yield response, operation if block_given?
|
3545
|
+
return response
|
3546
|
+
end
|
3547
|
+
rescue ::GRPC::BadStatus => e
|
3548
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3549
|
+
end
|
3550
|
+
|
3551
|
+
##
|
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]
|
3596
|
+
# A request object representing the call parameters. Required. To specify no
|
3597
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3598
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3599
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3600
|
+
#
|
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
|
3603
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3604
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3605
|
+
#
|
3606
|
+
# @param parent [::String]
|
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.
|
3611
|
+
#
|
3612
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3613
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3614
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3615
|
+
#
|
3616
|
+
# @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3617
|
+
#
|
3618
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3619
|
+
#
|
3620
|
+
# @example Basic example
|
3621
|
+
# require "google/cloud/channel/v1"
|
3622
|
+
#
|
3623
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3624
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3625
|
+
#
|
3626
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3627
|
+
# request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new
|
3628
|
+
#
|
3629
|
+
# # Call the create_customer_repricing_config method.
|
3630
|
+
# result = client.create_customer_repricing_config request
|
3631
|
+
#
|
3632
|
+
# # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3633
|
+
# p result
|
3634
|
+
#
|
3635
|
+
def create_customer_repricing_config request, options = nil
|
3636
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3637
|
+
|
3638
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest
|
3639
|
+
|
3640
|
+
# Converts hash and nil to an options object
|
3641
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3642
|
+
|
3643
|
+
# Customize the options with defaults
|
3644
|
+
metadata = @config.rpcs.create_customer_repricing_config.metadata.to_h
|
3645
|
+
|
3646
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3647
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3648
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3649
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3650
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3651
|
+
|
3652
|
+
header_params = {}
|
3653
|
+
if request.parent
|
3654
|
+
header_params["parent"] = request.parent
|
3655
|
+
end
|
3656
|
+
|
3657
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3658
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3659
|
+
|
3660
|
+
options.apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout,
|
3661
|
+
metadata: metadata,
|
3662
|
+
retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy
|
3663
|
+
|
3664
|
+
options.apply_defaults timeout: @config.timeout,
|
3665
|
+
metadata: @config.metadata,
|
3666
|
+
retry_policy: @config.retry_policy
|
3667
|
+
|
3668
|
+
@cloud_channel_service_stub.call_rpc :create_customer_repricing_config, request, options: options do |response, operation|
|
3669
|
+
yield response, operation if block_given?
|
3670
|
+
return response
|
3671
|
+
end
|
3672
|
+
rescue ::GRPC::BadStatus => e
|
3673
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3674
|
+
end
|
3675
|
+
|
3676
|
+
##
|
3677
|
+
# Updates a CustomerRepricingConfig. Call this method to set modifications
|
3678
|
+
# for a specific customer's bill. This method overwrites the existing
|
3679
|
+
# CustomerRepricingConfig.
|
3680
|
+
#
|
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}.
|
3686
|
+
#
|
3687
|
+
# When updating a config in the future:
|
3688
|
+
#
|
3689
|
+
# * This config must already exist.
|
3690
|
+
#
|
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]
|
3712
|
+
# A request object representing the call parameters. Required. To specify no
|
3713
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3714
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3715
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3716
|
+
#
|
3717
|
+
# @overload update_customer_repricing_config(customer_repricing_config: nil)
|
3718
|
+
# Pass arguments to `update_customer_repricing_config` via keyword arguments. Note that at
|
3719
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3720
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3721
|
+
#
|
3722
|
+
# @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash]
|
3723
|
+
# Required. The CustomerRepricingConfig object to update.
|
3724
|
+
#
|
3725
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3726
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3727
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3728
|
+
#
|
3729
|
+
# @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig]
|
3730
|
+
#
|
3731
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3732
|
+
#
|
3733
|
+
# @example Basic example
|
3734
|
+
# require "google/cloud/channel/v1"
|
3735
|
+
#
|
3736
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3737
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3738
|
+
#
|
3739
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3740
|
+
# request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new
|
3741
|
+
#
|
3742
|
+
# # Call the update_customer_repricing_config method.
|
3743
|
+
# result = client.update_customer_repricing_config request
|
3744
|
+
#
|
3745
|
+
# # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig.
|
3746
|
+
# p result
|
3747
|
+
#
|
3748
|
+
def update_customer_repricing_config request, options = nil
|
3749
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3750
|
+
|
3751
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest
|
3752
|
+
|
3753
|
+
# Converts hash and nil to an options object
|
3754
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3755
|
+
|
3756
|
+
# Customize the options with defaults
|
3757
|
+
metadata = @config.rpcs.update_customer_repricing_config.metadata.to_h
|
3758
|
+
|
3759
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3760
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3761
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3762
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3763
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3764
|
+
|
3765
|
+
header_params = {}
|
3766
|
+
if request.customer_repricing_config&.name
|
3767
|
+
header_params["customer_repricing_config.name"] = request.customer_repricing_config.name
|
3768
|
+
end
|
3769
|
+
|
3770
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3771
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3772
|
+
|
3773
|
+
options.apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout,
|
3774
|
+
metadata: metadata,
|
3775
|
+
retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy
|
3776
|
+
|
3777
|
+
options.apply_defaults timeout: @config.timeout,
|
3778
|
+
metadata: @config.metadata,
|
3779
|
+
retry_policy: @config.retry_policy
|
3780
|
+
|
3781
|
+
@cloud_channel_service_stub.call_rpc :update_customer_repricing_config, request, options: options do |response, operation|
|
3782
|
+
yield response, operation if block_given?
|
3783
|
+
return response
|
3784
|
+
end
|
3785
|
+
rescue ::GRPC::BadStatus => e
|
3786
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3787
|
+
end
|
3788
|
+
|
3789
|
+
##
|
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.
|
3793
|
+
#
|
3794
|
+
# Possible error codes:
|
3795
|
+
#
|
3796
|
+
# * PERMISSION_DENIED: The account making the request does not own
|
3797
|
+
# this customer.
|
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.
|
3803
|
+
#
|
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.
|
3807
|
+
#
|
3808
|
+
# @param request [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, ::Hash]
|
3809
|
+
# A request object representing the call parameters. Required. To specify no
|
3810
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3811
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3812
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3813
|
+
#
|
3814
|
+
# @overload delete_customer_repricing_config(name: nil)
|
3815
|
+
# Pass arguments to `delete_customer_repricing_config` via keyword arguments. Note that at
|
3816
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3817
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3818
|
+
#
|
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}.
|
3823
|
+
#
|
3824
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3825
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3826
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3827
|
+
#
|
3828
|
+
# @return [::Google::Protobuf::Empty]
|
3829
|
+
#
|
3830
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3831
|
+
#
|
3832
|
+
# @example Basic example
|
3833
|
+
# require "google/cloud/channel/v1"
|
3834
|
+
#
|
3835
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3836
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
3837
|
+
#
|
3838
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3839
|
+
# request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new
|
3840
|
+
#
|
3841
|
+
# # Call the delete_customer_repricing_config method.
|
3842
|
+
# result = client.delete_customer_repricing_config request
|
3843
|
+
#
|
3844
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3845
|
+
# p result
|
3846
|
+
#
|
3847
|
+
def delete_customer_repricing_config request, options = nil
|
3848
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3849
|
+
|
3850
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest
|
3851
|
+
|
3852
|
+
# Converts hash and nil to an options object
|
3853
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3854
|
+
|
3855
|
+
# Customize the options with defaults
|
3856
|
+
metadata = @config.rpcs.delete_customer_repricing_config.metadata.to_h
|
3857
|
+
|
3858
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3859
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3860
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3861
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
3862
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3863
|
+
|
3864
|
+
header_params = {}
|
3865
|
+
if request.name
|
3866
|
+
header_params["name"] = request.name
|
3867
|
+
end
|
3868
|
+
|
3869
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3870
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3871
|
+
|
3872
|
+
options.apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout,
|
3873
|
+
metadata: metadata,
|
3874
|
+
retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy
|
3875
|
+
|
3876
|
+
options.apply_defaults timeout: @config.timeout,
|
3877
|
+
metadata: @config.metadata,
|
3878
|
+
retry_policy: @config.retry_policy
|
3879
|
+
|
3880
|
+
@cloud_channel_service_stub.call_rpc :delete_customer_repricing_config, request, options: options do |response, operation|
|
3881
|
+
yield response, operation if block_given?
|
3882
|
+
return response
|
3883
|
+
end
|
3884
|
+
rescue ::GRPC::BadStatus => e
|
3885
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3886
|
+
end
|
3887
|
+
|
3888
|
+
##
|
3889
|
+
# Gets information about how a Distributor modifies their bill before sending
|
3890
|
+
# it to a ChannelPartner.
|
3891
|
+
#
|
3892
|
+
# Possible Error Codes:
|
3893
|
+
#
|
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.
|
3899
|
+
#
|
3900
|
+
# Return Value:
|
3901
|
+
# If successful, the {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} resource, otherwise
|
3902
|
+
# returns an error.
|
3903
|
+
#
|
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
|
+
|
3319
4457
|
##
|
3320
4458
|
# Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource.
|
3321
4459
|
#
|
@@ -4554,6 +5692,56 @@ module Google
|
|
4554
5692
|
#
|
4555
5693
|
attr_reader :update_channel_partner_link
|
4556
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
|
+
##
|
4557
5745
|
# RPC-specific configuration for `lookup_offer`
|
4558
5746
|
# @return [::Gapic::Config::Method]
|
4559
5747
|
#
|
@@ -4653,6 +5841,26 @@ module Google
|
|
4653
5841
|
@create_channel_partner_link = ::Gapic::Config::Method.new create_channel_partner_link_config
|
4654
5842
|
update_channel_partner_link_config = parent_rpcs.update_channel_partner_link if parent_rpcs.respond_to? :update_channel_partner_link
|
4655
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
|
4656
5864
|
lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer
|
4657
5865
|
@lookup_offer = ::Gapic::Config::Method.new lookup_offer_config
|
4658
5866
|
list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products
|