google-shopping-merchant-accounts-v1 0.a → 0.1.1
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,818 @@
|
|
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/user_pb"
|
21
|
+
require "google/shopping/merchant/accounts/v1/user_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Shopping
|
25
|
+
module Merchant
|
26
|
+
module Accounts
|
27
|
+
module V1
|
28
|
+
module UserService
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the UserService service.
|
32
|
+
#
|
33
|
+
# Service to support user 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 :user_service_stub
|
46
|
+
|
47
|
+
##
|
48
|
+
# Configure the UserService Client class.
|
49
|
+
#
|
50
|
+
# See {::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration}
|
51
|
+
# for a description of the configuration fields.
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
#
|
55
|
+
# # Modify the configuration for all UserService clients
|
56
|
+
# ::Google::Shopping::Merchant::Accounts::V1::UserService::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 UserService 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::UserService::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
|
+
@user_service_stub.universe_domain
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Create a new UserService REST client object.
|
118
|
+
#
|
119
|
+
# @example
|
120
|
+
#
|
121
|
+
# # Create a client using the default configuration
|
122
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
|
123
|
+
#
|
124
|
+
# # Create a client using a custom configuration
|
125
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config|
|
126
|
+
# config.timeout = 10.0
|
127
|
+
# end
|
128
|
+
#
|
129
|
+
# @yield [config] Configure the UserService 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
|
+
@user_service_stub = ::Google::Shopping::Merchant::Accounts::V1::UserService::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
|
+
@user_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
|
+
@user_service_stub.logger
|
181
|
+
end
|
182
|
+
|
183
|
+
# Service calls
|
184
|
+
|
185
|
+
##
|
186
|
+
# Retrieves a Merchant Center account user.
|
187
|
+
#
|
188
|
+
# @overload get_user(request, options = nil)
|
189
|
+
# Pass arguments to `get_user` via a request object, either of type
|
190
|
+
# {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash.
|
191
|
+
#
|
192
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Hash]
|
193
|
+
# A request object representing the call parameters. Required. To specify no
|
194
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
195
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
196
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
197
|
+
#
|
198
|
+
# @overload get_user(name: nil)
|
199
|
+
# Pass arguments to `get_user` via keyword arguments. Note that at
|
200
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
201
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
202
|
+
#
|
203
|
+
# @param name [::String]
|
204
|
+
# Required. The name of the user to retrieve.
|
205
|
+
# Format: `accounts/{account}/users/{email}`
|
206
|
+
#
|
207
|
+
# It is also possible to retrieve the user corresponding to the caller by
|
208
|
+
# using `me` rather than an email address as in
|
209
|
+
# `accounts/{account}/users/me`.
|
210
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
211
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User]
|
212
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
213
|
+
#
|
214
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::User]
|
215
|
+
#
|
216
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
217
|
+
#
|
218
|
+
# @example Basic example
|
219
|
+
# require "google/shopping/merchant/accounts/v1"
|
220
|
+
#
|
221
|
+
# # Create a client object. The client can be reused for multiple calls.
|
222
|
+
# client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
|
223
|
+
#
|
224
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
225
|
+
# request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new
|
226
|
+
#
|
227
|
+
# # Call the get_user method.
|
228
|
+
# result = client.get_user request
|
229
|
+
#
|
230
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User.
|
231
|
+
# p result
|
232
|
+
#
|
233
|
+
def get_user request, options = nil
|
234
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
235
|
+
|
236
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest
|
237
|
+
|
238
|
+
# Converts hash and nil to an options object
|
239
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
240
|
+
|
241
|
+
# Customize the options with defaults
|
242
|
+
call_metadata = @config.rpcs.get_user.metadata.to_h
|
243
|
+
|
244
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
245
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
246
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
247
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
248
|
+
transports_version_send: [:rest]
|
249
|
+
|
250
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
251
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
252
|
+
|
253
|
+
options.apply_defaults timeout: @config.rpcs.get_user.timeout,
|
254
|
+
metadata: call_metadata,
|
255
|
+
retry_policy: @config.rpcs.get_user.retry_policy
|
256
|
+
|
257
|
+
options.apply_defaults timeout: @config.timeout,
|
258
|
+
metadata: @config.metadata,
|
259
|
+
retry_policy: @config.retry_policy
|
260
|
+
|
261
|
+
@user_service_stub.get_user request, options do |result, operation|
|
262
|
+
yield result, operation if block_given?
|
263
|
+
end
|
264
|
+
rescue ::Gapic::Rest::Error => e
|
265
|
+
raise ::Google::Cloud::Error.from_error(e)
|
266
|
+
end
|
267
|
+
|
268
|
+
##
|
269
|
+
# Creates a Merchant Center account user. Executing this method requires
|
270
|
+
# admin access.
|
271
|
+
#
|
272
|
+
# @overload create_user(request, options = nil)
|
273
|
+
# Pass arguments to `create_user` via a request object, either of type
|
274
|
+
# {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash.
|
275
|
+
#
|
276
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Hash]
|
277
|
+
# A request object representing the call parameters. Required. To specify no
|
278
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
279
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
280
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
281
|
+
#
|
282
|
+
# @overload create_user(parent: nil, user_id: nil, user: nil)
|
283
|
+
# Pass arguments to `create_user` via keyword arguments. Note that at
|
284
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
285
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
286
|
+
#
|
287
|
+
# @param parent [::String]
|
288
|
+
# Required. The resource name of the account for which a user will be
|
289
|
+
# created. Format: `accounts/{account}`
|
290
|
+
# @param user_id [::String]
|
291
|
+
# Required. The email address of the user (for example,
|
292
|
+
# `john.doe@gmail.com`).
|
293
|
+
# @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash]
|
294
|
+
# Optional. The user to create.
|
295
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
296
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User]
|
297
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
298
|
+
#
|
299
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::User]
|
300
|
+
#
|
301
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
302
|
+
#
|
303
|
+
# @example Basic example
|
304
|
+
# require "google/shopping/merchant/accounts/v1"
|
305
|
+
#
|
306
|
+
# # Create a client object. The client can be reused for multiple calls.
|
307
|
+
# client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
|
308
|
+
#
|
309
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
310
|
+
# request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new
|
311
|
+
#
|
312
|
+
# # Call the create_user method.
|
313
|
+
# result = client.create_user request
|
314
|
+
#
|
315
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User.
|
316
|
+
# p result
|
317
|
+
#
|
318
|
+
def create_user request, options = nil
|
319
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
320
|
+
|
321
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest
|
322
|
+
|
323
|
+
# Converts hash and nil to an options object
|
324
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
325
|
+
|
326
|
+
# Customize the options with defaults
|
327
|
+
call_metadata = @config.rpcs.create_user.metadata.to_h
|
328
|
+
|
329
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
330
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
331
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
332
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
333
|
+
transports_version_send: [:rest]
|
334
|
+
|
335
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
336
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
337
|
+
|
338
|
+
options.apply_defaults timeout: @config.rpcs.create_user.timeout,
|
339
|
+
metadata: call_metadata,
|
340
|
+
retry_policy: @config.rpcs.create_user.retry_policy
|
341
|
+
|
342
|
+
options.apply_defaults timeout: @config.timeout,
|
343
|
+
metadata: @config.metadata,
|
344
|
+
retry_policy: @config.retry_policy
|
345
|
+
|
346
|
+
@user_service_stub.create_user request, options do |result, operation|
|
347
|
+
yield result, operation if block_given?
|
348
|
+
end
|
349
|
+
rescue ::Gapic::Rest::Error => e
|
350
|
+
raise ::Google::Cloud::Error.from_error(e)
|
351
|
+
end
|
352
|
+
|
353
|
+
##
|
354
|
+
# Deletes a Merchant Center account user. Executing this method requires
|
355
|
+
# admin access. The user to be deleted can't be the last admin user of that
|
356
|
+
# account. Also a user is protected from deletion if it
|
357
|
+
# is managed by Business Manager"
|
358
|
+
#
|
359
|
+
# @overload delete_user(request, options = nil)
|
360
|
+
# Pass arguments to `delete_user` via a request object, either of type
|
361
|
+
# {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash.
|
362
|
+
#
|
363
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Hash]
|
364
|
+
# A request object representing the call parameters. Required. To specify no
|
365
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
366
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
367
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
368
|
+
#
|
369
|
+
# @overload delete_user(name: nil)
|
370
|
+
# Pass arguments to `delete_user` via keyword arguments. Note that at
|
371
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
372
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
373
|
+
#
|
374
|
+
# @param name [::String]
|
375
|
+
# Required. The name of the user to delete.
|
376
|
+
# Format: `accounts/{account}/users/{email}`
|
377
|
+
#
|
378
|
+
# It is also possible to delete the user corresponding to the caller by using
|
379
|
+
# `me` rather than an email address as in `accounts/{account}/users/me`.
|
380
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
381
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
382
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
383
|
+
#
|
384
|
+
# @return [::Google::Protobuf::Empty]
|
385
|
+
#
|
386
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
387
|
+
#
|
388
|
+
# @example Basic example
|
389
|
+
# require "google/shopping/merchant/accounts/v1"
|
390
|
+
#
|
391
|
+
# # Create a client object. The client can be reused for multiple calls.
|
392
|
+
# client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
|
393
|
+
#
|
394
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
395
|
+
# request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new
|
396
|
+
#
|
397
|
+
# # Call the delete_user method.
|
398
|
+
# result = client.delete_user request
|
399
|
+
#
|
400
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
401
|
+
# p result
|
402
|
+
#
|
403
|
+
def delete_user request, options = nil
|
404
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
405
|
+
|
406
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest
|
407
|
+
|
408
|
+
# Converts hash and nil to an options object
|
409
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
410
|
+
|
411
|
+
# Customize the options with defaults
|
412
|
+
call_metadata = @config.rpcs.delete_user.metadata.to_h
|
413
|
+
|
414
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
415
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
416
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
417
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
418
|
+
transports_version_send: [:rest]
|
419
|
+
|
420
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
421
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
422
|
+
|
423
|
+
options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
|
424
|
+
metadata: call_metadata,
|
425
|
+
retry_policy: @config.rpcs.delete_user.retry_policy
|
426
|
+
|
427
|
+
options.apply_defaults timeout: @config.timeout,
|
428
|
+
metadata: @config.metadata,
|
429
|
+
retry_policy: @config.retry_policy
|
430
|
+
|
431
|
+
@user_service_stub.delete_user request, options do |result, operation|
|
432
|
+
yield result, operation if block_given?
|
433
|
+
end
|
434
|
+
rescue ::Gapic::Rest::Error => e
|
435
|
+
raise ::Google::Cloud::Error.from_error(e)
|
436
|
+
end
|
437
|
+
|
438
|
+
##
|
439
|
+
# Updates a Merchant Center account user. Executing this method requires
|
440
|
+
# admin access.
|
441
|
+
#
|
442
|
+
# @overload update_user(request, options = nil)
|
443
|
+
# Pass arguments to `update_user` via a request object, either of type
|
444
|
+
# {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash.
|
445
|
+
#
|
446
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Hash]
|
447
|
+
# A request object representing the call parameters. Required. To specify no
|
448
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
449
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
450
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
451
|
+
#
|
452
|
+
# @overload update_user(user: nil, update_mask: nil)
|
453
|
+
# Pass arguments to `update_user` via keyword arguments. Note that at
|
454
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
455
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
456
|
+
#
|
457
|
+
# @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash]
|
458
|
+
# Required. The new version of the user.
|
459
|
+
#
|
460
|
+
# Use `me` to refer to your own email address, for example
|
461
|
+
# `accounts/{account}/users/me`.
|
462
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
463
|
+
# Optional. List of fields being updated.
|
464
|
+
#
|
465
|
+
# The following fields are supported (in both `snake_case` and
|
466
|
+
# `lowerCamelCase`):
|
467
|
+
#
|
468
|
+
# - `access_rights`
|
469
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
470
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User]
|
471
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
472
|
+
#
|
473
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::User]
|
474
|
+
#
|
475
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
476
|
+
#
|
477
|
+
# @example Basic example
|
478
|
+
# require "google/shopping/merchant/accounts/v1"
|
479
|
+
#
|
480
|
+
# # Create a client object. The client can be reused for multiple calls.
|
481
|
+
# client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
|
482
|
+
#
|
483
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
484
|
+
# request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new
|
485
|
+
#
|
486
|
+
# # Call the update_user method.
|
487
|
+
# result = client.update_user request
|
488
|
+
#
|
489
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User.
|
490
|
+
# p result
|
491
|
+
#
|
492
|
+
def update_user request, options = nil
|
493
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
494
|
+
|
495
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest
|
496
|
+
|
497
|
+
# Converts hash and nil to an options object
|
498
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
499
|
+
|
500
|
+
# Customize the options with defaults
|
501
|
+
call_metadata = @config.rpcs.update_user.metadata.to_h
|
502
|
+
|
503
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
504
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
505
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
506
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
507
|
+
transports_version_send: [:rest]
|
508
|
+
|
509
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
510
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
511
|
+
|
512
|
+
options.apply_defaults timeout: @config.rpcs.update_user.timeout,
|
513
|
+
metadata: call_metadata,
|
514
|
+
retry_policy: @config.rpcs.update_user.retry_policy
|
515
|
+
|
516
|
+
options.apply_defaults timeout: @config.timeout,
|
517
|
+
metadata: @config.metadata,
|
518
|
+
retry_policy: @config.retry_policy
|
519
|
+
|
520
|
+
@user_service_stub.update_user request, options do |result, operation|
|
521
|
+
yield result, operation if block_given?
|
522
|
+
end
|
523
|
+
rescue ::Gapic::Rest::Error => e
|
524
|
+
raise ::Google::Cloud::Error.from_error(e)
|
525
|
+
end
|
526
|
+
|
527
|
+
##
|
528
|
+
# Lists all users of a Merchant Center account.
|
529
|
+
#
|
530
|
+
# @overload list_users(request, options = nil)
|
531
|
+
# Pass arguments to `list_users` via a request object, either of type
|
532
|
+
# {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash.
|
533
|
+
#
|
534
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Hash]
|
535
|
+
# A request object representing the call parameters. Required. To specify no
|
536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
538
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
539
|
+
#
|
540
|
+
# @overload list_users(parent: nil, page_size: nil, page_token: nil)
|
541
|
+
# Pass arguments to `list_users` via keyword arguments. Note that at
|
542
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
543
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
544
|
+
#
|
545
|
+
# @param parent [::String]
|
546
|
+
# Required. The parent, which owns this collection of users.
|
547
|
+
# Format: `accounts/{account}`
|
548
|
+
# @param page_size [::Integer]
|
549
|
+
# Optional. The maximum number of users to return. The service may return
|
550
|
+
# fewer than this value. If unspecified, at most 50 users will be returned.
|
551
|
+
# The maximum value is 100; values above 100 will be coerced to 100
|
552
|
+
# @param page_token [::String]
|
553
|
+
# Optional. A page token, received from a previous `ListUsers` call.
|
554
|
+
# Provide this to retrieve the subsequent page.
|
555
|
+
#
|
556
|
+
# When paginating, all other parameters provided to `ListUsers` must match
|
557
|
+
# the call that provided the page token.
|
558
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
559
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>]
|
560
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
561
|
+
#
|
562
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>]
|
563
|
+
#
|
564
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
565
|
+
#
|
566
|
+
# @example Basic example
|
567
|
+
# require "google/shopping/merchant/accounts/v1"
|
568
|
+
#
|
569
|
+
# # Create a client object. The client can be reused for multiple calls.
|
570
|
+
# client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new
|
571
|
+
#
|
572
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
573
|
+
# request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new
|
574
|
+
#
|
575
|
+
# # Call the list_users method.
|
576
|
+
# result = client.list_users request
|
577
|
+
#
|
578
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
579
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
580
|
+
# result.each do |item|
|
581
|
+
# # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::User.
|
582
|
+
# p item
|
583
|
+
# end
|
584
|
+
#
|
585
|
+
def list_users request, options = nil
|
586
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
587
|
+
|
588
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest
|
589
|
+
|
590
|
+
# Converts hash and nil to an options object
|
591
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
592
|
+
|
593
|
+
# Customize the options with defaults
|
594
|
+
call_metadata = @config.rpcs.list_users.metadata.to_h
|
595
|
+
|
596
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
597
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
598
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
599
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
600
|
+
transports_version_send: [:rest]
|
601
|
+
|
602
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
603
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
604
|
+
|
605
|
+
options.apply_defaults timeout: @config.rpcs.list_users.timeout,
|
606
|
+
metadata: call_metadata,
|
607
|
+
retry_policy: @config.rpcs.list_users.retry_policy
|
608
|
+
|
609
|
+
options.apply_defaults timeout: @config.timeout,
|
610
|
+
metadata: @config.metadata,
|
611
|
+
retry_policy: @config.retry_policy
|
612
|
+
|
613
|
+
@user_service_stub.list_users request, options do |result, operation|
|
614
|
+
result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, options
|
615
|
+
yield result, operation if block_given?
|
616
|
+
throw :response, result
|
617
|
+
end
|
618
|
+
rescue ::Gapic::Rest::Error => e
|
619
|
+
raise ::Google::Cloud::Error.from_error(e)
|
620
|
+
end
|
621
|
+
|
622
|
+
##
|
623
|
+
# Configuration class for the UserService REST API.
|
624
|
+
#
|
625
|
+
# This class represents the configuration for UserService REST,
|
626
|
+
# providing control over timeouts, retry behavior, logging, transport
|
627
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
628
|
+
# applied individually to specific RPCs. See
|
629
|
+
# {::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration::Rpcs}
|
630
|
+
# for a list of RPCs that can be configured independently.
|
631
|
+
#
|
632
|
+
# Configuration can be applied globally to all clients, or to a single client
|
633
|
+
# on construction.
|
634
|
+
#
|
635
|
+
# @example
|
636
|
+
#
|
637
|
+
# # Modify the global config, setting the timeout for
|
638
|
+
# # get_user to 20 seconds,
|
639
|
+
# # and all remaining timeouts to 10 seconds.
|
640
|
+
# ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.configure do |config|
|
641
|
+
# config.timeout = 10.0
|
642
|
+
# config.rpcs.get_user.timeout = 20.0
|
643
|
+
# end
|
644
|
+
#
|
645
|
+
# # Apply the above configuration only to a new client.
|
646
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config|
|
647
|
+
# config.timeout = 10.0
|
648
|
+
# config.rpcs.get_user.timeout = 20.0
|
649
|
+
# end
|
650
|
+
#
|
651
|
+
# @!attribute [rw] endpoint
|
652
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
653
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
654
|
+
# @return [::String,nil]
|
655
|
+
# @!attribute [rw] credentials
|
656
|
+
# Credentials to send with calls. You may provide any of the following types:
|
657
|
+
# * (`String`) The path to a service account key file in JSON format
|
658
|
+
# * (`Hash`) A service account key as a Hash
|
659
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
660
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
661
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
662
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
663
|
+
# * (`nil`) indicating no credentials
|
664
|
+
#
|
665
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
666
|
+
# external source for authentication to Google Cloud, you must validate it before
|
667
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
668
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
669
|
+
# For more information, refer to [Validate credential configurations from external
|
670
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
671
|
+
# @return [::Object]
|
672
|
+
# @!attribute [rw] scope
|
673
|
+
# The OAuth scopes
|
674
|
+
# @return [::Array<::String>]
|
675
|
+
# @!attribute [rw] lib_name
|
676
|
+
# The library name as recorded in instrumentation and logging
|
677
|
+
# @return [::String]
|
678
|
+
# @!attribute [rw] lib_version
|
679
|
+
# The library version as recorded in instrumentation and logging
|
680
|
+
# @return [::String]
|
681
|
+
# @!attribute [rw] timeout
|
682
|
+
# The call timeout in seconds.
|
683
|
+
# @return [::Numeric]
|
684
|
+
# @!attribute [rw] metadata
|
685
|
+
# Additional headers to be sent with the call.
|
686
|
+
# @return [::Hash{::Symbol=>::String}]
|
687
|
+
# @!attribute [rw] retry_policy
|
688
|
+
# The retry policy. The value is a hash with the following keys:
|
689
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
690
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
691
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
692
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
693
|
+
# trigger a retry.
|
694
|
+
# @return [::Hash]
|
695
|
+
# @!attribute [rw] quota_project
|
696
|
+
# A separate project against which to charge quota.
|
697
|
+
# @return [::String]
|
698
|
+
# @!attribute [rw] universe_domain
|
699
|
+
# The universe domain within which to make requests. This determines the
|
700
|
+
# default endpoint URL. The default value of nil uses the environment
|
701
|
+
# universe (usually the default "googleapis.com" universe).
|
702
|
+
# @return [::String,nil]
|
703
|
+
# @!attribute [rw] logger
|
704
|
+
# A custom logger to use for request/response debug logging, or the value
|
705
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
706
|
+
# explicitly disable logging.
|
707
|
+
# @return [::Logger,:default,nil]
|
708
|
+
#
|
709
|
+
class Configuration
|
710
|
+
extend ::Gapic::Config
|
711
|
+
|
712
|
+
# @private
|
713
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
714
|
+
DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
|
715
|
+
|
716
|
+
config_attr :endpoint, nil, ::String, nil
|
717
|
+
config_attr :credentials, nil do |value|
|
718
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
719
|
+
allowed.any? { |klass| klass === value }
|
720
|
+
end
|
721
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
722
|
+
config_attr :lib_name, nil, ::String, nil
|
723
|
+
config_attr :lib_version, nil, ::String, nil
|
724
|
+
config_attr :timeout, nil, ::Numeric, nil
|
725
|
+
config_attr :metadata, nil, ::Hash, nil
|
726
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
727
|
+
config_attr :quota_project, nil, ::String, nil
|
728
|
+
config_attr :universe_domain, nil, ::String, nil
|
729
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
730
|
+
|
731
|
+
# @private
|
732
|
+
def initialize parent_config = nil
|
733
|
+
@parent_config = parent_config unless parent_config.nil?
|
734
|
+
|
735
|
+
yield self if block_given?
|
736
|
+
end
|
737
|
+
|
738
|
+
##
|
739
|
+
# Configurations for individual RPCs
|
740
|
+
# @return [Rpcs]
|
741
|
+
#
|
742
|
+
def rpcs
|
743
|
+
@rpcs ||= begin
|
744
|
+
parent_rpcs = nil
|
745
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
746
|
+
Rpcs.new parent_rpcs
|
747
|
+
end
|
748
|
+
end
|
749
|
+
|
750
|
+
##
|
751
|
+
# Configuration RPC class for the UserService API.
|
752
|
+
#
|
753
|
+
# Includes fields providing the configuration for each RPC in this service.
|
754
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
755
|
+
# the following configuration fields:
|
756
|
+
#
|
757
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
758
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
759
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
760
|
+
# include the following keys:
|
761
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
762
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
763
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
764
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
765
|
+
# trigger a retry.
|
766
|
+
#
|
767
|
+
class Rpcs
|
768
|
+
##
|
769
|
+
# RPC-specific configuration for `get_user`
|
770
|
+
# @return [::Gapic::Config::Method]
|
771
|
+
#
|
772
|
+
attr_reader :get_user
|
773
|
+
##
|
774
|
+
# RPC-specific configuration for `create_user`
|
775
|
+
# @return [::Gapic::Config::Method]
|
776
|
+
#
|
777
|
+
attr_reader :create_user
|
778
|
+
##
|
779
|
+
# RPC-specific configuration for `delete_user`
|
780
|
+
# @return [::Gapic::Config::Method]
|
781
|
+
#
|
782
|
+
attr_reader :delete_user
|
783
|
+
##
|
784
|
+
# RPC-specific configuration for `update_user`
|
785
|
+
# @return [::Gapic::Config::Method]
|
786
|
+
#
|
787
|
+
attr_reader :update_user
|
788
|
+
##
|
789
|
+
# RPC-specific configuration for `list_users`
|
790
|
+
# @return [::Gapic::Config::Method]
|
791
|
+
#
|
792
|
+
attr_reader :list_users
|
793
|
+
|
794
|
+
# @private
|
795
|
+
def initialize parent_rpcs = nil
|
796
|
+
get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
|
797
|
+
@get_user = ::Gapic::Config::Method.new get_user_config
|
798
|
+
create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
|
799
|
+
@create_user = ::Gapic::Config::Method.new create_user_config
|
800
|
+
delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
|
801
|
+
@delete_user = ::Gapic::Config::Method.new delete_user_config
|
802
|
+
update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
|
803
|
+
@update_user = ::Gapic::Config::Method.new update_user_config
|
804
|
+
list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
|
805
|
+
@list_users = ::Gapic::Config::Method.new list_users_config
|
806
|
+
|
807
|
+
yield self if block_given?
|
808
|
+
end
|
809
|
+
end
|
810
|
+
end
|
811
|
+
end
|
812
|
+
end
|
813
|
+
end
|
814
|
+
end
|
815
|
+
end
|
816
|
+
end
|
817
|
+
end
|
818
|
+
end
|