google-shopping-merchant-inventories-v1beta 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb +657 -0
  6. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb +54 -0
  8. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb +610 -0
  9. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb +240 -0
  10. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb +54 -0
  11. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb +57 -0
  12. data/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb +58 -0
  13. data/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb +68 -0
  14. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb +657 -0
  15. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb +49 -0
  16. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb +54 -0
  17. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb +610 -0
  18. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb +240 -0
  19. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb +55 -0
  20. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb +58 -0
  21. data/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb +58 -0
  22. data/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb +69 -0
  23. data/lib/google/shopping/merchant/inventories/v1beta/rest.rb +40 -0
  24. data/lib/google/shopping/merchant/inventories/v1beta/version.rb +7 -2
  25. data/lib/google/shopping/merchant/inventories/v1beta.rb +48 -0
  26. data/lib/google-shopping-merchant-inventories-v1beta.rb +21 -0
  27. data/proto_docs/README.md +4 -0
  28. data/proto_docs/google/api/client.rb +395 -0
  29. data/proto_docs/google/api/field_behavior.rb +85 -0
  30. data/proto_docs/google/api/launch_stage.rb +71 -0
  31. data/proto_docs/google/api/resource.rb +222 -0
  32. data/proto_docs/google/protobuf/duration.rb +98 -0
  33. data/proto_docs/google/protobuf/empty.rb +34 -0
  34. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  35. data/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb +163 -0
  36. data/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb +142 -0
  37. data/proto_docs/google/shopping/type/types.rb +175 -0
  38. data/proto_docs/google/type/interval.rb +45 -0
  39. metadata +213 -13
