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