google-cloud-channel-v1 0.21.0 → 0.22.1
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/billing_accounts_pb.rb +47 -0
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb +35 -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 +82 -0
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb +75 -0
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb +5 -0
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb +5 -0
- data/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +165 -15
- data/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb +10 -1
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +1053 -14
- 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 +59 -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/reports_service_pb.rb +1 -1
- data/lib/google/cloud/channel/v1/reports_service_services_pb.rb +17 -0
- data/lib/google/cloud/channel/v1/repricing_pb.rb +1 -1
- data/lib/google/cloud/channel/v1/service_pb.rb +7 -1
- data/lib/google/cloud/channel/v1/service_services_pb.rb +47 -12
- data/lib/google/cloud/channel/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +13 -0
- 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 +75 -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:
|
@@ -5305,7 +5337,10 @@ module Google
|
|
5305
5337
|
#
|
5306
5338
|
# Possible error codes:
|
5307
5339
|
#
|
5308
|
-
# * 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
|
5309
5344
|
# * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
5310
5345
|
#
|
5311
5346
|
# @overload list_purchasable_offers(request, options = nil)
|
@@ -5410,6 +5445,106 @@ module Google
|
|
5410
5445
|
raise ::Google::Cloud::Error.from_error(e)
|
5411
5446
|
end
|
5412
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
|
+
|
5413
5548
|
##
|
5414
5549
|
# Registers a service account with subscriber privileges on the Cloud Pub/Sub
|
5415
5550
|
# topic for this Channel Services account. After you create a
|
@@ -5979,6 +6114,14 @@ module Google
|
|
5979
6114
|
end
|
5980
6115
|
end
|
5981
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
|
+
|
5982
6125
|
##
|
5983
6126
|
# Configuration RPC class for the CloudChannelService API.
|
5984
6127
|
#
|
@@ -6218,6 +6361,11 @@ module Google
|
|
6218
6361
|
#
|
6219
6362
|
attr_reader :list_purchasable_offers
|
6220
6363
|
##
|
6364
|
+
# RPC-specific configuration for `query_eligible_billing_accounts`
|
6365
|
+
# @return [::Gapic::Config::Method]
|
6366
|
+
#
|
6367
|
+
attr_reader :query_eligible_billing_accounts
|
6368
|
+
##
|
6221
6369
|
# RPC-specific configuration for `register_subscriber`
|
6222
6370
|
# @return [::Gapic::Config::Method]
|
6223
6371
|
#
|
@@ -6328,6 +6476,8 @@ module Google
|
|
6328
6476
|
@list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config
|
6329
6477
|
list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers
|
6330
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
|
6331
6481
|
register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber
|
6332
6482
|
@register_subscriber = ::Gapic::Config::Method.new register_subscriber_config
|
6333
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
|
#
|