google-shopping-merchant-accounts-v1 0.a → 0.1.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/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb +497 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb +464 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb +144 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb +671 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb +624 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb +267 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb +856 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb +795 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb +391 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/account_services_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb +68 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb +987 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb +935 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb +447 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb +74 -0
- data/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb +65 -0
- data/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb +560 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb +520 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb +53 -0
- data/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb +50 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb +570 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb +530 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb +59 -0
- data/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb +572 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb +532 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb +568 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb +528 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/business_info_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb +50 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb +757 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb +69 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb +703 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb +329 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/checkoutsettings_services_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/customerservice_pb.rb +48 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/client.rb +665 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb +618 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb +268 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/developer_registration_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb +53 -0
- data/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb +579 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb +539 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb +64 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb +585 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb +545 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb +774 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb +720 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb +330 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb +73 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb +584 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb +71 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb +544 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb +59 -0
- data/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb +875 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb +814 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb +391 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb +68 -0
- data/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_pb.rb +68 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb +771 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb +717 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb +328 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb +770 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb +716 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb +329 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb +64 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_service.rb +67 -0
- data/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_pb.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb +869 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb +808 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb +390 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb +62 -0
- data/lib/google/shopping/merchant/accounts/v1/rest.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb +564 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb +524 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb +83 -0
- data/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb +563 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb +523 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb +205 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb +654 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb +615 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb +264 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb +53 -0
- data/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1/user_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service/client.rb +879 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb +818 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb +390 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1/user_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1/version.rb +7 -2
- data/lib/google/shopping/merchant/accounts/v1.rb +68 -0
- data/lib/google-shopping-merchant-accounts-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb +51 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb +144 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb +124 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb +250 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb +288 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb +75 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb +235 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb +140 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb +91 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb +187 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb +43 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb +82 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb +87 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb +123 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb +106 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb +108 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb +336 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb +317 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb +40 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/programs.rb +170 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/regions.rb +195 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb +757 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb +118 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb +136 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb +37 -0
- data/proto_docs/google/shopping/merchant/accounts/v1/user.rb +164 -0
- data/proto_docs/google/shopping/type/types.rb +210 -0
- data/proto_docs/google/type/date.rb +53 -0
- data/proto_docs/google/type/datetime.rb +103 -0
- data/proto_docs/google/type/phone_number.rb +116 -0
- data/proto_docs/google/type/postal_address.rb +135 -0
- metadata +309 -9
@@ -0,0 +1,935 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/shopping/merchant/accounts/v1/accounts_pb"
|
21
|
+
require "google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Shopping
|
25
|
+
module Merchant
|
26
|
+
module Accounts
|
27
|
+
module V1
|
28
|
+
module AccountsService
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the AccountsService service.
|
32
|
+
#
|
33
|
+
# Service to support Accounts API.
|
34
|
+
#
|
35
|
+
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
39
|
+
# @private
|
40
|
+
DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
|
41
|
+
|
42
|
+
include Paths
|
43
|
+
|
44
|
+
# @private
|
45
|
+
attr_reader :accounts_service_stub
|
46
|
+
|
47
|
+
##
|
48
|
+
# Configure the AccountsService Client class.
|
49
|
+
#
|
50
|
+
# See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration}
|
51
|
+
# for a description of the configuration fields.
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
#
|
55
|
+
# # Modify the configuration for all AccountsService clients
|
56
|
+
# ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.configure do |config|
|
57
|
+
# config.timeout = 10.0
|
58
|
+
# end
|
59
|
+
#
|
60
|
+
# @yield [config] Configure the Client client.
|
61
|
+
# @yieldparam config [Client::Configuration]
|
62
|
+
#
|
63
|
+
# @return [Client::Configuration]
|
64
|
+
#
|
65
|
+
def self.configure
|
66
|
+
@configure ||= begin
|
67
|
+
namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1"]
|
68
|
+
parent_config = while namespace.any?
|
69
|
+
parent_name = namespace.join "::"
|
70
|
+
parent_const = const_get parent_name
|
71
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
72
|
+
namespace.pop
|
73
|
+
end
|
74
|
+
default_config = Client::Configuration.new parent_config
|
75
|
+
|
76
|
+
default_config.timeout = 60.0
|
77
|
+
default_config.retry_policy = {
|
78
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
79
|
+
}
|
80
|
+
|
81
|
+
default_config
|
82
|
+
end
|
83
|
+
yield @configure if block_given?
|
84
|
+
@configure
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Configure the AccountsService Client instance.
|
89
|
+
#
|
90
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
91
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
92
|
+
# should be made on {Client.configure}.
|
93
|
+
#
|
94
|
+
# See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration}
|
95
|
+
# for a description of the configuration fields.
|
96
|
+
#
|
97
|
+
# @yield [config] Configure the Client client.
|
98
|
+
# @yieldparam config [Client::Configuration]
|
99
|
+
#
|
100
|
+
# @return [Client::Configuration]
|
101
|
+
#
|
102
|
+
def configure
|
103
|
+
yield @config if block_given?
|
104
|
+
@config
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# The effective universe domain
|
109
|
+
#
|
110
|
+
# @return [String]
|
111
|
+
#
|
112
|
+
def universe_domain
|
113
|
+
@accounts_service_stub.universe_domain
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Create a new AccountsService REST client object.
|
118
|
+
#
|
119
|
+
# @example
|
120
|
+
#
|
121
|
+
# # Create a client using the default configuration
|
122
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
123
|
+
#
|
124
|
+
# # Create a client using a custom configuration
|
125
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config|
|
126
|
+
# config.timeout = 10.0
|
127
|
+
# end
|
128
|
+
#
|
129
|
+
# @yield [config] Configure the AccountsService client.
|
130
|
+
# @yieldparam config [Client::Configuration]
|
131
|
+
#
|
132
|
+
def initialize
|
133
|
+
# Create the configuration object
|
134
|
+
@config = Configuration.new Client.configure
|
135
|
+
|
136
|
+
# Yield the configuration if needed
|
137
|
+
yield @config if block_given?
|
138
|
+
|
139
|
+
# Create credentials
|
140
|
+
credentials = @config.credentials
|
141
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
142
|
+
# but only if the default endpoint does not have a region prefix.
|
143
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
144
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
145
|
+
!@config.endpoint.split(".").first.include?("-"))
|
146
|
+
credentials ||= Credentials.default scope: @config.scope,
|
147
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
148
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
149
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
150
|
+
end
|
151
|
+
|
152
|
+
@quota_project_id = @config.quota_project
|
153
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
154
|
+
|
155
|
+
@accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.new(
|
156
|
+
endpoint: @config.endpoint,
|
157
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
158
|
+
universe_domain: @config.universe_domain,
|
159
|
+
credentials: credentials,
|
160
|
+
logger: @config.logger
|
161
|
+
)
|
162
|
+
|
163
|
+
@accounts_service_stub.logger(stub: true)&.info do |entry|
|
164
|
+
entry.set_system_name
|
165
|
+
entry.set_service
|
166
|
+
entry.message = "Created client for #{entry.service}"
|
167
|
+
entry.set_credentials_fields credentials
|
168
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
169
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
170
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# The logger used for request/response debug logging.
|
176
|
+
#
|
177
|
+
# @return [Logger]
|
178
|
+
#
|
179
|
+
def logger
|
180
|
+
@accounts_service_stub.logger
|
181
|
+
end
|
182
|
+
|
183
|
+
# Service calls
|
184
|
+
|
185
|
+
##
|
186
|
+
# Retrieves an account from your Merchant Center account.
|
187
|
+
# After inserting, updating, or deleting an account, it may take several
|
188
|
+
# minutes before changes take effect.
|
189
|
+
#
|
190
|
+
# @overload get_account(request, options = nil)
|
191
|
+
# Pass arguments to `get_account` via a request object, either of type
|
192
|
+
# {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash.
|
193
|
+
#
|
194
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Hash]
|
195
|
+
# A request object representing the call parameters. Required. To specify no
|
196
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
197
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
198
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
199
|
+
#
|
200
|
+
# @overload get_account(name: nil)
|
201
|
+
# Pass arguments to `get_account` via keyword arguments. Note that at
|
202
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
203
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
204
|
+
#
|
205
|
+
# @param name [::String]
|
206
|
+
# Required. The name of the account to retrieve.
|
207
|
+
# Format: `accounts/{account}`
|
208
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
209
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account]
|
210
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
211
|
+
#
|
212
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::Account]
|
213
|
+
#
|
214
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
215
|
+
#
|
216
|
+
# @example Basic example
|
217
|
+
# require "google/shopping/merchant/accounts/v1"
|
218
|
+
#
|
219
|
+
# # Create a client object. The client can be reused for multiple calls.
|
220
|
+
# client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
221
|
+
#
|
222
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
223
|
+
# request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new
|
224
|
+
#
|
225
|
+
# # Call the get_account method.
|
226
|
+
# result = client.get_account request
|
227
|
+
#
|
228
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account.
|
229
|
+
# p result
|
230
|
+
#
|
231
|
+
def get_account request, options = nil
|
232
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
233
|
+
|
234
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest
|
235
|
+
|
236
|
+
# Converts hash and nil to an options object
|
237
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
238
|
+
|
239
|
+
# Customize the options with defaults
|
240
|
+
call_metadata = @config.rpcs.get_account.metadata.to_h
|
241
|
+
|
242
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
243
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
244
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
245
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
246
|
+
transports_version_send: [:rest]
|
247
|
+
|
248
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
249
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
250
|
+
|
251
|
+
options.apply_defaults timeout: @config.rpcs.get_account.timeout,
|
252
|
+
metadata: call_metadata,
|
253
|
+
retry_policy: @config.rpcs.get_account.retry_policy
|
254
|
+
|
255
|
+
options.apply_defaults timeout: @config.timeout,
|
256
|
+
metadata: @config.metadata,
|
257
|
+
retry_policy: @config.retry_policy
|
258
|
+
|
259
|
+
@accounts_service_stub.get_account request, options do |result, operation|
|
260
|
+
yield result, operation if block_given?
|
261
|
+
end
|
262
|
+
rescue ::Gapic::Rest::Error => e
|
263
|
+
raise ::Google::Cloud::Error.from_error(e)
|
264
|
+
end
|
265
|
+
|
266
|
+
##
|
267
|
+
# Creates a Merchant Center account with additional configuration. Adds the
|
268
|
+
# user that makes the request as an admin for the new account.
|
269
|
+
#
|
270
|
+
# @overload create_and_configure_account(request, options = nil)
|
271
|
+
# Pass arguments to `create_and_configure_account` via a request object, either of type
|
272
|
+
# {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash.
|
273
|
+
#
|
274
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Hash]
|
275
|
+
# A request object representing the call parameters. Required. To specify no
|
276
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
277
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
278
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
279
|
+
#
|
280
|
+
# @overload create_and_configure_account(account: nil, user: nil, service: nil)
|
281
|
+
# Pass arguments to `create_and_configure_account` via keyword arguments. Note that at
|
282
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
283
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
284
|
+
#
|
285
|
+
# @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash]
|
286
|
+
# Required. The account to be created.
|
287
|
+
# @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>]
|
288
|
+
# Optional. Users to be added to the account.
|
289
|
+
# @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>]
|
290
|
+
# Required. An account service between the account to be created and the
|
291
|
+
# provider account is initialized as part of the creation. At least one such
|
292
|
+
# service needs to be provided. Currently exactly one of these needs to be
|
293
|
+
# `account_aggregation` and `accounts.createAndConfigure` method can be
|
294
|
+
# used to create a sub-account under an existing advanced account through
|
295
|
+
# this method. Additional `account_management` or
|
296
|
+
# `product_management` services may be provided.
|
297
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
298
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account]
|
299
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
300
|
+
#
|
301
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::Account]
|
302
|
+
#
|
303
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
304
|
+
#
|
305
|
+
# @example Basic example
|
306
|
+
# require "google/shopping/merchant/accounts/v1"
|
307
|
+
#
|
308
|
+
# # Create a client object. The client can be reused for multiple calls.
|
309
|
+
# client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
310
|
+
#
|
311
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
312
|
+
# request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new
|
313
|
+
#
|
314
|
+
# # Call the create_and_configure_account method.
|
315
|
+
# result = client.create_and_configure_account request
|
316
|
+
#
|
317
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account.
|
318
|
+
# p result
|
319
|
+
#
|
320
|
+
def create_and_configure_account request, options = nil
|
321
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
322
|
+
|
323
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest
|
324
|
+
|
325
|
+
# Converts hash and nil to an options object
|
326
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
327
|
+
|
328
|
+
# Customize the options with defaults
|
329
|
+
call_metadata = @config.rpcs.create_and_configure_account.metadata.to_h
|
330
|
+
|
331
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
332
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
333
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
334
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
335
|
+
transports_version_send: [:rest]
|
336
|
+
|
337
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
338
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
339
|
+
|
340
|
+
options.apply_defaults timeout: @config.rpcs.create_and_configure_account.timeout,
|
341
|
+
metadata: call_metadata,
|
342
|
+
retry_policy: @config.rpcs.create_and_configure_account.retry_policy
|
343
|
+
|
344
|
+
options.apply_defaults timeout: @config.timeout,
|
345
|
+
metadata: @config.metadata,
|
346
|
+
retry_policy: @config.retry_policy
|
347
|
+
|
348
|
+
@accounts_service_stub.create_and_configure_account request, options do |result, operation|
|
349
|
+
yield result, operation if block_given?
|
350
|
+
end
|
351
|
+
rescue ::Gapic::Rest::Error => e
|
352
|
+
raise ::Google::Cloud::Error.from_error(e)
|
353
|
+
end
|
354
|
+
|
355
|
+
##
|
356
|
+
# Deletes the specified account regardless of its type: standalone, advanced
|
357
|
+
# account or sub-account. Deleting an advanced account leads to the deletion
|
358
|
+
# of all of its sub-accounts. Executing this method requires admin access.
|
359
|
+
# The deletion succeeds only if the account does not provide services
|
360
|
+
# to any other account and has no processed offers. You can use the `force`
|
361
|
+
# parameter to override this.
|
362
|
+
#
|
363
|
+
# @overload delete_account(request, options = nil)
|
364
|
+
# Pass arguments to `delete_account` via a request object, either of type
|
365
|
+
# {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash.
|
366
|
+
#
|
367
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Hash]
|
368
|
+
# A request object representing the call parameters. Required. To specify no
|
369
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
370
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
371
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
372
|
+
#
|
373
|
+
# @overload delete_account(name: nil, force: nil)
|
374
|
+
# Pass arguments to `delete_account` via keyword arguments. Note that at
|
375
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
376
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
377
|
+
#
|
378
|
+
# @param name [::String]
|
379
|
+
# Required. The name of the account to delete.
|
380
|
+
# Format: `accounts/{account}`
|
381
|
+
# @param force [::Boolean]
|
382
|
+
# Optional. If set to `true`, the account is deleted even if it provides
|
383
|
+
# services to other accounts or has processed offers.
|
384
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
385
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
386
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
387
|
+
#
|
388
|
+
# @return [::Google::Protobuf::Empty]
|
389
|
+
#
|
390
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
391
|
+
#
|
392
|
+
# @example Basic example
|
393
|
+
# require "google/shopping/merchant/accounts/v1"
|
394
|
+
#
|
395
|
+
# # Create a client object. The client can be reused for multiple calls.
|
396
|
+
# client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
397
|
+
#
|
398
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
399
|
+
# request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new
|
400
|
+
#
|
401
|
+
# # Call the delete_account method.
|
402
|
+
# result = client.delete_account request
|
403
|
+
#
|
404
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
405
|
+
# p result
|
406
|
+
#
|
407
|
+
def delete_account request, options = nil
|
408
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
409
|
+
|
410
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest
|
411
|
+
|
412
|
+
# Converts hash and nil to an options object
|
413
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
414
|
+
|
415
|
+
# Customize the options with defaults
|
416
|
+
call_metadata = @config.rpcs.delete_account.metadata.to_h
|
417
|
+
|
418
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
419
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
420
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
421
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
422
|
+
transports_version_send: [:rest]
|
423
|
+
|
424
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
425
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
426
|
+
|
427
|
+
options.apply_defaults timeout: @config.rpcs.delete_account.timeout,
|
428
|
+
metadata: call_metadata,
|
429
|
+
retry_policy: @config.rpcs.delete_account.retry_policy
|
430
|
+
|
431
|
+
options.apply_defaults timeout: @config.timeout,
|
432
|
+
metadata: @config.metadata,
|
433
|
+
retry_policy: @config.retry_policy
|
434
|
+
|
435
|
+
@accounts_service_stub.delete_account request, options do |result, operation|
|
436
|
+
yield result, operation if block_given?
|
437
|
+
end
|
438
|
+
rescue ::Gapic::Rest::Error => e
|
439
|
+
raise ::Google::Cloud::Error.from_error(e)
|
440
|
+
end
|
441
|
+
|
442
|
+
##
|
443
|
+
# Updates an account regardless of its type: standalone, advanced account or
|
444
|
+
# sub-account. Executing this method requires admin access.
|
445
|
+
#
|
446
|
+
# @overload update_account(request, options = nil)
|
447
|
+
# Pass arguments to `update_account` via a request object, either of type
|
448
|
+
# {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash.
|
449
|
+
#
|
450
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Hash]
|
451
|
+
# A request object representing the call parameters. Required. To specify no
|
452
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
453
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
454
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
455
|
+
#
|
456
|
+
# @overload update_account(account: nil, update_mask: nil)
|
457
|
+
# Pass arguments to `update_account` via keyword arguments. Note that at
|
458
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
459
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
460
|
+
#
|
461
|
+
# @param account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash]
|
462
|
+
# Required. The new version of the account.
|
463
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
464
|
+
# Optional. List of fields being updated.
|
465
|
+
#
|
466
|
+
# The following fields are supported (in both `snake_case` and
|
467
|
+
# `lowerCamelCase`):
|
468
|
+
#
|
469
|
+
# - `account_name`
|
470
|
+
# - `adult_content`
|
471
|
+
# - `language_code`
|
472
|
+
# - `time_zone`
|
473
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
474
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account]
|
475
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
476
|
+
#
|
477
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::Account]
|
478
|
+
#
|
479
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
480
|
+
#
|
481
|
+
# @example Basic example
|
482
|
+
# require "google/shopping/merchant/accounts/v1"
|
483
|
+
#
|
484
|
+
# # Create a client object. The client can be reused for multiple calls.
|
485
|
+
# client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
486
|
+
#
|
487
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
488
|
+
# request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new
|
489
|
+
#
|
490
|
+
# # Call the update_account method.
|
491
|
+
# result = client.update_account request
|
492
|
+
#
|
493
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account.
|
494
|
+
# p result
|
495
|
+
#
|
496
|
+
def update_account request, options = nil
|
497
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
498
|
+
|
499
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest
|
500
|
+
|
501
|
+
# Converts hash and nil to an options object
|
502
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
503
|
+
|
504
|
+
# Customize the options with defaults
|
505
|
+
call_metadata = @config.rpcs.update_account.metadata.to_h
|
506
|
+
|
507
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
508
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
509
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
510
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
511
|
+
transports_version_send: [:rest]
|
512
|
+
|
513
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
514
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
515
|
+
|
516
|
+
options.apply_defaults timeout: @config.rpcs.update_account.timeout,
|
517
|
+
metadata: call_metadata,
|
518
|
+
retry_policy: @config.rpcs.update_account.retry_policy
|
519
|
+
|
520
|
+
options.apply_defaults timeout: @config.timeout,
|
521
|
+
metadata: @config.metadata,
|
522
|
+
retry_policy: @config.retry_policy
|
523
|
+
|
524
|
+
@accounts_service_stub.update_account request, options do |result, operation|
|
525
|
+
yield result, operation if block_given?
|
526
|
+
end
|
527
|
+
rescue ::Gapic::Rest::Error => e
|
528
|
+
raise ::Google::Cloud::Error.from_error(e)
|
529
|
+
end
|
530
|
+
|
531
|
+
##
|
532
|
+
# Note: For the `accounts.list` method, quota and limits usage are charged
|
533
|
+
# for each user, and not for the Merchant Center ID or the advanced account
|
534
|
+
# ID. To list several sub-accounts, you should use the
|
535
|
+
# `accounts.listSubaccounts` method, which is more suitable for advanced
|
536
|
+
# accounts use case.
|
537
|
+
#
|
538
|
+
# @overload list_accounts(request, options = nil)
|
539
|
+
# Pass arguments to `list_accounts` via a request object, either of type
|
540
|
+
# {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash.
|
541
|
+
#
|
542
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Hash]
|
543
|
+
# A request object representing the call parameters. Required. To specify no
|
544
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
545
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
546
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
547
|
+
#
|
548
|
+
# @overload list_accounts(page_size: nil, page_token: nil, filter: nil)
|
549
|
+
# Pass arguments to `list_accounts` via keyword arguments. Note that at
|
550
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
551
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
552
|
+
#
|
553
|
+
# @param page_size [::Integer]
|
554
|
+
# Optional. The maximum number of accounts to return. The service may return
|
555
|
+
# fewer than this value. If unspecified, at most 250 accounts are returned.
|
556
|
+
# The maximum value is 500; values above 500 are coerced to 500.
|
557
|
+
# @param page_token [::String]
|
558
|
+
# Optional. A page token, received from a previous `accounts.list` call.
|
559
|
+
# Provide this to retrieve the subsequent page.
|
560
|
+
#
|
561
|
+
# When paginating, all other parameters provided in the `accounts.list`
|
562
|
+
# request must match the call that provided the page token.
|
563
|
+
# @param filter [::String]
|
564
|
+
# Optional. Returns only accounts that match the
|
565
|
+
# [filter](https://developers.google.com/merchant/api/guides/accounts/filter).
|
566
|
+
# For more details, see the
|
567
|
+
# [filter syntax
|
568
|
+
# reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax).
|
569
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
570
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
|
571
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
572
|
+
#
|
573
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
|
574
|
+
#
|
575
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
576
|
+
#
|
577
|
+
# @example Basic example
|
578
|
+
# require "google/shopping/merchant/accounts/v1"
|
579
|
+
#
|
580
|
+
# # Create a client object. The client can be reused for multiple calls.
|
581
|
+
# client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
582
|
+
#
|
583
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
584
|
+
# request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new
|
585
|
+
#
|
586
|
+
# # Call the list_accounts method.
|
587
|
+
# result = client.list_accounts request
|
588
|
+
#
|
589
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
590
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
591
|
+
# result.each do |item|
|
592
|
+
# # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account.
|
593
|
+
# p item
|
594
|
+
# end
|
595
|
+
#
|
596
|
+
def list_accounts request, options = nil
|
597
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
598
|
+
|
599
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest
|
600
|
+
|
601
|
+
# Converts hash and nil to an options object
|
602
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
603
|
+
|
604
|
+
# Customize the options with defaults
|
605
|
+
call_metadata = @config.rpcs.list_accounts.metadata.to_h
|
606
|
+
|
607
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
608
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
609
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
610
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
611
|
+
transports_version_send: [:rest]
|
612
|
+
|
613
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
614
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
615
|
+
|
616
|
+
options.apply_defaults timeout: @config.rpcs.list_accounts.timeout,
|
617
|
+
metadata: call_metadata,
|
618
|
+
retry_policy: @config.rpcs.list_accounts.retry_policy
|
619
|
+
|
620
|
+
options.apply_defaults timeout: @config.timeout,
|
621
|
+
metadata: @config.metadata,
|
622
|
+
retry_policy: @config.retry_policy
|
623
|
+
|
624
|
+
@accounts_service_stub.list_accounts request, options do |result, operation|
|
625
|
+
result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, options
|
626
|
+
yield result, operation if block_given?
|
627
|
+
throw :response, result
|
628
|
+
end
|
629
|
+
rescue ::Gapic::Rest::Error => e
|
630
|
+
raise ::Google::Cloud::Error.from_error(e)
|
631
|
+
end
|
632
|
+
|
633
|
+
##
|
634
|
+
# List all sub-accounts for a given advanced account. This is a
|
635
|
+
# convenience wrapper for the more powerful `accounts.list` method. This
|
636
|
+
# method will produce the same results as calling `ListsAccounts` with the
|
637
|
+
# following filter:
|
638
|
+
# `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))`
|
639
|
+
#
|
640
|
+
# @overload list_sub_accounts(request, options = nil)
|
641
|
+
# Pass arguments to `list_sub_accounts` via a request object, either of type
|
642
|
+
# {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash.
|
643
|
+
#
|
644
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Hash]
|
645
|
+
# A request object representing the call parameters. Required. To specify no
|
646
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
647
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
648
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
649
|
+
#
|
650
|
+
# @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil)
|
651
|
+
# Pass arguments to `list_sub_accounts` via keyword arguments. Note that at
|
652
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
653
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
654
|
+
#
|
655
|
+
# @param provider [::String]
|
656
|
+
# Required. The aggregation service provider.
|
657
|
+
# Format: `accounts/{accountId}`
|
658
|
+
# @param page_size [::Integer]
|
659
|
+
# Optional. The maximum number of accounts to return. The service may return
|
660
|
+
# fewer than this value. If unspecified, at most 250 accounts are returned.
|
661
|
+
# The maximum value is 500; values above 500 are coerced to 500.
|
662
|
+
# @param page_token [::String]
|
663
|
+
# Optional. A page token, received from a previous `accounts.list` call.
|
664
|
+
# Provide this to retrieve the subsequent page.
|
665
|
+
#
|
666
|
+
# When paginating, all other parameters provided in the `accounts.list`
|
667
|
+
# request must match the call that provided the page token.
|
668
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
669
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
|
670
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
671
|
+
#
|
672
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>]
|
673
|
+
#
|
674
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
675
|
+
#
|
676
|
+
# @example Basic example
|
677
|
+
# require "google/shopping/merchant/accounts/v1"
|
678
|
+
#
|
679
|
+
# # Create a client object. The client can be reused for multiple calls.
|
680
|
+
# client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new
|
681
|
+
#
|
682
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
683
|
+
# request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new
|
684
|
+
#
|
685
|
+
# # Call the list_sub_accounts method.
|
686
|
+
# result = client.list_sub_accounts request
|
687
|
+
#
|
688
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
689
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
690
|
+
# result.each do |item|
|
691
|
+
# # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Account.
|
692
|
+
# p item
|
693
|
+
# end
|
694
|
+
#
|
695
|
+
def list_sub_accounts request, options = nil
|
696
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
697
|
+
|
698
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest
|
699
|
+
|
700
|
+
# Converts hash and nil to an options object
|
701
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
702
|
+
|
703
|
+
# Customize the options with defaults
|
704
|
+
call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h
|
705
|
+
|
706
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
707
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
708
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
709
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
710
|
+
transports_version_send: [:rest]
|
711
|
+
|
712
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
713
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
714
|
+
|
715
|
+
options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout,
|
716
|
+
metadata: call_metadata,
|
717
|
+
retry_policy: @config.rpcs.list_sub_accounts.retry_policy
|
718
|
+
|
719
|
+
options.apply_defaults timeout: @config.timeout,
|
720
|
+
metadata: @config.metadata,
|
721
|
+
retry_policy: @config.retry_policy
|
722
|
+
|
723
|
+
@accounts_service_stub.list_sub_accounts request, options do |result, operation|
|
724
|
+
result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, options
|
725
|
+
yield result, operation if block_given?
|
726
|
+
throw :response, result
|
727
|
+
end
|
728
|
+
rescue ::Gapic::Rest::Error => e
|
729
|
+
raise ::Google::Cloud::Error.from_error(e)
|
730
|
+
end
|
731
|
+
|
732
|
+
##
|
733
|
+
# Configuration class for the AccountsService REST API.
|
734
|
+
#
|
735
|
+
# This class represents the configuration for AccountsService REST,
|
736
|
+
# providing control over timeouts, retry behavior, logging, transport
|
737
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
738
|
+
# applied individually to specific RPCs. See
|
739
|
+
# {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration::Rpcs}
|
740
|
+
# for a list of RPCs that can be configured independently.
|
741
|
+
#
|
742
|
+
# Configuration can be applied globally to all clients, or to a single client
|
743
|
+
# on construction.
|
744
|
+
#
|
745
|
+
# @example
|
746
|
+
#
|
747
|
+
# # Modify the global config, setting the timeout for
|
748
|
+
# # get_account to 20 seconds,
|
749
|
+
# # and all remaining timeouts to 10 seconds.
|
750
|
+
# ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.configure do |config|
|
751
|
+
# config.timeout = 10.0
|
752
|
+
# config.rpcs.get_account.timeout = 20.0
|
753
|
+
# end
|
754
|
+
#
|
755
|
+
# # Apply the above configuration only to a new client.
|
756
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config|
|
757
|
+
# config.timeout = 10.0
|
758
|
+
# config.rpcs.get_account.timeout = 20.0
|
759
|
+
# end
|
760
|
+
#
|
761
|
+
# @!attribute [rw] endpoint
|
762
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
763
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
764
|
+
# @return [::String,nil]
|
765
|
+
# @!attribute [rw] credentials
|
766
|
+
# Credentials to send with calls. You may provide any of the following types:
|
767
|
+
# * (`String`) The path to a service account key file in JSON format
|
768
|
+
# * (`Hash`) A service account key as a Hash
|
769
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
770
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
771
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
772
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
773
|
+
# * (`nil`) indicating no credentials
|
774
|
+
#
|
775
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
776
|
+
# external source for authentication to Google Cloud, you must validate it before
|
777
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
778
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
779
|
+
# For more information, refer to [Validate credential configurations from external
|
780
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
781
|
+
# @return [::Object]
|
782
|
+
# @!attribute [rw] scope
|
783
|
+
# The OAuth scopes
|
784
|
+
# @return [::Array<::String>]
|
785
|
+
# @!attribute [rw] lib_name
|
786
|
+
# The library name as recorded in instrumentation and logging
|
787
|
+
# @return [::String]
|
788
|
+
# @!attribute [rw] lib_version
|
789
|
+
# The library version as recorded in instrumentation and logging
|
790
|
+
# @return [::String]
|
791
|
+
# @!attribute [rw] timeout
|
792
|
+
# The call timeout in seconds.
|
793
|
+
# @return [::Numeric]
|
794
|
+
# @!attribute [rw] metadata
|
795
|
+
# Additional headers to be sent with the call.
|
796
|
+
# @return [::Hash{::Symbol=>::String}]
|
797
|
+
# @!attribute [rw] retry_policy
|
798
|
+
# The retry policy. The value is a hash with the following keys:
|
799
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
800
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
801
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
802
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
803
|
+
# trigger a retry.
|
804
|
+
# @return [::Hash]
|
805
|
+
# @!attribute [rw] quota_project
|
806
|
+
# A separate project against which to charge quota.
|
807
|
+
# @return [::String]
|
808
|
+
# @!attribute [rw] universe_domain
|
809
|
+
# The universe domain within which to make requests. This determines the
|
810
|
+
# default endpoint URL. The default value of nil uses the environment
|
811
|
+
# universe (usually the default "googleapis.com" universe).
|
812
|
+
# @return [::String,nil]
|
813
|
+
# @!attribute [rw] logger
|
814
|
+
# A custom logger to use for request/response debug logging, or the value
|
815
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
816
|
+
# explicitly disable logging.
|
817
|
+
# @return [::Logger,:default,nil]
|
818
|
+
#
|
819
|
+
class Configuration
|
820
|
+
extend ::Gapic::Config
|
821
|
+
|
822
|
+
# @private
|
823
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
824
|
+
DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
|
825
|
+
|
826
|
+
config_attr :endpoint, nil, ::String, nil
|
827
|
+
config_attr :credentials, nil do |value|
|
828
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
829
|
+
allowed.any? { |klass| klass === value }
|
830
|
+
end
|
831
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
832
|
+
config_attr :lib_name, nil, ::String, nil
|
833
|
+
config_attr :lib_version, nil, ::String, nil
|
834
|
+
config_attr :timeout, nil, ::Numeric, nil
|
835
|
+
config_attr :metadata, nil, ::Hash, nil
|
836
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
837
|
+
config_attr :quota_project, nil, ::String, nil
|
838
|
+
config_attr :universe_domain, nil, ::String, nil
|
839
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
840
|
+
|
841
|
+
# @private
|
842
|
+
def initialize parent_config = nil
|
843
|
+
@parent_config = parent_config unless parent_config.nil?
|
844
|
+
|
845
|
+
yield self if block_given?
|
846
|
+
end
|
847
|
+
|
848
|
+
##
|
849
|
+
# Configurations for individual RPCs
|
850
|
+
# @return [Rpcs]
|
851
|
+
#
|
852
|
+
def rpcs
|
853
|
+
@rpcs ||= begin
|
854
|
+
parent_rpcs = nil
|
855
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
856
|
+
Rpcs.new parent_rpcs
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
##
|
861
|
+
# Configuration RPC class for the AccountsService API.
|
862
|
+
#
|
863
|
+
# Includes fields providing the configuration for each RPC in this service.
|
864
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
865
|
+
# the following configuration fields:
|
866
|
+
#
|
867
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
868
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
869
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
870
|
+
# include the following keys:
|
871
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
872
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
873
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
874
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
875
|
+
# trigger a retry.
|
876
|
+
#
|
877
|
+
class Rpcs
|
878
|
+
##
|
879
|
+
# RPC-specific configuration for `get_account`
|
880
|
+
# @return [::Gapic::Config::Method]
|
881
|
+
#
|
882
|
+
attr_reader :get_account
|
883
|
+
##
|
884
|
+
# RPC-specific configuration for `create_and_configure_account`
|
885
|
+
# @return [::Gapic::Config::Method]
|
886
|
+
#
|
887
|
+
attr_reader :create_and_configure_account
|
888
|
+
##
|
889
|
+
# RPC-specific configuration for `delete_account`
|
890
|
+
# @return [::Gapic::Config::Method]
|
891
|
+
#
|
892
|
+
attr_reader :delete_account
|
893
|
+
##
|
894
|
+
# RPC-specific configuration for `update_account`
|
895
|
+
# @return [::Gapic::Config::Method]
|
896
|
+
#
|
897
|
+
attr_reader :update_account
|
898
|
+
##
|
899
|
+
# RPC-specific configuration for `list_accounts`
|
900
|
+
# @return [::Gapic::Config::Method]
|
901
|
+
#
|
902
|
+
attr_reader :list_accounts
|
903
|
+
##
|
904
|
+
# RPC-specific configuration for `list_sub_accounts`
|
905
|
+
# @return [::Gapic::Config::Method]
|
906
|
+
#
|
907
|
+
attr_reader :list_sub_accounts
|
908
|
+
|
909
|
+
# @private
|
910
|
+
def initialize parent_rpcs = nil
|
911
|
+
get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account
|
912
|
+
@get_account = ::Gapic::Config::Method.new get_account_config
|
913
|
+
create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account
|
914
|
+
@create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config
|
915
|
+
delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account
|
916
|
+
@delete_account = ::Gapic::Config::Method.new delete_account_config
|
917
|
+
update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account
|
918
|
+
@update_account = ::Gapic::Config::Method.new update_account_config
|
919
|
+
list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts
|
920
|
+
@list_accounts = ::Gapic::Config::Method.new list_accounts_config
|
921
|
+
list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts
|
922
|
+
@list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config
|
923
|
+
|
924
|
+
yield self if block_given?
|
925
|
+
end
|
926
|
+
end
|
927
|
+
end
|
928
|
+
end
|
929
|
+
end
|
930
|
+
end
|
931
|
+
end
|
932
|
+
end
|
933
|
+
end
|
934
|
+
end
|
935
|
+
end
|