google-shopping-merchant-accounts-v1beta 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +452 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +419 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +130 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +633 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +586 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +249 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +47 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +67 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +942 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +80 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +890 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +423 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +71 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +525 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +485 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +524 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +484 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +50 -0
- data/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +48 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +539 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +499 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +65 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +724 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +670 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +310 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +551 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +511 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +189 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +53 -0
- data/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +734 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +680 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +309 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +64 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +67 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +65 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +835 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +774 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +368 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +62 -0
- data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +526 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +486 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +83 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +522 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +482 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +189 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +623 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +584 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +246 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +838 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +777 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +368 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/version.rb +7 -2
- data/lib/google/shopping/merchant/accounts/v1beta.rb +60 -0
- data/lib/google-shopping-merchant-accounts-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +399 -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 +222 -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/timestamp.rb +127 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +43 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +101 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +142 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +219 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +129 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +72 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +43 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +82 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +87 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +238 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +40 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +160 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +195 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +743 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +88 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +99 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +132 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +37 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +156 -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 +99 -0
- data/proto_docs/google/type/interval.rb +45 -0
- data/proto_docs/google/type/phone_number.rb +112 -0
- data/proto_docs/google/type/postal_address.rb +135 -0
- metadata +234 -10
@@ -0,0 +1,190 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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/shopping/merchant/accounts/v1beta/businessinfo_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Shopping
|
23
|
+
module Merchant
|
24
|
+
module Accounts
|
25
|
+
module V1beta
|
26
|
+
module BusinessInfoService
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the BusinessInfoService service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
43
|
+
numeric_enums: true,
|
44
|
+
raise_faraday_errors: false
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# The effective universe domain
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
#
|
52
|
+
def universe_domain
|
53
|
+
@client_stub.universe_domain
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# The effective endpoint
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
#
|
61
|
+
def endpoint
|
62
|
+
@client_stub.endpoint
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Baseline implementation for the get_business_info REST call
|
67
|
+
#
|
68
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest]
|
69
|
+
# A request object representing the call parameters. Required.
|
70
|
+
# @param options [::Gapic::CallOptions]
|
71
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
72
|
+
#
|
73
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
74
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo]
|
75
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
76
|
+
#
|
77
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo]
|
78
|
+
# A result object deserialized from the server's reply
|
79
|
+
def get_business_info request_pb, options = nil
|
80
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
81
|
+
|
82
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb
|
83
|
+
query_string_params = if query_string_params.any?
|
84
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
85
|
+
else
|
86
|
+
{}
|
87
|
+
end
|
88
|
+
|
89
|
+
response = @client_stub.make_http_request(
|
90
|
+
verb,
|
91
|
+
uri: uri,
|
92
|
+
body: body || "",
|
93
|
+
params: query_string_params,
|
94
|
+
options: options
|
95
|
+
)
|
96
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
97
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true
|
98
|
+
|
99
|
+
yield result, operation if block_given?
|
100
|
+
result
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Baseline implementation for the update_business_info REST call
|
105
|
+
#
|
106
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest]
|
107
|
+
# A request object representing the call parameters. Required.
|
108
|
+
# @param options [::Gapic::CallOptions]
|
109
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
110
|
+
#
|
111
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
112
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo]
|
113
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
114
|
+
#
|
115
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo]
|
116
|
+
# A result object deserialized from the server's reply
|
117
|
+
def update_business_info request_pb, options = nil
|
118
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
119
|
+
|
120
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb
|
121
|
+
query_string_params = if query_string_params.any?
|
122
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
123
|
+
else
|
124
|
+
{}
|
125
|
+
end
|
126
|
+
|
127
|
+
response = @client_stub.make_http_request(
|
128
|
+
verb,
|
129
|
+
uri: uri,
|
130
|
+
body: body || "",
|
131
|
+
params: query_string_params,
|
132
|
+
options: options
|
133
|
+
)
|
134
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
135
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true
|
136
|
+
|
137
|
+
yield result, operation if block_given?
|
138
|
+
result
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# @private
|
143
|
+
#
|
144
|
+
# GRPC transcoding helper method for the get_business_info REST call
|
145
|
+
#
|
146
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest]
|
147
|
+
# A request object representing the call parameters. Required.
|
148
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
149
|
+
# Uri, Body, Query string parameters
|
150
|
+
def self.transcode_get_business_info_request request_pb
|
151
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
152
|
+
.with_bindings(
|
153
|
+
uri_method: :get,
|
154
|
+
uri_template: "/accounts/v1beta/{name}",
|
155
|
+
matches: [
|
156
|
+
["name", %r{^accounts/[^/]+/businessInfo/?$}, false]
|
157
|
+
]
|
158
|
+
)
|
159
|
+
transcoder.transcode request_pb
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# @private
|
164
|
+
#
|
165
|
+
# GRPC transcoding helper method for the update_business_info REST call
|
166
|
+
#
|
167
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest]
|
168
|
+
# A request object representing the call parameters. Required.
|
169
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
170
|
+
# Uri, Body, Query string parameters
|
171
|
+
def self.transcode_update_business_info_request request_pb
|
172
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
173
|
+
.with_bindings(
|
174
|
+
uri_method: :patch,
|
175
|
+
uri_template: "/accounts/v1beta/{business_info.name}",
|
176
|
+
body: "business_info",
|
177
|
+
matches: [
|
178
|
+
["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false]
|
179
|
+
]
|
180
|
+
)
|
181
|
+
transcoder.transcode request_pb
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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 "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/shopping/merchant/accounts/v1beta/version"
|
24
|
+
|
25
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials"
|
26
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/paths"
|
27
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Shopping
|
31
|
+
module Merchant
|
32
|
+
module Accounts
|
33
|
+
module V1beta
|
34
|
+
##
|
35
|
+
# Service to support business info API.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/shopping/merchant/accounts/v1beta/business_info_service/rest"
|
40
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new
|
41
|
+
#
|
42
|
+
module BusinessInfoService
|
43
|
+
# Client for the REST transport
|
44
|
+
module Rest
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
54
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/shopping/merchant/accounts/v1beta/version"
|
24
|
+
|
25
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials"
|
26
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/paths"
|
27
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/client"
|
28
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Shopping
|
32
|
+
module Merchant
|
33
|
+
module Accounts
|
34
|
+
module V1beta
|
35
|
+
##
|
36
|
+
# Service to support business info API.
|
37
|
+
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
39
|
+
#
|
40
|
+
# require "google/shopping/merchant/accounts/v1beta/business_info_service"
|
41
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new
|
42
|
+
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/shopping/merchant/accounts/v1beta/business_info_service/rest"
|
46
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new
|
47
|
+
#
|
48
|
+
module BusinessInfoService
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
helper_path = ::File.join __dir__, "business_info_service", "helpers.rb"
|
57
|
+
require "google/shopping/merchant/accounts/v1beta/business_info_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/shopping/merchant/accounts/v1beta/businessidentity.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/protobuf/field_mask_pb'
|
12
|
+
|
13
|
+
|
14
|
+
descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/businessidentity.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa5\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12m\n\x12promotions_consent\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x01\x12\x66\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x66\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12h\n\rveteran_owned\x18\x05 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12g\n\x0clatino_owned\x18\x06 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12i\n\x0esmall_business\x18\x07 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x8d\x02\n\x11IdentityAttribute\x12\x83\x01\n\x14identity_declaration\x18\x01 \x01(\x0e\x32`.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xb1\x01\n\x1dUpdateBusinessIdentityRequest\x12Z\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x42usinessIdentityService\x12\xdb\x01\n\x13GetBusinessIdentity\x12\x44.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/businessIdentity}\x12\xa0\x02\n\x16UpdateBusinessIdentity\x12G.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"\x80\x01\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x42usinessIdentityProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
30
|
+
]
|
31
|
+
imports.each do |type_name, expected_filename|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
33
|
+
if import_file.name != expected_filename
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
38
|
+
warn "This will become an error in the next major version."
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Shopping
|
43
|
+
module Merchant
|
44
|
+
module Accounts
|
45
|
+
module V1beta
|
46
|
+
BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity").msgclass
|
47
|
+
BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute").msgclass
|
48
|
+
BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule
|
49
|
+
BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsent").enummodule
|
50
|
+
GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest").msgclass
|
51
|
+
UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest").msgclass
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.v1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2024 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/shopping/merchant/accounts/v1beta/businessidentity_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Shopping
|
24
|
+
module Merchant
|
25
|
+
module Accounts
|
26
|
+
module V1beta
|
27
|
+
module BusinessIdentityService
|
28
|
+
# Service to support [business
|
29
|
+
# identity](https://support.google.com/merchants/answer/12564247) API.
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include ::GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessIdentityService'
|
37
|
+
|
38
|
+
# Retrieves the business identity of an account.
|
39
|
+
rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity
|
40
|
+
# Updates the business identity of an account. Executing this method requires
|
41
|
+
# admin access.
|
42
|
+
rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity
|
43
|
+
end
|
44
|
+
|
45
|
+
Stub = Service.rpc_stub_class
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/shopping/merchant/accounts/v1beta/businessinfo.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/protobuf/field_mask_pb'
|
12
|
+
require 'google/shopping/merchant/accounts/v1beta/customerservice_pb'
|
13
|
+
require 'google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb'
|
14
|
+
require 'google/type/phone_number_pb'
|
15
|
+
require 'google/type/postal_address_pb'
|
16
|
+
|
17
|
+
|
18
|
+
descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/businessinfo.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/customerservice.proto\x1a\x45google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\x8c\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12l\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32@.google.shopping.merchant.accounts.v1beta.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12]\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1beta.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_service\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa5\x01\n\x19UpdateBusinessInfoRequest\x12R\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xb2\x04\n\x13\x42usinessInfoService\x12\xcb\x01\n\x0fGetBusinessInfo\x12@.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/businessInfo}\x12\x83\x02\n\x12UpdateBusinessInfo\x12\x43.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\"p\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02N2=/accounts/v1beta/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x42usinessInfoProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3"
|
19
|
+
|
20
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
21
|
+
|
22
|
+
begin
|
23
|
+
pool.add_serialized_file(descriptor_data)
|
24
|
+
rescue TypeError
|
25
|
+
# Compatibility code: will be removed in the next major version.
|
26
|
+
require 'google/protobuf/descriptor_pb'
|
27
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
28
|
+
parsed.clear_dependency
|
29
|
+
serialized = parsed.class.encode(parsed)
|
30
|
+
file = pool.add_serialized_file(serialized)
|
31
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
32
|
+
imports = [
|
33
|
+
["google.type.PostalAddress", "google/type/postal_address.proto"],
|
34
|
+
["google.type.PhoneNumber", "google/type/phone_number.proto"],
|
35
|
+
["google.shopping.merchant.accounts.v1beta.CustomerService", "google/shopping/merchant/accounts/v1beta/customerservice.proto"],
|
36
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
37
|
+
]
|
38
|
+
imports.each do |type_name, expected_filename|
|
39
|
+
import_file = pool.lookup(type_name).file_descriptor
|
40
|
+
if import_file.name != expected_filename
|
41
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
45
|
+
warn "This will become an error in the next major version."
|
46
|
+
end
|
47
|
+
|
48
|
+
module Google
|
49
|
+
module Shopping
|
50
|
+
module Merchant
|
51
|
+
module Accounts
|
52
|
+
module V1beta
|
53
|
+
BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessInfo").msgclass
|
54
|
+
GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest").msgclass
|
55
|
+
UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest").msgclass
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.v1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2024 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/shopping/merchant/accounts/v1beta/businessinfo_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Shopping
|
24
|
+
module Merchant
|
25
|
+
module Accounts
|
26
|
+
module V1beta
|
27
|
+
module BusinessInfoService
|
28
|
+
# Service to support business info API.
|
29
|
+
class Service
|
30
|
+
|
31
|
+
include ::GRPC::GenericService
|
32
|
+
|
33
|
+
self.marshal_class_method = :encode
|
34
|
+
self.unmarshal_class_method = :decode
|
35
|
+
self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessInfoService'
|
36
|
+
|
37
|
+
# Retrieves the business info of an account.
|
38
|
+
rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo
|
39
|
+
# Updates the business info of an account. Executing this method requires
|
40
|
+
# admin access.
|
41
|
+
rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo
|
42
|
+
end
|
43
|
+
|
44
|
+
Stub = Service.rpc_stub_class
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/shopping/merchant/accounts/v1beta/customerservice.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/type/phone_number_pb'
|
9
|
+
|
10
|
+
|
11
|
+
descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/customerservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/type/phone_number.proto\"\x90\x01\n\x0f\x43ustomerService\x12\x15\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_emailB\x08\n\x06_phoneB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x43ustomerServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.type.PhoneNumber", "google/type/phone_number.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
36
|
+
end
|
37
|
+
|
38
|
+
module Google
|
39
|
+
module Shopping
|
40
|
+
module Merchant
|
41
|
+
module Accounts
|
42
|
+
module V1beta
|
43
|
+
CustomerService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CustomerService").msgclass
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|