google-shopping-merchant-inventories-v1 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb +55 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb +694 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb +71 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb +647 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb +267 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb +57 -0
- data/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb +56 -0
- data/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb +68 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb +694 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb +71 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb +647 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb +267 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb +58 -0
- data/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb +56 -0
- data/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb +69 -0
- data/lib/google/shopping/merchant/inventories/v1/rest.rb +40 -0
- data/lib/google/shopping/merchant/inventories/v1/version.rb +7 -2
- data/lib/google/shopping/merchant/inventories/v1.rb +48 -0
- data/lib/google-shopping-merchant-inventories-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/timestamp.rb +127 -0
- data/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb +182 -0
- data/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb +124 -0
- data/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb +123 -0
- data/proto_docs/google/shopping/type/types.rb +210 -0
- data/proto_docs/google/type/interval.rb +45 -0
- metadata +99 -9
@@ -0,0 +1,267 @@
|
|
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/shopping/merchant/inventories/v1/localinventory_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Shopping
|
23
|
+
module Merchant
|
24
|
+
module Inventories
|
25
|
+
module V1
|
26
|
+
module LocalInventoryService
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the LocalInventoryService service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
# @private
|
35
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
36
|
+
# These require statements are intentionally placed here to initialize
|
37
|
+
# the REST modules only when it's required.
|
38
|
+
require "gapic/rest"
|
39
|
+
|
40
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
41
|
+
endpoint_template: endpoint_template,
|
42
|
+
universe_domain: universe_domain,
|
43
|
+
credentials: credentials,
|
44
|
+
numeric_enums: true,
|
45
|
+
service_name: self.class,
|
46
|
+
raise_faraday_errors: false,
|
47
|
+
logger: logger
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# The effective universe domain
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
#
|
55
|
+
def universe_domain
|
56
|
+
@client_stub.universe_domain
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# The effective endpoint
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
#
|
64
|
+
def endpoint
|
65
|
+
@client_stub.endpoint
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# The logger used for request/response debug logging.
|
70
|
+
#
|
71
|
+
# @return [Logger]
|
72
|
+
#
|
73
|
+
def logger stub: false
|
74
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Baseline implementation for the list_local_inventories REST call
|
79
|
+
#
|
80
|
+
# @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest]
|
81
|
+
# A request object representing the call parameters. Required.
|
82
|
+
# @param options [::Gapic::CallOptions]
|
83
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
84
|
+
#
|
85
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
86
|
+
# @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse]
|
87
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
88
|
+
#
|
89
|
+
# @return [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse]
|
90
|
+
# A result object deserialized from the server's reply
|
91
|
+
def list_local_inventories request_pb, options = nil
|
92
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
93
|
+
|
94
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb
|
95
|
+
query_string_params = if query_string_params.any?
|
96
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
97
|
+
else
|
98
|
+
{}
|
99
|
+
end
|
100
|
+
|
101
|
+
response = @client_stub.make_http_request(
|
102
|
+
verb,
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "list_local_inventories",
|
107
|
+
options: options
|
108
|
+
)
|
109
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
110
|
+
result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Baseline implementation for the insert_local_inventory REST call
|
119
|
+
#
|
120
|
+
# @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest]
|
121
|
+
# A request object representing the call parameters. Required.
|
122
|
+
# @param options [::Gapic::CallOptions]
|
123
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
124
|
+
#
|
125
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
126
|
+
# @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::LocalInventory]
|
127
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
128
|
+
#
|
129
|
+
# @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory]
|
130
|
+
# A result object deserialized from the server's reply
|
131
|
+
def insert_local_inventory request_pb, options = nil
|
132
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
133
|
+
|
134
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb
|
135
|
+
query_string_params = if query_string_params.any?
|
136
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
137
|
+
else
|
138
|
+
{}
|
139
|
+
end
|
140
|
+
|
141
|
+
response = @client_stub.make_http_request(
|
142
|
+
verb,
|
143
|
+
uri: uri,
|
144
|
+
body: body || "",
|
145
|
+
params: query_string_params,
|
146
|
+
method_name: "insert_local_inventory",
|
147
|
+
options: options
|
148
|
+
)
|
149
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
150
|
+
result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.decode_json response.body, ignore_unknown_fields: true
|
151
|
+
catch :response do
|
152
|
+
yield result, operation if block_given?
|
153
|
+
result
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Baseline implementation for the delete_local_inventory REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Protobuf::Empty]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def delete_local_inventory request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
method_name: "delete_local_inventory",
|
187
|
+
options: options
|
188
|
+
)
|
189
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
190
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
191
|
+
catch :response do
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# @private
|
199
|
+
#
|
200
|
+
# GRPC transcoding helper method for the list_local_inventories REST call
|
201
|
+
#
|
202
|
+
# @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest]
|
203
|
+
# A request object representing the call parameters. Required.
|
204
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
205
|
+
# Uri, Body, Query string parameters
|
206
|
+
def self.transcode_list_local_inventories_request request_pb
|
207
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
208
|
+
.with_bindings(
|
209
|
+
uri_method: :get,
|
210
|
+
uri_template: "/inventories/v1/{parent}/localInventories",
|
211
|
+
matches: [
|
212
|
+
["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
|
213
|
+
]
|
214
|
+
)
|
215
|
+
transcoder.transcode request_pb
|
216
|
+
end
|
217
|
+
|
218
|
+
##
|
219
|
+
# @private
|
220
|
+
#
|
221
|
+
# GRPC transcoding helper method for the insert_local_inventory REST call
|
222
|
+
#
|
223
|
+
# @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest]
|
224
|
+
# A request object representing the call parameters. Required.
|
225
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
226
|
+
# Uri, Body, Query string parameters
|
227
|
+
def self.transcode_insert_local_inventory_request request_pb
|
228
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
229
|
+
.with_bindings(
|
230
|
+
uri_method: :post,
|
231
|
+
uri_template: "/inventories/v1/{parent}/localInventories:insert",
|
232
|
+
body: "local_inventory",
|
233
|
+
matches: [
|
234
|
+
["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
|
235
|
+
]
|
236
|
+
)
|
237
|
+
transcoder.transcode request_pb
|
238
|
+
end
|
239
|
+
|
240
|
+
##
|
241
|
+
# @private
|
242
|
+
#
|
243
|
+
# GRPC transcoding helper method for the delete_local_inventory REST call
|
244
|
+
#
|
245
|
+
# @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest]
|
246
|
+
# A request object representing the call parameters. Required.
|
247
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
248
|
+
# Uri, Body, Query string parameters
|
249
|
+
def self.transcode_delete_local_inventory_request request_pb
|
250
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
251
|
+
.with_bindings(
|
252
|
+
uri_method: :delete,
|
253
|
+
uri_template: "/inventories/v1/{name}",
|
254
|
+
matches: [
|
255
|
+
["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false]
|
256
|
+
]
|
257
|
+
)
|
258
|
+
transcoder.transcode request_pb
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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 "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/shopping/merchant/inventories/v1/version"
|
24
|
+
|
25
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials"
|
26
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/paths"
|
27
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Shopping
|
31
|
+
module Merchant
|
32
|
+
module Inventories
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Service to manage local inventory for products
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/shopping/merchant/inventories/v1/local_inventory_service/rest"
|
40
|
+
# client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new
|
41
|
+
#
|
42
|
+
module LocalInventoryService
|
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/inventories/v1/local_inventory_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,57 @@
|
|
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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/shopping/merchant/inventories/v1/version"
|
24
|
+
|
25
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials"
|
26
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/paths"
|
27
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/client"
|
28
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Shopping
|
32
|
+
module Merchant
|
33
|
+
module Inventories
|
34
|
+
module V1
|
35
|
+
##
|
36
|
+
# Service to manage local inventory for products
|
37
|
+
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
39
|
+
#
|
40
|
+
# require "google/shopping/merchant/inventories/v1/local_inventory_service"
|
41
|
+
# client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new
|
42
|
+
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/shopping/merchant/inventories/v1/local_inventory_service/rest"
|
46
|
+
# client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new
|
47
|
+
#
|
48
|
+
module LocalInventoryService
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb"
|
57
|
+
require "google/shopping/merchant/inventories/v1/local_inventory_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/inventories/v1/localinventory.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/empty_pb'
|
12
|
+
require 'google/shopping/merchant/inventories/v1/inventories_common_pb'
|
13
|
+
|
14
|
+
|
15
|
+
descriptor_data = "\n<google/shopping/merchant/inventories/v1/localinventory.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a@google/shopping/merchant/inventories/v1/inventories_common.proto\"\xb6\x02\n\x0eLocalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12j\n\x1alocal_inventory_attributes\x18\x0e \x01(\x0b\x32\x41.google.shopping.merchant.inventories.v1.LocalInventoryAttributesB\x03\xe0\x41\x01:s\xea\x41p\n)merchantapi.googleapis.com/LocalInventory\x12\x43\x61\x63\x63ounts/{account}/products/{product}/localInventories/{store_code}\"\x87\x01\n\x1bListLocalInventoriesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8b\x01\n\x1cListLocalInventoriesResponse\x12R\n\x11local_inventories\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.inventories.v1.LocalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb7\x01\n\x1bInsertLocalInventoryRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12U\n\x0flocal_inventory\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.inventories.v1.LocalInventoryB\x03\xe0\x41\x02\"^\n\x1b\x44\x65leteLocalInventoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/LocalInventory2\x98\x06\n\x15LocalInventoryService\x12\xf5\x01\n\x14ListLocalInventories\x12\x44.google.shopping.merchant.inventories.v1.ListLocalInventoriesRequest\x1a\x45.google.shopping.merchant.inventories.v1.ListLocalInventoriesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/inventories/v1/{parent=accounts/*/products/*}/localInventories\x12\xf6\x01\n\x14InsertLocalInventory\x12\x44.google.shopping.merchant.inventories.v1.InsertLocalInventoryRequest\x1a\x37.google.shopping.merchant.inventories.v1.LocalInventory\"_\x82\xd3\xe4\x93\x02Y\"F/inventories/v1/{parent=accounts/*/products/*}/localInventories:insert:\x0flocal_inventory\x12\xc4\x01\n\x14\x44\x65leteLocalInventory\x12\x44.google.shopping.merchant.inventories.v1.DeleteLocalInventoryRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/inventories/v1/{name=accounts/*/products/*/localInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe9\x02\n+com.google.shopping.merchant.inventories.v1B\x13LocalInventoryProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3"
|
16
|
+
|
17
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
18
|
+
|
19
|
+
begin
|
20
|
+
pool.add_serialized_file(descriptor_data)
|
21
|
+
rescue TypeError
|
22
|
+
# Compatibility code: will be removed in the next major version.
|
23
|
+
require 'google/protobuf/descriptor_pb'
|
24
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
25
|
+
parsed.clear_dependency
|
26
|
+
serialized = parsed.class.encode(parsed)
|
27
|
+
file = pool.add_serialized_file(serialized)
|
28
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
29
|
+
imports = [
|
30
|
+
["google.shopping.merchant.inventories.v1.LocalInventoryAttributes", "google/shopping/merchant/inventories/v1/inventories_common.proto"],
|
31
|
+
]
|
32
|
+
imports.each do |type_name, expected_filename|
|
33
|
+
import_file = pool.lookup(type_name).file_descriptor
|
34
|
+
if import_file.name != expected_filename
|
35
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
39
|
+
warn "This will become an error in the next major version."
|
40
|
+
end
|
41
|
+
|
42
|
+
module Google
|
43
|
+
module Shopping
|
44
|
+
module Merchant
|
45
|
+
module Inventories
|
46
|
+
module V1
|
47
|
+
LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventory").msgclass
|
48
|
+
ListLocalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListLocalInventoriesRequest").msgclass
|
49
|
+
ListLocalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListLocalInventoriesResponse").msgclass
|
50
|
+
InsertLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.InsertLocalInventoryRequest").msgclass
|
51
|
+
DeleteLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.DeleteLocalInventoryRequest").msgclass
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/shopping/merchant/inventories/v1/localinventory.proto for package 'Google.Shopping.Merchant.Inventories.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2025 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/inventories/v1/localinventory_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Shopping
|
24
|
+
module Merchant
|
25
|
+
module Inventories
|
26
|
+
module V1
|
27
|
+
module LocalInventoryService
|
28
|
+
# Service to manage local inventory for products
|
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.inventories.v1.LocalInventoryService'
|
36
|
+
|
37
|
+
# Lists the `LocalInventory` resources for the given product in your merchant
|
38
|
+
# account. The response might contain fewer items than specified by
|
39
|
+
# `pageSize`. If `pageToken` was returned in previous request, it can be used
|
40
|
+
# to obtain additional results.
|
41
|
+
#
|
42
|
+
# `LocalInventory` resources are listed per product for a given account.
|
43
|
+
rpc :ListLocalInventories, ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse
|
44
|
+
# Inserts a `LocalInventory` resource to a product in your merchant
|
45
|
+
# account.
|
46
|
+
#
|
47
|
+
# Replaces the full `LocalInventory` resource if an entry with the same
|
48
|
+
# [`storeCode`][google.shopping.merchant.inventories.v1.LocalInventory.store_code]
|
49
|
+
# already exists for the product.
|
50
|
+
#
|
51
|
+
# It might take up to 30 minutes for the new or updated `LocalInventory`
|
52
|
+
# resource to appear in products.
|
53
|
+
rpc :InsertLocalInventory, ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1::LocalInventory
|
54
|
+
# Deletes the specified `LocalInventory` from the given product in your
|
55
|
+
# merchant account. It might take a up to an hour for the
|
56
|
+
# `LocalInventory` to be deleted from the specific product.
|
57
|
+
# Once you have received a successful delete response, wait for that
|
58
|
+
# period before attempting a delete again.
|
59
|
+
rpc :DeleteLocalInventory, ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::Google::Protobuf::Empty
|
60
|
+
end
|
61
|
+
|
62
|
+
Stub = Service.rpc_stub_class
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|