google-shopping-merchant-inventories-v1beta 0.a → 0.1.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 +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb +634 -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 +584 -0
  9. data/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb +228 -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 +634 -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 +584 -0
  18. data/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb +228 -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 +381 -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 +212 -12
@@ -0,0 +1,228 @@
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/regionalinventory_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Inventories
25
+ module V1beta
26
+ module RegionalInventoryService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the RegionalInventoryService 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:, 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, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the list_regional_inventories REST call
46
+ #
47
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse]
57
+ # A result object deserialized from the server's reply
58
+ def list_regional_inventories request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # Baseline implementation for the insert_regional_inventory REST call
84
+ #
85
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest]
86
+ # A request object representing the call parameters. Required.
87
+ # @param options [::Gapic::CallOptions]
88
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
89
+ #
90
+ # @yield [result, operation] Access the result along with the TransportOperation object
91
+ # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory]
95
+ # A result object deserialized from the server's reply
96
+ def insert_regional_inventory request_pb, options = nil
97
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
98
+
99
+ verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb
100
+ query_string_params = if query_string_params.any?
101
+ query_string_params.to_h { |p| p.split "=", 2 }
102
+ else
103
+ {}
104
+ end
105
+
106
+ response = @client_stub.make_http_request(
107
+ verb,
108
+ uri: uri,
109
+ body: body || "",
110
+ params: query_string_params,
111
+ options: options
112
+ )
113
+ operation = ::Gapic::Rest::TransportOperation.new response
114
+ result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, operation if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # Baseline implementation for the delete_regional_inventory REST call
122
+ #
123
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @param options [::Gapic::CallOptions]
126
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
+ #
128
+ # @yield [result, operation] Access the result along with the TransportOperation object
129
+ # @yieldparam result [::Google::Protobuf::Empty]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Protobuf::Empty]
133
+ # A result object deserialized from the server's reply
134
+ def delete_regional_inventory request_pb, options = nil
135
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
136
+
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb
138
+ query_string_params = if query_string_params.any?
139
+ query_string_params.to_h { |p| p.split "=", 2 }
140
+ else
141
+ {}
142
+ end
143
+
144
+ response = @client_stub.make_http_request(
145
+ verb,
146
+ uri: uri,
147
+ body: body || "",
148
+ params: query_string_params,
149
+ options: options
150
+ )
151
+ operation = ::Gapic::Rest::TransportOperation.new response
152
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, operation if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # @private
160
+ #
161
+ # GRPC transcoding helper method for the list_regional_inventories REST call
162
+ #
163
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest]
164
+ # A request object representing the call parameters. Required.
165
+ # @return [Array(String, [String, nil], Hash{String => String})]
166
+ # Uri, Body, Query string parameters
167
+ def self.transcode_list_regional_inventories_request request_pb
168
+ transcoder = Gapic::Rest::GrpcTranscoder.new
169
+ .with_bindings(
170
+ uri_method: :get,
171
+ uri_template: "/inventories/v1beta/{parent}/regionalInventories",
172
+ matches: [
173
+ ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
174
+ ]
175
+ )
176
+ transcoder.transcode request_pb
177
+ end
178
+
179
+ ##
180
+ # @private
181
+ #
182
+ # GRPC transcoding helper method for the insert_regional_inventory REST call
183
+ #
184
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest]
185
+ # A request object representing the call parameters. Required.
186
+ # @return [Array(String, [String, nil], Hash{String => String})]
187
+ # Uri, Body, Query string parameters
188
+ def self.transcode_insert_regional_inventory_request request_pb
189
+ transcoder = Gapic::Rest::GrpcTranscoder.new
190
+ .with_bindings(
191
+ uri_method: :post,
192
+ uri_template: "/inventories/v1beta/{parent}/regionalInventories:insert",
193
+ body: "regional_inventory",
194
+ matches: [
195
+ ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
196
+ ]
197
+ )
198
+ transcoder.transcode request_pb
199
+ end
200
+
201
+ ##
202
+ # @private
203
+ #
204
+ # GRPC transcoding helper method for the delete_regional_inventory REST call
205
+ #
206
+ # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest]
207
+ # A request object representing the call parameters. Required.
208
+ # @return [Array(String, [String, nil], Hash{String => String})]
209
+ # Uri, Body, Query string parameters
210
+ def self.transcode_delete_regional_inventory_request request_pb
211
+ transcoder = Gapic::Rest::GrpcTranscoder.new
212
+ .with_bindings(
213
+ uri_method: :delete,
214
+ uri_template: "/inventories/v1beta/{name}",
215
+ matches: [
216
+ ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false]
217
+ ]
218
+ )
219
+ transcoder.transcode request_pb
220
+ end
221
+ end
222
+ end
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
@@ -0,0 +1,55 @@
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/regional_inventory_service/credentials"
26
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths"
27
+ require "google/shopping/merchant/inventories/v1beta/regional_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 regional inventory for products. There is also separate
36
+ # `regions` resource and API to manage regions definitions.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest"
41
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new
42
+ #
43
+ module RegionalInventoryService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
55
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,58 @@
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/regional_inventory_service/credentials"
26
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths"
27
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/client"
28
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Inventories
34
+ module V1beta
35
+ ##
36
+ # Service to manage regional inventory for products. There is also separate
37
+ # `regions` resource and API to manage regions definitions.
38
+ #
39
+ # @example Load this service and instantiate a gRPC client
40
+ #
41
+ # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service"
42
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new
43
+ #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest"
47
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new
48
+ #
49
+ module RegionalInventoryService
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ helper_path = ::File.join __dir__, "regional_inventory_service", "helpers.rb"
58
+ require "google/shopping/merchant/inventories/v1beta/regional_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/regionalinventory.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 = "\nCgoogle/shopping/merchant/inventories/v1beta/regionalinventory.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\"\xcd\x03\n\x11RegionalInventory\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\x13\n\x06region\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@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}B\x0f\n\r_availability\"\\\n\x1eListRegionalInventoriesRequest\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\"\x98\x01\n\x1fListRegionalInventoriesResponse\x12\\\n\x14regional_inventories\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x96\x01\n\x1eInsertRegionalInventoryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12_\n\x12regional_inventory\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xdf\x06\n\x18RegionalInventoryService\x12\x8d\x02\n\x17ListRegionalInventories\x12K.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest\x1aL.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse\"W\x82\xd3\xe4\x93\x02H\x12\x46/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories\xda\x41\x06parent\x12\x91\x02\n\x17InsertRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest\x1a>.google.shopping.merchant.inventories.v1beta.RegionalInventory\"i\x82\xd3\xe4\x93\x02\x63\"M/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xd5\x01\n\x17\x44\x65leteRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"U\x82\xd3\xe4\x93\x02H*F/inventories/v1beta/{name=accounts/*/products/*/regionalInventories/*}\xda\x41\x04name\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa4\x01\n/com.google.shopping.merchant.inventories.v1betaB\x16RegionalInventoryProtoP\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
+ RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.RegionalInventory").msgclass
50
+ ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest").msgclass
51
+ ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse").msgclass
52
+ InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest").msgclass
53
+ DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest").msgclass
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,69 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/inventories/v1beta/regionalinventory.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/regionalinventory_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Inventories
26
+ module V1beta
27
+ module RegionalInventoryService
28
+ # Service to manage regional inventory for products. There is also separate
29
+ # `regions` resource and API to manage regions definitions.
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.inventories.v1beta.RegionalInventoryService'
37
+
38
+ # Lists the `RegionalInventory` resources for the given product in your
39
+ # merchant account. The response might contain fewer items than specified by
40
+ # `pageSize`. If `pageToken` was returned in previous request, it can be
41
+ # used to obtain additional results.
42
+ #
43
+ # `RegionalInventory` resources are listed per product for a given account.
44
+ rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse
45
+ # Inserts a `RegionalInventory` to a given product in your
46
+ # merchant account.
47
+ #
48
+ # Replaces the full `RegionalInventory` resource if an entry with the same
49
+ # [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region]
50
+ # already exists for the product.
51
+ #
52
+ # It might take up to 30 minutes for the new or updated `RegionalInventory`
53
+ # resource to appear in products.
54
+ rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory
55
+ # Deletes the specified `RegionalInventory` resource from the given product
56
+ # in your merchant account. It might take up to an hour for the
57
+ # `RegionalInventory` to be deleted from the specific product.
58
+ # Once you have received a successful delete response, wait for that
59
+ # period before attempting a delete again.
60
+ rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty
61
+ end
62
+
63
+ Stub = Service.rpc_stub_class
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,40 @@
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/local_inventory_service/rest"
20
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest"
21
+ require "google/shopping/merchant/inventories/v1beta/version"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Inventories
27
+ ##
28
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
29
+ #
30
+ # @example
31
+ #
32
+ # require "google/shopping/merchant/inventories/v1beta/rest"
33
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new
34
+ #
35
+ module V1beta
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright 2023 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
5
7
  # You may obtain a copy of the License at
6
8
  #
7
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # https://www.apache.org/licenses/LICENSE-2.0
8
10
  #
9
11
  # Unless required by applicable law or agreed to in writing, software
10
12
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,12 +14,15 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
15
20
  module Google
16
21
  module Shopping
17
22
  module Merchant
18
23
  module Inventories
19
24
  module V1beta
20
- VERSION = "0.a"
25
+ VERSION = "0.1.0"
21
26
  end
22
27
  end
23
28
  end
@@ -0,0 +1,48 @@
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/local_inventory_service"
20
+ require "google/shopping/merchant/inventories/v1beta/regional_inventory_service"
21
+ require "google/shopping/merchant/inventories/v1beta/version"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Inventories
27
+ ##
28
+ # API client module.
29
+ #
30
+ # @example Load this package, including all its services, and instantiate a gRPC client
31
+ #
32
+ # require "google/shopping/merchant/inventories/v1beta"
33
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new
34
+ #
35
+ # @example Load this package, including all its services, and instantiate a REST client
36
+ #
37
+ # require "google/shopping/merchant/inventories/v1beta"
38
+ # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new
39
+ #
40
+ module V1beta
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ helper_path = ::File.join __dir__, "v1beta", "_helpers.rb"
48
+ require "google/shopping/merchant/inventories/v1beta/_helpers" if ::File.file? helper_path
@@ -0,0 +1,21 @@
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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/shopping/merchant/inventories/v1beta"
@@ -0,0 +1,4 @@
1
+ # Merchant V1BETA Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.