@@ -0,0 +1,240 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/v1beta/localinventory_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Inventories
25
+ module V1beta
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
+ 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
+ # Baseline implementation for the list_local_inventories REST call
58
+ #
59
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest]
60
+ # A request object representing the call parameters. Required.
61
+ # @param options [::Gapic::CallOptions]
62
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
63
+ #
64
+ # @yield [result, operation] Access the result along with the TransportOperation object
65
+ # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse]
66
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
67
+ #
68
+ # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse]
69
+ # A result object deserialized from the server's reply
70
+ def list_local_inventories request_pb, options = nil
71
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
72
+
73
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb
74
+ query_string_params = if query_string_params.any?
75
+ query_string_params.to_h { |p| p.split "=", 2 }
76
+ else
77
+ {}
78
+ end
79
+
80
+ response = @client_stub.make_http_request(
81
+ verb,
82
+ uri: uri,
83
+ body: body || "",
84
+ params: query_string_params,
85
+ options: options
86
+ )
87
+ operation = ::Gapic::Rest::TransportOperation.new response
88
+ result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true
89
+
90
+ yield result, operation if block_given?
91
+ result
92
+ end
93
+
94
+ ##
95
+ # Baseline implementation for the insert_local_inventory REST call
96
+ #
97
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest]
98
+ # A request object representing the call parameters. Required.
99
+ # @param options [::Gapic::CallOptions]
100
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
101
+ #
102
+ # @yield [result, operation] Access the result along with the TransportOperation object
103
+ # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory]
104
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
105
+ #
106
+ # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory]
107
+ # A result object deserialized from the server's reply
108
+ def insert_local_inventory request_pb, options = nil
109
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
110
+
111
+ verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb
112
+ query_string_params = if query_string_params.any?
113
+ query_string_params.to_h { |p| p.split "=", 2 }
114
+ else
115
+ {}
116
+ end
117
+
118
+ response = @client_stub.make_http_request(
119
+ verb,
120
+ uri: uri,
121
+ body: body || "",
122
+ params: query_string_params,
123
+ options: options
124
+ )
125
+ operation = ::Gapic::Rest::TransportOperation.new response
126
+ result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.decode_json response.body, ignore_unknown_fields: true
127
+
128
+ yield result, operation if block_given?
129
+ result
130
+ end
131
+
132
+ ##
133
+ # Baseline implementation for the delete_local_inventory REST call
134
+ #
135
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest]
136
+ # A request object representing the call parameters. Required.
137
+ # @param options [::Gapic::CallOptions]
138
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
139
+ #
140
+ # @yield [result, operation] Access the result along with the TransportOperation object
141
+ # @yieldparam result [::Google::Protobuf::Empty]
142
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
143
+ #
144
+ # @return [::Google::Protobuf::Empty]
145
+ # A result object deserialized from the server's reply
146
+ def delete_local_inventory request_pb, options = nil
147
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
148
+
149
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb
150
+ query_string_params = if query_string_params.any?
151
+ query_string_params.to_h { |p| p.split "=", 2 }
152
+ else
153
+ {}
154
+ end
155
+
156
+ response = @client_stub.make_http_request(
157
+ verb,
158
+ uri: uri,
159
+ body: body || "",
160
+ params: query_string_params,
161
+ options: options
162
+ )
163
+ operation = ::Gapic::Rest::TransportOperation.new response
164
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
165
+
166
+ yield result, operation if block_given?
167
+ result
168
+ end
169
+
170
+ ##
171
+ # @private
172
+ #
173
+ # GRPC transcoding helper method for the list_local_inventories REST call
174
+ #
175
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest]
176
+ # A request object representing the call parameters. Required.
177
+ # @return [Array(String, [String, nil], Hash{String => String})]
178
+ # Uri, Body, Query string parameters
179
+ def self.transcode_list_local_inventories_request request_pb
180
+ transcoder = Gapic::Rest::GrpcTranscoder.new
181
+ .with_bindings(
182
+ uri_method: :get,
183
+ uri_template: "/inventories/v1beta/{parent}/localInventories",
184
+ matches: [
185
+ ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
186
+ ]
187
+ )
188
+ transcoder.transcode request_pb
189
+ end
190
+
191
+ ##
192
+ # @private
193
+ #
194
+ # GRPC transcoding helper method for the insert_local_inventory REST call
195
+ #
196
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest]
197
+ # A request object representing the call parameters. Required.
198
+ # @return [Array(String, [String, nil], Hash{String => String})]
199
+ # Uri, Body, Query string parameters
200
+ def self.transcode_insert_local_inventory_request request_pb
201
+ transcoder = Gapic::Rest::GrpcTranscoder.new
202
+ .with_bindings(
203
+ uri_method: :post,
204
+ uri_template: "/inventories/v1beta/{parent}/localInventories:insert",
205
+ body: "local_inventory",
206
+ matches: [
207
+ ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
208
+ ]
209
+ )
210
+ transcoder.transcode request_pb
211
+ end
212
+
213
+ ##
214
+ # @private
215
+ #
216
+ # GRPC transcoding helper method for the delete_local_inventory REST call
217
+ #
218
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest]
219
+ # A request object representing the call parameters. Required.
220
+ # @return [Array(String, [String, nil], Hash{String => String})]
221
+ # Uri, Body, Query string parameters
222
+ def self.transcode_delete_local_inventory_request request_pb
223
+ transcoder = Gapic::Rest::GrpcTranscoder.new
224
+ .with_bindings(
225
+ uri_method: :delete,
226
+ uri_template: "/inventories/v1beta/{name}",
227
+ matches: [
228
+ ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false]
229
+ ]
230
+ )
231
+ transcoder.transcode request_pb
232
+ end
233
+ end
234
+ end
235
+ end
236
+ end
237
+ end
238
+ end
239
+ end
240
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/v1beta/version"
24
+
25
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials"
26
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths"
27
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Inventories
33
+ module V1beta
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/v1beta/local_inventory_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::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/v1beta/local_inventory_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/v1beta/version"
24
+
25
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials"
26
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths"
27
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/client"
28
+ require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Inventories
34
+ module V1beta
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/v1beta/local_inventory_service"
41
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::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/v1beta/local_inventory_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/shopping/merchant/inventories/v1beta/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/type/types_pb'
13
+ require 'google/type/interval_pb'
14
+
15
+
16
+ descriptor_data = "\n@google/shopping/merchant/inventories/v1beta/localinventory.proto\x12+google.shopping.merchant.inventories.v1beta\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/type/types.proto\x1a\x1agoogle/type/interval.proto\"\x8a\x05\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\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08quantity\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rpickup_method\x18\t \x01(\tH\x02\x88\x01\x01\x12\x17\n\npickup_sla\x18\n \x01(\tH\x03\x88\x01\x01\x12%\n\x18instore_product_location\x18\x0b \x01(\tH\x04\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x0c \x03(\x0b\x32%.google.shopping.type.CustomAttribute:s\xea\x41p\n)merchantapi.googleapis.com/LocalInventory\x12\x43\x61\x63\x63ounts/{account}/products/{product}/localInventories/{store_code}B\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"Y\n\x1bListLocalInventoriesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1cListLocalInventoriesResponse\x12V\n\x11local_inventories\x18\x01 \x03(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x1bInsertLocalInventoryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x0flocal_inventory\x18\x02 \x01(\x0b\x32;.google.shopping.merchant.inventories.v1beta.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\xb8\x06\n\x15LocalInventoryService\x12\x81\x02\n\x14ListLocalInventories\x12H.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest\x1aI.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse\"T\x82\xd3\xe4\x93\x02\x45\x12\x43/inventories/v1beta/{parent=accounts/*/products/*}/localInventories\xda\x41\x06parent\x12\x82\x02\n\x14InsertLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest\x1a;.google.shopping.merchant.inventories.v1beta.LocalInventory\"c\x82\xd3\xe4\x93\x02]\"J/inventories/v1beta/{parent=accounts/*/products/*}/localInventories:insert:\x0flocal_inventory\x12\xcc\x01\n\x14\x44\x65leteLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest\x1a\x16.google.protobuf.Empty\"R\x82\xd3\xe4\x93\x02\x45*C/inventories/v1beta/{name=accounts/*/products/*/localInventories/*}\xda\x41\x04name\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa1\x01\n/com.google.shopping.merchant.inventories.v1betaB\x13LocalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespbb\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError => e
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.shopping.type.Price", "google/shopping/type/types.proto"],
32
+ ["google.type.Interval", "google/type/interval.proto"],
33
+ ]
34
+ imports.each do |type_name, expected_filename|
35
+ import_file = pool.lookup(type_name).file_descriptor
36
+ if import_file.name != expected_filename
37
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
38
+ end
39
+ end
40
+ warn "Each proto file must use a consistent fully-qualified name."
41
+ warn "This will become an error in the next major version."
42
+ end
43
+
44
+ module Google
45
+ module Shopping
46
+ module Merchant
47
+ module Inventories
48
+ module V1beta
49
+ LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.LocalInventory").msgclass
50
+ ListLocalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest").msgclass
51
+ ListLocalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse").msgclass
52
+ InsertLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest").msgclass
53
+ DeleteLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest").msgclass
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,68 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/inventories/v1beta/localinventory.proto for package 'google.shopping.merchant.inventories.v1beta'
3
+ # Original file comments:
4
+ # Copyright 2023 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/v1beta/localinventory_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Inventories
26
+ module V1beta
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.v1beta.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::V1beta::ListLocalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::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.v1beta.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::V1beta::InsertLocalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::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::V1beta::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