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,716 @@
|
|
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/programs_pb"
|
21
|
+
require "google/shopping/merchant/accounts/v1/programs_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Shopping
|
25
|
+
module Merchant
|
26
|
+
module Accounts
|
27
|
+
module V1
|
28
|
+
module ProgramsService
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the ProgramsService service.
|
32
|
+
#
|
33
|
+
# Service for program management.
|
34
|
+
#
|
35
|
+
# Programs provide a mechanism for adding functionality to merchant accounts. A
|
36
|
+
# typical example of this is the [Free product
|
37
|
+
# listings](https://support.google.com/merchants/answer/13889434)
|
38
|
+
# program, which enables products from a merchant's store to be shown across
|
39
|
+
# Google for free.
|
40
|
+
#
|
41
|
+
# This service exposes methods to retrieve a business's
|
42
|
+
# participation in all available programs, in addition to methods for
|
43
|
+
# explicitly enabling or disabling participation in each program.
|
44
|
+
#
|
45
|
+
class Client
|
46
|
+
# @private
|
47
|
+
API_VERSION = ""
|
48
|
+
|
49
|
+
# @private
|
50
|
+
DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
|
51
|
+
|
52
|
+
include Paths
|
53
|
+
|
54
|
+
# @private
|
55
|
+
attr_reader :programs_service_stub
|
56
|
+
|
57
|
+
##
|
58
|
+
# Configure the ProgramsService Client class.
|
59
|
+
#
|
60
|
+
# See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration}
|
61
|
+
# for a description of the configuration fields.
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
#
|
65
|
+
# # Modify the configuration for all ProgramsService clients
|
66
|
+
# ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.configure do |config|
|
67
|
+
# config.timeout = 10.0
|
68
|
+
# end
|
69
|
+
#
|
70
|
+
# @yield [config] Configure the Client client.
|
71
|
+
# @yieldparam config [Client::Configuration]
|
72
|
+
#
|
73
|
+
# @return [Client::Configuration]
|
74
|
+
#
|
75
|
+
def self.configure
|
76
|
+
@configure ||= begin
|
77
|
+
namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1"]
|
78
|
+
parent_config = while namespace.any?
|
79
|
+
parent_name = namespace.join "::"
|
80
|
+
parent_const = const_get parent_name
|
81
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
82
|
+
namespace.pop
|
83
|
+
end
|
84
|
+
default_config = Client::Configuration.new parent_config
|
85
|
+
|
86
|
+
default_config.timeout = 60.0
|
87
|
+
default_config.retry_policy = {
|
88
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config
|
92
|
+
end
|
93
|
+
yield @configure if block_given?
|
94
|
+
@configure
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Configure the ProgramsService Client instance.
|
99
|
+
#
|
100
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
101
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
102
|
+
# should be made on {Client.configure}.
|
103
|
+
#
|
104
|
+
# See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration}
|
105
|
+
# for a description of the configuration fields.
|
106
|
+
#
|
107
|
+
# @yield [config] Configure the Client client.
|
108
|
+
# @yieldparam config [Client::Configuration]
|
109
|
+
#
|
110
|
+
# @return [Client::Configuration]
|
111
|
+
#
|
112
|
+
def configure
|
113
|
+
yield @config if block_given?
|
114
|
+
@config
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# The effective universe domain
|
119
|
+
#
|
120
|
+
# @return [String]
|
121
|
+
#
|
122
|
+
def universe_domain
|
123
|
+
@programs_service_stub.universe_domain
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# Create a new ProgramsService REST client object.
|
128
|
+
#
|
129
|
+
# @example
|
130
|
+
#
|
131
|
+
# # Create a client using the default configuration
|
132
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new
|
133
|
+
#
|
134
|
+
# # Create a client using a custom configuration
|
135
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config|
|
136
|
+
# config.timeout = 10.0
|
137
|
+
# end
|
138
|
+
#
|
139
|
+
# @yield [config] Configure the ProgramsService client.
|
140
|
+
# @yieldparam config [Client::Configuration]
|
141
|
+
#
|
142
|
+
def initialize
|
143
|
+
# Create the configuration object
|
144
|
+
@config = Configuration.new Client.configure
|
145
|
+
|
146
|
+
# Yield the configuration if needed
|
147
|
+
yield @config if block_given?
|
148
|
+
|
149
|
+
# Create credentials
|
150
|
+
credentials = @config.credentials
|
151
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
152
|
+
# but only if the default endpoint does not have a region prefix.
|
153
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
154
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
155
|
+
!@config.endpoint.split(".").first.include?("-"))
|
156
|
+
credentials ||= Credentials.default scope: @config.scope,
|
157
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
158
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
159
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
160
|
+
end
|
161
|
+
|
162
|
+
@quota_project_id = @config.quota_project
|
163
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
164
|
+
|
165
|
+
@programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.new(
|
166
|
+
endpoint: @config.endpoint,
|
167
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
168
|
+
universe_domain: @config.universe_domain,
|
169
|
+
credentials: credentials,
|
170
|
+
logger: @config.logger
|
171
|
+
)
|
172
|
+
|
173
|
+
@programs_service_stub.logger(stub: true)&.info do |entry|
|
174
|
+
entry.set_system_name
|
175
|
+
entry.set_service
|
176
|
+
entry.message = "Created client for #{entry.service}"
|
177
|
+
entry.set_credentials_fields credentials
|
178
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
179
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
180
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# The logger used for request/response debug logging.
|
186
|
+
#
|
187
|
+
# @return [Logger]
|
188
|
+
#
|
189
|
+
def logger
|
190
|
+
@programs_service_stub.logger
|
191
|
+
end
|
192
|
+
|
193
|
+
# Service calls
|
194
|
+
|
195
|
+
##
|
196
|
+
# Retrieves the specified program for the account.
|
197
|
+
#
|
198
|
+
# @overload get_program(request, options = nil)
|
199
|
+
# Pass arguments to `get_program` via a request object, either of type
|
200
|
+
# {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash.
|
201
|
+
#
|
202
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Hash]
|
203
|
+
# A request object representing the call parameters. Required. To specify no
|
204
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
205
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
206
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
207
|
+
#
|
208
|
+
# @overload get_program(name: nil)
|
209
|
+
# Pass arguments to `get_program` via keyword arguments. Note that at
|
210
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
211
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
212
|
+
#
|
213
|
+
# @param name [::String]
|
214
|
+
# Required. The name of the program to retrieve.
|
215
|
+
# Format: `accounts/{account}/programs/{program}`. For example,
|
216
|
+
# `accounts/123456/programs/free-listings`.
|
217
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
218
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program]
|
219
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
220
|
+
#
|
221
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::Program]
|
222
|
+
#
|
223
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
224
|
+
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/shopping/merchant/accounts/v1"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new
|
233
|
+
#
|
234
|
+
# # Call the get_program method.
|
235
|
+
# result = client.get_program request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program.
|
238
|
+
# p result
|
239
|
+
#
|
240
|
+
def get_program request, options = nil
|
241
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
242
|
+
|
243
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest
|
244
|
+
|
245
|
+
# Converts hash and nil to an options object
|
246
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
247
|
+
|
248
|
+
# Customize the options with defaults
|
249
|
+
call_metadata = @config.rpcs.get_program.metadata.to_h
|
250
|
+
|
251
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
252
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
253
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
254
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
255
|
+
transports_version_send: [:rest]
|
256
|
+
|
257
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
258
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
259
|
+
|
260
|
+
options.apply_defaults timeout: @config.rpcs.get_program.timeout,
|
261
|
+
metadata: call_metadata,
|
262
|
+
retry_policy: @config.rpcs.get_program.retry_policy
|
263
|
+
|
264
|
+
options.apply_defaults timeout: @config.timeout,
|
265
|
+
metadata: @config.metadata,
|
266
|
+
retry_policy: @config.retry_policy
|
267
|
+
|
268
|
+
@programs_service_stub.get_program request, options do |result, operation|
|
269
|
+
yield result, operation if block_given?
|
270
|
+
end
|
271
|
+
rescue ::Gapic::Rest::Error => e
|
272
|
+
raise ::Google::Cloud::Error.from_error(e)
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# Retrieves all programs for the account.
|
277
|
+
#
|
278
|
+
# @overload list_programs(request, options = nil)
|
279
|
+
# Pass arguments to `list_programs` via a request object, either of type
|
280
|
+
# {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash.
|
281
|
+
#
|
282
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Hash]
|
283
|
+
# A request object representing the call parameters. Required. To specify no
|
284
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
285
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
286
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
287
|
+
#
|
288
|
+
# @overload list_programs(parent: nil, page_size: nil, page_token: nil)
|
289
|
+
# Pass arguments to `list_programs` via keyword arguments. Note that at
|
290
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
291
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
292
|
+
#
|
293
|
+
# @param parent [::String]
|
294
|
+
# Required. The name of the account for which to retrieve all programs.
|
295
|
+
# Format: `accounts/{account}`
|
296
|
+
# @param page_size [::Integer]
|
297
|
+
# Optional. The maximum number of programs to return in a single response. If
|
298
|
+
# unspecified (or 0), a default size of 1000 is used. The maximum value is
|
299
|
+
# 1000; values above 1000 will be coerced to 1000.
|
300
|
+
# @param page_token [::String]
|
301
|
+
# Optional. A continuation token, received from a previous `ListPrograms`
|
302
|
+
# call. Provide this to retrieve the next page.
|
303
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
304
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>]
|
305
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
306
|
+
#
|
307
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>]
|
308
|
+
#
|
309
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
310
|
+
#
|
311
|
+
# @example Basic example
|
312
|
+
# require "google/shopping/merchant/accounts/v1"
|
313
|
+
#
|
314
|
+
# # Create a client object. The client can be reused for multiple calls.
|
315
|
+
# client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new
|
316
|
+
#
|
317
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
318
|
+
# request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new
|
319
|
+
#
|
320
|
+
# # Call the list_programs method.
|
321
|
+
# result = client.list_programs request
|
322
|
+
#
|
323
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
324
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
325
|
+
# result.each do |item|
|
326
|
+
# # Each element is of type ::Google::Shopping::Merchant::Accounts::V1::Program.
|
327
|
+
# p item
|
328
|
+
# end
|
329
|
+
#
|
330
|
+
def list_programs request, options = nil
|
331
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
332
|
+
|
333
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest
|
334
|
+
|
335
|
+
# Converts hash and nil to an options object
|
336
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
337
|
+
|
338
|
+
# Customize the options with defaults
|
339
|
+
call_metadata = @config.rpcs.list_programs.metadata.to_h
|
340
|
+
|
341
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
342
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
343
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
344
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
345
|
+
transports_version_send: [:rest]
|
346
|
+
|
347
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
348
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
349
|
+
|
350
|
+
options.apply_defaults timeout: @config.rpcs.list_programs.timeout,
|
351
|
+
metadata: call_metadata,
|
352
|
+
retry_policy: @config.rpcs.list_programs.retry_policy
|
353
|
+
|
354
|
+
options.apply_defaults timeout: @config.timeout,
|
355
|
+
metadata: @config.metadata,
|
356
|
+
retry_policy: @config.retry_policy
|
357
|
+
|
358
|
+
@programs_service_stub.list_programs request, options do |result, operation|
|
359
|
+
result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options
|
360
|
+
yield result, operation if block_given?
|
361
|
+
throw :response, result
|
362
|
+
end
|
363
|
+
rescue ::Gapic::Rest::Error => e
|
364
|
+
raise ::Google::Cloud::Error.from_error(e)
|
365
|
+
end
|
366
|
+
|
367
|
+
##
|
368
|
+
# Enable participation in the specified program for the account.
|
369
|
+
#
|
370
|
+
# @overload enable_program(request, options = nil)
|
371
|
+
# Pass arguments to `enable_program` via a request object, either of type
|
372
|
+
# {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash.
|
373
|
+
#
|
374
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Hash]
|
375
|
+
# A request object representing the call parameters. Required. To specify no
|
376
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
377
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
378
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
379
|
+
#
|
380
|
+
# @overload enable_program(name: nil)
|
381
|
+
# Pass arguments to `enable_program` via keyword arguments. Note that at
|
382
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
383
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
384
|
+
#
|
385
|
+
# @param name [::String]
|
386
|
+
# Required. The name of the program for which to enable participation for the
|
387
|
+
# given account. Format: `accounts/{account}/programs/{program}`. For
|
388
|
+
# example, `accounts/123456/programs/free-listings`.
|
389
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
390
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program]
|
391
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
392
|
+
#
|
393
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::Program]
|
394
|
+
#
|
395
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
396
|
+
#
|
397
|
+
# @example Basic example
|
398
|
+
# require "google/shopping/merchant/accounts/v1"
|
399
|
+
#
|
400
|
+
# # Create a client object. The client can be reused for multiple calls.
|
401
|
+
# client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new
|
402
|
+
#
|
403
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
404
|
+
# request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new
|
405
|
+
#
|
406
|
+
# # Call the enable_program method.
|
407
|
+
# result = client.enable_program request
|
408
|
+
#
|
409
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program.
|
410
|
+
# p result
|
411
|
+
#
|
412
|
+
def enable_program request, options = nil
|
413
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
414
|
+
|
415
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest
|
416
|
+
|
417
|
+
# Converts hash and nil to an options object
|
418
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
419
|
+
|
420
|
+
# Customize the options with defaults
|
421
|
+
call_metadata = @config.rpcs.enable_program.metadata.to_h
|
422
|
+
|
423
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
424
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
425
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
426
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
427
|
+
transports_version_send: [:rest]
|
428
|
+
|
429
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
430
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
431
|
+
|
432
|
+
options.apply_defaults timeout: @config.rpcs.enable_program.timeout,
|
433
|
+
metadata: call_metadata,
|
434
|
+
retry_policy: @config.rpcs.enable_program.retry_policy
|
435
|
+
|
436
|
+
options.apply_defaults timeout: @config.timeout,
|
437
|
+
metadata: @config.metadata,
|
438
|
+
retry_policy: @config.retry_policy
|
439
|
+
|
440
|
+
@programs_service_stub.enable_program request, options do |result, operation|
|
441
|
+
yield result, operation if block_given?
|
442
|
+
end
|
443
|
+
rescue ::Gapic::Rest::Error => e
|
444
|
+
raise ::Google::Cloud::Error.from_error(e)
|
445
|
+
end
|
446
|
+
|
447
|
+
##
|
448
|
+
# Disable participation in the specified program for the account.
|
449
|
+
#
|
450
|
+
# @overload disable_program(request, options = nil)
|
451
|
+
# Pass arguments to `disable_program` via a request object, either of type
|
452
|
+
# {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash.
|
453
|
+
#
|
454
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Hash]
|
455
|
+
# A request object representing the call parameters. Required. To specify no
|
456
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
457
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
458
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
459
|
+
#
|
460
|
+
# @overload disable_program(name: nil)
|
461
|
+
# Pass arguments to `disable_program` via keyword arguments. Note that at
|
462
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
463
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
464
|
+
#
|
465
|
+
# @param name [::String]
|
466
|
+
# Required. The name of the program for which to disable participation for
|
467
|
+
# the given account. Format: `accounts/{account}/programs/{program}`. For
|
468
|
+
# example, `accounts/123456/programs/free-listings`.
|
469
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
470
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program]
|
471
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
472
|
+
#
|
473
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::Program]
|
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::ProgramsService::Rest::Client.new
|
482
|
+
#
|
483
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
484
|
+
# request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new
|
485
|
+
#
|
486
|
+
# # Call the disable_program method.
|
487
|
+
# result = client.disable_program request
|
488
|
+
#
|
489
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program.
|
490
|
+
# p result
|
491
|
+
#
|
492
|
+
def disable_program 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::DisableProgramRequest
|
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.disable_program.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.disable_program.timeout,
|
513
|
+
metadata: call_metadata,
|
514
|
+
retry_policy: @config.rpcs.disable_program.retry_policy
|
515
|
+
|
516
|
+
options.apply_defaults timeout: @config.timeout,
|
517
|
+
metadata: @config.metadata,
|
518
|
+
retry_policy: @config.retry_policy
|
519
|
+
|
520
|
+
@programs_service_stub.disable_program 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
|
+
# Configuration class for the ProgramsService REST API.
|
529
|
+
#
|
530
|
+
# This class represents the configuration for ProgramsService REST,
|
531
|
+
# providing control over timeouts, retry behavior, logging, transport
|
532
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
533
|
+
# applied individually to specific RPCs. See
|
534
|
+
# {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration::Rpcs}
|
535
|
+
# for a list of RPCs that can be configured independently.
|
536
|
+
#
|
537
|
+
# Configuration can be applied globally to all clients, or to a single client
|
538
|
+
# on construction.
|
539
|
+
#
|
540
|
+
# @example
|
541
|
+
#
|
542
|
+
# # Modify the global config, setting the timeout for
|
543
|
+
# # get_program to 20 seconds,
|
544
|
+
# # and all remaining timeouts to 10 seconds.
|
545
|
+
# ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.configure do |config|
|
546
|
+
# config.timeout = 10.0
|
547
|
+
# config.rpcs.get_program.timeout = 20.0
|
548
|
+
# end
|
549
|
+
#
|
550
|
+
# # Apply the above configuration only to a new client.
|
551
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config|
|
552
|
+
# config.timeout = 10.0
|
553
|
+
# config.rpcs.get_program.timeout = 20.0
|
554
|
+
# end
|
555
|
+
#
|
556
|
+
# @!attribute [rw] endpoint
|
557
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
558
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
559
|
+
# @return [::String,nil]
|
560
|
+
# @!attribute [rw] credentials
|
561
|
+
# Credentials to send with calls. You may provide any of the following types:
|
562
|
+
# * (`String`) The path to a service account key file in JSON format
|
563
|
+
# * (`Hash`) A service account key as a Hash
|
564
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
565
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
566
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
567
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
568
|
+
# * (`nil`) indicating no credentials
|
569
|
+
#
|
570
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
571
|
+
# external source for authentication to Google Cloud, you must validate it before
|
572
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
573
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
574
|
+
# For more information, refer to [Validate credential configurations from external
|
575
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
576
|
+
# @return [::Object]
|
577
|
+
# @!attribute [rw] scope
|
578
|
+
# The OAuth scopes
|
579
|
+
# @return [::Array<::String>]
|
580
|
+
# @!attribute [rw] lib_name
|
581
|
+
# The library name as recorded in instrumentation and logging
|
582
|
+
# @return [::String]
|
583
|
+
# @!attribute [rw] lib_version
|
584
|
+
# The library version as recorded in instrumentation and logging
|
585
|
+
# @return [::String]
|
586
|
+
# @!attribute [rw] timeout
|
587
|
+
# The call timeout in seconds.
|
588
|
+
# @return [::Numeric]
|
589
|
+
# @!attribute [rw] metadata
|
590
|
+
# Additional headers to be sent with the call.
|
591
|
+
# @return [::Hash{::Symbol=>::String}]
|
592
|
+
# @!attribute [rw] retry_policy
|
593
|
+
# The retry policy. The value is a hash with the following keys:
|
594
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
595
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
596
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
597
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
598
|
+
# trigger a retry.
|
599
|
+
# @return [::Hash]
|
600
|
+
# @!attribute [rw] quota_project
|
601
|
+
# A separate project against which to charge quota.
|
602
|
+
# @return [::String]
|
603
|
+
# @!attribute [rw] universe_domain
|
604
|
+
# The universe domain within which to make requests. This determines the
|
605
|
+
# default endpoint URL. The default value of nil uses the environment
|
606
|
+
# universe (usually the default "googleapis.com" universe).
|
607
|
+
# @return [::String,nil]
|
608
|
+
# @!attribute [rw] logger
|
609
|
+
# A custom logger to use for request/response debug logging, or the value
|
610
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
611
|
+
# explicitly disable logging.
|
612
|
+
# @return [::Logger,:default,nil]
|
613
|
+
#
|
614
|
+
class Configuration
|
615
|
+
extend ::Gapic::Config
|
616
|
+
|
617
|
+
# @private
|
618
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
619
|
+
DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
|
620
|
+
|
621
|
+
config_attr :endpoint, nil, ::String, nil
|
622
|
+
config_attr :credentials, nil do |value|
|
623
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
624
|
+
allowed.any? { |klass| klass === value }
|
625
|
+
end
|
626
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
627
|
+
config_attr :lib_name, nil, ::String, nil
|
628
|
+
config_attr :lib_version, nil, ::String, nil
|
629
|
+
config_attr :timeout, nil, ::Numeric, nil
|
630
|
+
config_attr :metadata, nil, ::Hash, nil
|
631
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
632
|
+
config_attr :quota_project, nil, ::String, nil
|
633
|
+
config_attr :universe_domain, nil, ::String, nil
|
634
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
635
|
+
|
636
|
+
# @private
|
637
|
+
def initialize parent_config = nil
|
638
|
+
@parent_config = parent_config unless parent_config.nil?
|
639
|
+
|
640
|
+
yield self if block_given?
|
641
|
+
end
|
642
|
+
|
643
|
+
##
|
644
|
+
# Configurations for individual RPCs
|
645
|
+
# @return [Rpcs]
|
646
|
+
#
|
647
|
+
def rpcs
|
648
|
+
@rpcs ||= begin
|
649
|
+
parent_rpcs = nil
|
650
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
651
|
+
Rpcs.new parent_rpcs
|
652
|
+
end
|
653
|
+
end
|
654
|
+
|
655
|
+
##
|
656
|
+
# Configuration RPC class for the ProgramsService API.
|
657
|
+
#
|
658
|
+
# Includes fields providing the configuration for each RPC in this service.
|
659
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
660
|
+
# the following configuration fields:
|
661
|
+
#
|
662
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
663
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
664
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
665
|
+
# include the following keys:
|
666
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
667
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
668
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
669
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
670
|
+
# trigger a retry.
|
671
|
+
#
|
672
|
+
class Rpcs
|
673
|
+
##
|
674
|
+
# RPC-specific configuration for `get_program`
|
675
|
+
# @return [::Gapic::Config::Method]
|
676
|
+
#
|
677
|
+
attr_reader :get_program
|
678
|
+
##
|
679
|
+
# RPC-specific configuration for `list_programs`
|
680
|
+
# @return [::Gapic::Config::Method]
|
681
|
+
#
|
682
|
+
attr_reader :list_programs
|
683
|
+
##
|
684
|
+
# RPC-specific configuration for `enable_program`
|
685
|
+
# @return [::Gapic::Config::Method]
|
686
|
+
#
|
687
|
+
attr_reader :enable_program
|
688
|
+
##
|
689
|
+
# RPC-specific configuration for `disable_program`
|
690
|
+
# @return [::Gapic::Config::Method]
|
691
|
+
#
|
692
|
+
attr_reader :disable_program
|
693
|
+
|
694
|
+
# @private
|
695
|
+
def initialize parent_rpcs = nil
|
696
|
+
get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program
|
697
|
+
@get_program = ::Gapic::Config::Method.new get_program_config
|
698
|
+
list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs
|
699
|
+
@list_programs = ::Gapic::Config::Method.new list_programs_config
|
700
|
+
enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program
|
701
|
+
@enable_program = ::Gapic::Config::Method.new enable_program_config
|
702
|
+
disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program
|
703
|
+
@disable_program = ::Gapic::Config::Method.new disable_program_config
|
704
|
+
|
705
|
+
yield self if block_given?
|
706
|
+
end
|
707
|
+
end
|
708
|
+
end
|
709
|
+
end
|
710
|
+
end
|
711
|
+
end
|
712
|
+
end
|
713
|
+
end
|
714
|
+
end
|
715
|
+
end
|
716
|
+
end
|