google-cloud-channel-v1 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/channel/v1/billing_accounts_pb.rb +47 -0
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb +10 -1
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb +10 -1
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb +63 -0
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb +75 -0
- data/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +418 -15
- data/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb +10 -1
- data/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb +17 -0
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +1258 -20
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb +75 -0
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb +177 -0
- data/lib/google/cloud/channel/v1/entitlements_pb.rb +1 -1
- data/lib/google/cloud/channel/v1/offers_pb.rb +1 -1
- data/lib/google/cloud/channel/v1/repricing_pb.rb +1 -1
- data/lib/google/cloud/channel/v1/service_pb.rb +13 -1
- data/lib/google/cloud/channel/v1/service_services_pb.rb +87 -12
- data/lib/google/cloud/channel/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/channel/v1/billing_accounts.rb +48 -0
- data/proto_docs/google/cloud/channel/v1/customers.rb +3 -3
- data/proto_docs/google/cloud/channel/v1/entitlements.rb +5 -1
- data/proto_docs/google/cloud/channel/v1/offers.rb +3 -0
- data/proto_docs/google/cloud/channel/v1/repricing.rb +22 -3
- data/proto_docs/google/cloud/channel/v1/service.rb +187 -0
- metadata +7 -5
@@ -190,7 +190,8 @@ module Google
|
|
190
190
|
credentials: credentials,
|
191
191
|
endpoint: @config.endpoint,
|
192
192
|
channel_args: @config.channel_args,
|
193
|
-
interceptors: @config.interceptors
|
193
|
+
interceptors: @config.interceptors,
|
194
|
+
channel_pool_config: @config.channel_pool
|
194
195
|
)
|
195
196
|
end
|
196
197
|
|
@@ -530,8 +531,11 @@ module Google
|
|
530
531
|
#
|
531
532
|
# Possible error codes:
|
532
533
|
#
|
533
|
-
# * PERMISSION_DENIED:
|
534
|
-
#
|
534
|
+
# * PERMISSION_DENIED:
|
535
|
+
# * The reseller account making the request is different from the
|
536
|
+
# reseller account in the API request.
|
537
|
+
# * You are not authorized to create a customer. See
|
538
|
+
# https://support.google.com/channelservices/answer/9759265
|
535
539
|
# * INVALID_ARGUMENT:
|
536
540
|
# * Required request parameters are missing or invalid.
|
537
541
|
# * Domain field value doesn't match the primary email domain.
|
@@ -826,8 +830,11 @@ module Google
|
|
826
830
|
#
|
827
831
|
# Possible error codes:
|
828
832
|
#
|
829
|
-
# * PERMISSION_DENIED:
|
830
|
-
#
|
833
|
+
# * PERMISSION_DENIED:
|
834
|
+
# * The reseller account making the request is different from the
|
835
|
+
# reseller account in the API request.
|
836
|
+
# * You are not authorized to import the customer. See
|
837
|
+
# https://support.google.com/channelservices/answer/9759265
|
831
838
|
# * NOT_FOUND: Cloud Identity doesn't exist or was deleted.
|
832
839
|
# * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is
|
833
840
|
# expired or invalid.
|
@@ -949,7 +956,10 @@ module Google
|
|
949
956
|
#
|
950
957
|
# Possible error codes:
|
951
958
|
#
|
952
|
-
# * PERMISSION_DENIED:
|
959
|
+
# * PERMISSION_DENIED:
|
960
|
+
# * The customer doesn't belong to the reseller.
|
961
|
+
# * You are not authorized to provision cloud identity id. See
|
962
|
+
# https://support.google.com/channelservices/answer/9759265
|
953
963
|
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
954
964
|
# * NOT_FOUND: The customer was not found.
|
955
965
|
# * ALREADY_EXISTS: The customer's primary email already exists. Retry
|
@@ -1330,6 +1340,8 @@ module Google
|
|
1330
1340
|
# auth token.
|
1331
1341
|
# * The reseller account making the request is different
|
1332
1342
|
# from the reseller account in the query.
|
1343
|
+
# * The reseller is not authorized to transact on this Product. See
|
1344
|
+
# https://support.google.com/channelservices/answer/9759265
|
1333
1345
|
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
1334
1346
|
#
|
1335
1347
|
# Return value:
|
@@ -1346,7 +1358,7 @@ module Google
|
|
1346
1358
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1347
1359
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1348
1360
|
#
|
1349
|
-
# @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil)
|
1361
|
+
# @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil, billing_account: nil)
|
1350
1362
|
# Pass arguments to `list_transferable_offers` via keyword arguments. Note that at
|
1351
1363
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1352
1364
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1375,6 +1387,12 @@ module Google
|
|
1375
1387
|
# Optional. The BCP-47 language code. For example, "en-US". The
|
1376
1388
|
# response will localize in the corresponding language code, if specified.
|
1377
1389
|
# The default value is "en-US".
|
1390
|
+
# @param billing_account [::String]
|
1391
|
+
# Optional. The Billing Account to look up Offers for. Format:
|
1392
|
+
# accounts/\\{account_id}/billingAccounts/\\{billing_account_id}.
|
1393
|
+
#
|
1394
|
+
# This field is only relevant for multi-currency accounts. It should be left
|
1395
|
+
# empty for single currency accounts.
|
1378
1396
|
#
|
1379
1397
|
# @yield [response, operation] Access the result along with the RPC operation
|
1380
1398
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>]
|
@@ -1547,7 +1565,10 @@ module Google
|
|
1547
1565
|
#
|
1548
1566
|
# Possible error codes:
|
1549
1567
|
#
|
1550
|
-
# * PERMISSION_DENIED:
|
1568
|
+
# * PERMISSION_DENIED:
|
1569
|
+
# * The customer doesn't belong to the reseller.
|
1570
|
+
# * The reseller is not authorized to transact on this Product. See
|
1571
|
+
# https://support.google.com/channelservices/answer/9759265
|
1551
1572
|
# * INVALID_ARGUMENT:
|
1552
1573
|
# * Required request parameters are missing or invalid.
|
1553
1574
|
# * There is already a customer entitlement for a SKU from the same
|
@@ -1991,7 +2012,7 @@ module Google
|
|
1991
2012
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1992
2013
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1993
2014
|
#
|
1994
|
-
# @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil)
|
2015
|
+
# @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil)
|
1995
2016
|
# Pass arguments to `change_offer` via keyword arguments. Note that at
|
1996
2017
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1997
2018
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2023,6 +2044,12 @@ module Google
|
|
2023
2044
|
# The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
|
2024
2045
|
# with the exception that zero UUID is not supported
|
2025
2046
|
# (`00000000-0000-0000-0000-000000000000`).
|
2047
|
+
# @param billing_account [::String]
|
2048
|
+
# Optional. The billing account resource name that is used to pay for this
|
2049
|
+
# entitlement when setting up billing on a trial subscription.
|
2050
|
+
#
|
2051
|
+
# This field is only relevant for multi-currency accounts. It should be
|
2052
|
+
# left empty for single currency accounts.
|
2026
2053
|
#
|
2027
2054
|
# @yield [response, operation] Access the result along with the RPC operation
|
2028
2055
|
# @yieldparam response [::Gapic::Operation]
|
@@ -2627,7 +2654,10 @@ module Google
|
|
2627
2654
|
#
|
2628
2655
|
# Possible error codes:
|
2629
2656
|
#
|
2630
|
-
# * PERMISSION_DENIED:
|
2657
|
+
# * PERMISSION_DENIED:
|
2658
|
+
# * The customer doesn't belong to the reseller.
|
2659
|
+
# * The reseller is not authorized to transact on this Product. See
|
2660
|
+
# https://support.google.com/channelservices/answer/9759265
|
2631
2661
|
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
2632
2662
|
# * NOT_FOUND: The customer or offer resource was not found.
|
2633
2663
|
# * ALREADY_EXISTS: The SKU was already transferred for the customer.
|
@@ -3606,12 +3636,12 @@ module Google
|
|
3606
3636
|
# * The new config will not modify exports used with other configs.
|
3607
3637
|
# Changes to the config may be immediate, but may take up to 24 hours.
|
3608
3638
|
# * There is a limit of ten configs for any
|
3609
|
-
# {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}
|
3610
|
-
#
|
3639
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement},
|
3640
|
+
# for any
|
3611
3641
|
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
3612
3642
|
# * The contained
|
3613
3643
|
# {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config}
|
3614
|
-
#
|
3644
|
+
# value must be different from the value used in the current config for a
|
3615
3645
|
# {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}.
|
3616
3646
|
#
|
3617
3647
|
# Possible Error Codes:
|
@@ -4198,10 +4228,12 @@ module Google
|
|
4198
4228
|
# * The new config will not modify exports used with other configs.
|
4199
4229
|
# Changes to the config may be immediate, but may take up to 24 hours.
|
4200
4230
|
# * There is a limit of ten configs for any ChannelPartner or
|
4231
|
+
# {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement},
|
4232
|
+
# for any
|
4201
4233
|
# {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
|
4202
4234
|
# * The contained
|
4203
4235
|
# {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config}
|
4204
|
-
#
|
4236
|
+
# value must be different from the value used in the current config for a
|
4205
4237
|
# ChannelPartner.
|
4206
4238
|
#
|
4207
4239
|
# Possible Error Codes:
|
@@ -4526,6 +4558,245 @@ module Google
|
|
4526
4558
|
raise ::Google::Cloud::Error.from_error(e)
|
4527
4559
|
end
|
4528
4560
|
|
4561
|
+
##
|
4562
|
+
# Lists the Rebilling supported SKU groups the account is authorized to
|
4563
|
+
# sell.
|
4564
|
+
# Reference: https://cloud.google.com/skus/sku-groups
|
4565
|
+
#
|
4566
|
+
# Possible Error Codes:
|
4567
|
+
#
|
4568
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
4569
|
+
# being queried are different, or the account doesn't exist.
|
4570
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
4571
|
+
# backend. In this case, contact Cloud Channel support.
|
4572
|
+
#
|
4573
|
+
# Return Value:
|
4574
|
+
# If successful, the {::Google::Cloud::Channel::V1::SkuGroup SkuGroup} resources.
|
4575
|
+
# The data for each resource is displayed in the alphabetical order of SKU
|
4576
|
+
# group display name.
|
4577
|
+
# The data for each resource is displayed in the ascending order of
|
4578
|
+
# {::Google::Cloud::Channel::V1::SkuGroup#display_name SkuGroup.display_name}
|
4579
|
+
#
|
4580
|
+
# If unsuccessful, returns an error.
|
4581
|
+
#
|
4582
|
+
# @overload list_sku_groups(request, options = nil)
|
4583
|
+
# Pass arguments to `list_sku_groups` via a request object, either of type
|
4584
|
+
# {::Google::Cloud::Channel::V1::ListSkuGroupsRequest} or an equivalent Hash.
|
4585
|
+
#
|
4586
|
+
# @param request [::Google::Cloud::Channel::V1::ListSkuGroupsRequest, ::Hash]
|
4587
|
+
# A request object representing the call parameters. Required. To specify no
|
4588
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4589
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4590
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4591
|
+
#
|
4592
|
+
# @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil)
|
4593
|
+
# Pass arguments to `list_sku_groups` via keyword arguments. Note that at
|
4594
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4595
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4596
|
+
#
|
4597
|
+
# @param parent [::String]
|
4598
|
+
# Required. The resource name of the account from which to list SKU groups.
|
4599
|
+
# Parent uses the format: accounts/\\{account}.
|
4600
|
+
# @param page_size [::Integer]
|
4601
|
+
# Optional. The maximum number of SKU groups to return. The service may
|
4602
|
+
# return fewer than this value. If unspecified, returns a maximum of 1000 SKU
|
4603
|
+
# groups. The maximum value is 1000; values above 1000 will be coerced to
|
4604
|
+
# 1000.
|
4605
|
+
# @param page_token [::String]
|
4606
|
+
# Optional. A token identifying a page of results beyond the first page.
|
4607
|
+
# Obtained through
|
4608
|
+
# [ListSkuGroups.next_page_token][] of the previous
|
4609
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups}
|
4610
|
+
# call.
|
4611
|
+
#
|
4612
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4613
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>]
|
4614
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4615
|
+
#
|
4616
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>]
|
4617
|
+
#
|
4618
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4619
|
+
#
|
4620
|
+
# @example Basic example
|
4621
|
+
# require "google/cloud/channel/v1"
|
4622
|
+
#
|
4623
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4624
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4625
|
+
#
|
4626
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4627
|
+
# request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new
|
4628
|
+
#
|
4629
|
+
# # Call the list_sku_groups method.
|
4630
|
+
# result = client.list_sku_groups request
|
4631
|
+
#
|
4632
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4633
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4634
|
+
# result.each do |item|
|
4635
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup.
|
4636
|
+
# p item
|
4637
|
+
# end
|
4638
|
+
#
|
4639
|
+
def list_sku_groups request, options = nil
|
4640
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4641
|
+
|
4642
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest
|
4643
|
+
|
4644
|
+
# Converts hash and nil to an options object
|
4645
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4646
|
+
|
4647
|
+
# Customize the options with defaults
|
4648
|
+
metadata = @config.rpcs.list_sku_groups.metadata.to_h
|
4649
|
+
|
4650
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4651
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4652
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4653
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4654
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4655
|
+
|
4656
|
+
header_params = {}
|
4657
|
+
if request.parent
|
4658
|
+
header_params["parent"] = request.parent
|
4659
|
+
end
|
4660
|
+
|
4661
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4662
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4663
|
+
|
4664
|
+
options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout,
|
4665
|
+
metadata: metadata,
|
4666
|
+
retry_policy: @config.rpcs.list_sku_groups.retry_policy
|
4667
|
+
|
4668
|
+
options.apply_defaults timeout: @config.timeout,
|
4669
|
+
metadata: @config.metadata,
|
4670
|
+
retry_policy: @config.retry_policy
|
4671
|
+
|
4672
|
+
@cloud_channel_service_stub.call_rpc :list_sku_groups, request, options: options do |response, operation|
|
4673
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, request, response, operation, options
|
4674
|
+
yield response, operation if block_given?
|
4675
|
+
return response
|
4676
|
+
end
|
4677
|
+
rescue ::GRPC::BadStatus => e
|
4678
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4679
|
+
end
|
4680
|
+
|
4681
|
+
##
|
4682
|
+
# Lists the Billable SKUs in a given SKU group.
|
4683
|
+
#
|
4684
|
+
# Possible error codes:
|
4685
|
+
# PERMISSION_DENIED: If the account making the request and the account
|
4686
|
+
# being queried for are different, or the account doesn't exist.
|
4687
|
+
# INVALID_ARGUMENT: Missing or invalid required parameters in the
|
4688
|
+
# request.
|
4689
|
+
# INTERNAL: Any non-user error related to technical issue in the
|
4690
|
+
# backend. In this case, contact cloud channel support.
|
4691
|
+
#
|
4692
|
+
# Return Value:
|
4693
|
+
# If successful, the {::Google::Cloud::Channel::V1::BillableSku BillableSku}
|
4694
|
+
# resources. The data for each resource is displayed in the ascending order
|
4695
|
+
# of:
|
4696
|
+
#
|
4697
|
+
# * {::Google::Cloud::Channel::V1::BillableSku#service_display_name BillableSku.service_display_name}
|
4698
|
+
# * {::Google::Cloud::Channel::V1::BillableSku#sku_display_name BillableSku.sku_display_name}
|
4699
|
+
#
|
4700
|
+
# If unsuccessful, returns an error.
|
4701
|
+
#
|
4702
|
+
# @overload list_sku_group_billable_skus(request, options = nil)
|
4703
|
+
# Pass arguments to `list_sku_group_billable_skus` via a request object, either of type
|
4704
|
+
# {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest} or an equivalent Hash.
|
4705
|
+
#
|
4706
|
+
# @param request [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, ::Hash]
|
4707
|
+
# A request object representing the call parameters. Required. To specify no
|
4708
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4709
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4710
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4711
|
+
#
|
4712
|
+
# @overload list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil)
|
4713
|
+
# Pass arguments to `list_sku_group_billable_skus` via keyword arguments. Note that at
|
4714
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4715
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4716
|
+
#
|
4717
|
+
# @param parent [::String]
|
4718
|
+
# Required. Resource name of the SKU group.
|
4719
|
+
# Format: accounts/\\{account}/skuGroups/\\{sku_group}.
|
4720
|
+
# @param page_size [::Integer]
|
4721
|
+
# Optional. The maximum number of SKUs to return. The service may return
|
4722
|
+
# fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
|
4723
|
+
# The maximum value is 100000; values above 100000 will be coerced to 100000.
|
4724
|
+
# @param page_token [::String]
|
4725
|
+
# Optional. A token identifying a page of results beyond the first page.
|
4726
|
+
# Obtained through
|
4727
|
+
# [ListSkuGroupBillableSkus.next_page_token][] of the previous
|
4728
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus}
|
4729
|
+
# call.
|
4730
|
+
#
|
4731
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4732
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>]
|
4733
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4734
|
+
#
|
4735
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>]
|
4736
|
+
#
|
4737
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4738
|
+
#
|
4739
|
+
# @example Basic example
|
4740
|
+
# require "google/cloud/channel/v1"
|
4741
|
+
#
|
4742
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4743
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
4744
|
+
#
|
4745
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4746
|
+
# request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new
|
4747
|
+
#
|
4748
|
+
# # Call the list_sku_group_billable_skus method.
|
4749
|
+
# result = client.list_sku_group_billable_skus request
|
4750
|
+
#
|
4751
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4752
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4753
|
+
# result.each do |item|
|
4754
|
+
# # Each element is of type ::Google::Cloud::Channel::V1::BillableSku.
|
4755
|
+
# p item
|
4756
|
+
# end
|
4757
|
+
#
|
4758
|
+
def list_sku_group_billable_skus request, options = nil
|
4759
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4760
|
+
|
4761
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest
|
4762
|
+
|
4763
|
+
# Converts hash and nil to an options object
|
4764
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4765
|
+
|
4766
|
+
# Customize the options with defaults
|
4767
|
+
metadata = @config.rpcs.list_sku_group_billable_skus.metadata.to_h
|
4768
|
+
|
4769
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4770
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4771
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4772
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
4773
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4774
|
+
|
4775
|
+
header_params = {}
|
4776
|
+
if request.parent
|
4777
|
+
header_params["parent"] = request.parent
|
4778
|
+
end
|
4779
|
+
|
4780
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4781
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4782
|
+
|
4783
|
+
options.apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout,
|
4784
|
+
metadata: metadata,
|
4785
|
+
retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy
|
4786
|
+
|
4787
|
+
options.apply_defaults timeout: @config.timeout,
|
4788
|
+
metadata: @config.metadata,
|
4789
|
+
retry_policy: @config.retry_policy
|
4790
|
+
|
4791
|
+
@cloud_channel_service_stub.call_rpc :list_sku_group_billable_skus, request, options: options do |response, operation|
|
4792
|
+
response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, request, response, operation, options
|
4793
|
+
yield response, operation if block_given?
|
4794
|
+
return response
|
4795
|
+
end
|
4796
|
+
rescue ::GRPC::BadStatus => e
|
4797
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4798
|
+
end
|
4799
|
+
|
4529
4800
|
##
|
4530
4801
|
# Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource.
|
4531
4802
|
#
|
@@ -5066,7 +5337,10 @@ module Google
|
|
5066
5337
|
#
|
5067
5338
|
# Possible error codes:
|
5068
5339
|
#
|
5069
|
-
# * PERMISSION_DENIED:
|
5340
|
+
# * PERMISSION_DENIED:
|
5341
|
+
# * The customer doesn't belong to the reseller
|
5342
|
+
# * The reseller is not authorized to transact on this Product. See
|
5343
|
+
# https://support.google.com/channelservices/answer/9759265
|
5070
5344
|
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
5071
5345
|
#
|
5072
5346
|
# @overload list_purchasable_offers(request, options = nil)
|
@@ -5171,6 +5445,106 @@ module Google
|
|
5171
5445
|
raise ::Google::Cloud::Error.from_error(e)
|
5172
5446
|
end
|
5173
5447
|
|
5448
|
+
##
|
5449
|
+
# Lists the billing accounts that are eligible to purchase particular SKUs
|
5450
|
+
# for a given customer.
|
5451
|
+
#
|
5452
|
+
# Possible error codes:
|
5453
|
+
#
|
5454
|
+
# * PERMISSION_DENIED: The customer doesn't belong to the reseller.
|
5455
|
+
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
5456
|
+
#
|
5457
|
+
# Return value:
|
5458
|
+
# Based on the provided list of SKUs, returns a list of SKU groups that must
|
5459
|
+
# be purchased using the same billing account and the billing accounts
|
5460
|
+
# eligible to purchase each SKU group.
|
5461
|
+
#
|
5462
|
+
# @overload query_eligible_billing_accounts(request, options = nil)
|
5463
|
+
# Pass arguments to `query_eligible_billing_accounts` via a request object, either of type
|
5464
|
+
# {::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest} or an equivalent Hash.
|
5465
|
+
#
|
5466
|
+
# @param request [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, ::Hash]
|
5467
|
+
# A request object representing the call parameters. Required. To specify no
|
5468
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5469
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5470
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5471
|
+
#
|
5472
|
+
# @overload query_eligible_billing_accounts(customer: nil, skus: nil)
|
5473
|
+
# Pass arguments to `query_eligible_billing_accounts` via keyword arguments. Note that at
|
5474
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5475
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5476
|
+
#
|
5477
|
+
# @param customer [::String]
|
5478
|
+
# Required. The resource name of the customer to list eligible billing
|
5479
|
+
# accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}.
|
5480
|
+
# @param skus [::Array<::String>]
|
5481
|
+
# Required. List of SKUs to list eligible billing accounts for. At least one
|
5482
|
+
# SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}.
|
5483
|
+
#
|
5484
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5485
|
+
# @yieldparam response [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse]
|
5486
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5487
|
+
#
|
5488
|
+
# @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse]
|
5489
|
+
#
|
5490
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5491
|
+
#
|
5492
|
+
# @example Basic example
|
5493
|
+
# require "google/cloud/channel/v1"
|
5494
|
+
#
|
5495
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5496
|
+
# client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
|
5497
|
+
#
|
5498
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5499
|
+
# request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new
|
5500
|
+
#
|
5501
|
+
# # Call the query_eligible_billing_accounts method.
|
5502
|
+
# result = client.query_eligible_billing_accounts request
|
5503
|
+
#
|
5504
|
+
# # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.
|
5505
|
+
# p result
|
5506
|
+
#
|
5507
|
+
def query_eligible_billing_accounts request, options = nil
|
5508
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5509
|
+
|
5510
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest
|
5511
|
+
|
5512
|
+
# Converts hash and nil to an options object
|
5513
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5514
|
+
|
5515
|
+
# Customize the options with defaults
|
5516
|
+
metadata = @config.rpcs.query_eligible_billing_accounts.metadata.to_h
|
5517
|
+
|
5518
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
5519
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5520
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5521
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION
|
5522
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5523
|
+
|
5524
|
+
header_params = {}
|
5525
|
+
if request.customer
|
5526
|
+
header_params["customer"] = request.customer
|
5527
|
+
end
|
5528
|
+
|
5529
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5530
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5531
|
+
|
5532
|
+
options.apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout,
|
5533
|
+
metadata: metadata,
|
5534
|
+
retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy
|
5535
|
+
|
5536
|
+
options.apply_defaults timeout: @config.timeout,
|
5537
|
+
metadata: @config.metadata,
|
5538
|
+
retry_policy: @config.retry_policy
|
5539
|
+
|
5540
|
+
@cloud_channel_service_stub.call_rpc :query_eligible_billing_accounts, request, options: options do |response, operation|
|
5541
|
+
yield response, operation if block_given?
|
5542
|
+
return response
|
5543
|
+
end
|
5544
|
+
rescue ::GRPC::BadStatus => e
|
5545
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5546
|
+
end
|
5547
|
+
|
5174
5548
|
##
|
5175
5549
|
# Registers a service account with subscriber privileges on the Cloud Pub/Sub
|
5176
5550
|
# topic for this Channel Services account. After you create a
|
@@ -5740,6 +6114,14 @@ module Google
|
|
5740
6114
|
end
|
5741
6115
|
end
|
5742
6116
|
|
6117
|
+
##
|
6118
|
+
# Configuration for the channel pool
|
6119
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
6120
|
+
#
|
6121
|
+
def channel_pool
|
6122
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
6123
|
+
end
|
6124
|
+
|
5743
6125
|
##
|
5744
6126
|
# Configuration RPC class for the CloudChannelService API.
|
5745
6127
|
#
|
@@ -5939,6 +6321,16 @@ module Google
|
|
5939
6321
|
#
|
5940
6322
|
attr_reader :delete_channel_partner_repricing_config
|
5941
6323
|
##
|
6324
|
+
# RPC-specific configuration for `list_sku_groups`
|
6325
|
+
# @return [::Gapic::Config::Method]
|
6326
|
+
#
|
6327
|
+
attr_reader :list_sku_groups
|
6328
|
+
##
|
6329
|
+
# RPC-specific configuration for `list_sku_group_billable_skus`
|
6330
|
+
# @return [::Gapic::Config::Method]
|
6331
|
+
#
|
6332
|
+
attr_reader :list_sku_group_billable_skus
|
6333
|
+
##
|
5942
6334
|
# RPC-specific configuration for `lookup_offer`
|
5943
6335
|
# @return [::Gapic::Config::Method]
|
5944
6336
|
#
|
@@ -5969,6 +6361,11 @@ module Google
|
|
5969
6361
|
#
|
5970
6362
|
attr_reader :list_purchasable_offers
|
5971
6363
|
##
|
6364
|
+
# RPC-specific configuration for `query_eligible_billing_accounts`
|
6365
|
+
# @return [::Gapic::Config::Method]
|
6366
|
+
#
|
6367
|
+
attr_reader :query_eligible_billing_accounts
|
6368
|
+
##
|
5972
6369
|
# RPC-specific configuration for `register_subscriber`
|
5973
6370
|
# @return [::Gapic::Config::Method]
|
5974
6371
|
#
|
@@ -6063,6 +6460,10 @@ module Google
|
|
6063
6460
|
@update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config
|
6064
6461
|
delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config
|
6065
6462
|
@delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config
|
6463
|
+
list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups
|
6464
|
+
@list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config
|
6465
|
+
list_sku_group_billable_skus_config = parent_rpcs.list_sku_group_billable_skus if parent_rpcs.respond_to? :list_sku_group_billable_skus
|
6466
|
+
@list_sku_group_billable_skus = ::Gapic::Config::Method.new list_sku_group_billable_skus_config
|
6066
6467
|
lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer
|
6067
6468
|
@lookup_offer = ::Gapic::Config::Method.new lookup_offer_config
|
6068
6469
|
list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products
|
@@ -6075,6 +6476,8 @@ module Google
|
|
6075
6476
|
@list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config
|
6076
6477
|
list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers
|
6077
6478
|
@list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config
|
6479
|
+
query_eligible_billing_accounts_config = parent_rpcs.query_eligible_billing_accounts if parent_rpcs.respond_to? :query_eligible_billing_accounts
|
6480
|
+
@query_eligible_billing_accounts = ::Gapic::Config::Method.new query_eligible_billing_accounts_config
|
6078
6481
|
register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber
|
6079
6482
|
@register_subscriber = ::Gapic::Config::Method.new register_subscriber_config
|
6080
6483
|
unregister_subscriber_config = parent_rpcs.unregister_subscriber if parent_rpcs.respond_to? :unregister_subscriber
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -701,6 +702,14 @@ module Google
|
|
701
702
|
end
|
702
703
|
end
|
703
704
|
|
705
|
+
##
|
706
|
+
# Configuration for the channel pool
|
707
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
708
|
+
#
|
709
|
+
def channel_pool
|
710
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
711
|
+
end
|
712
|
+
|
704
713
|
##
|
705
714
|
# Configuration RPC class for the Operations API.
|
706
715
|
#
|
@@ -146,6 +146,23 @@ module Google
|
|
146
146
|
"products/#{product}"
|
147
147
|
end
|
148
148
|
|
149
|
+
##
|
150
|
+
# Create a fully-qualified SkuGroup resource string.
|
151
|
+
#
|
152
|
+
# The resource will be in the following format:
|
153
|
+
#
|
154
|
+
# `accounts/{account}/skuGroups/{sku_group}`
|
155
|
+
#
|
156
|
+
# @param account [String]
|
157
|
+
# @param sku_group [String]
|
158
|
+
#
|
159
|
+
# @return [::String]
|
160
|
+
def sku_group_path account:, sku_group:
|
161
|
+
raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/"
|
162
|
+
|
163
|
+
"accounts/#{account}/skuGroups/#{sku_group}"
|
164
|
+
end
|
165
|
+
|
149
166
|
extend self
|
150
167
|
end
|
151
168
|
end
|