google-shopping-merchant-products-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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb +715 -0
  6. data/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb +66 -0
  8. data/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb +668 -0
  9. data/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb +268 -0
  10. data/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb +54 -0
  11. data/lib/google/shopping/merchant/products/v1/product_inputs_service.rb +57 -0
  12. data/lib/google/shopping/merchant/products/v1/productinputs_pb.rb +59 -0
  13. data/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb +69 -0
  14. data/lib/google/shopping/merchant/products/v1/products_common_pb.rb +91 -0
  15. data/lib/google/shopping/merchant/products/v1/products_pb.rb +56 -0
  16. data/lib/google/shopping/merchant/products/v1/products_service/client.rb +591 -0
  17. data/lib/google/shopping/merchant/products/v1/products_service/credentials.rb +49 -0
  18. data/lib/google/shopping/merchant/products/v1/products_service/paths.rb +66 -0
  19. data/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb +551 -0
  20. data/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb +205 -0
  21. data/lib/google/shopping/merchant/products/v1/products_service/rest.rb +54 -0
  22. data/lib/google/shopping/merchant/products/v1/products_service.rb +57 -0
  23. data/lib/google/shopping/merchant/products/v1/products_services_pb.rb +57 -0
  24. data/lib/google/shopping/merchant/products/v1/rest.rb +40 -0
  25. data/lib/google/shopping/merchant/products/v1/version.rb +7 -2
  26. data/lib/google/shopping/merchant/products/v1.rb +48 -0
  27. data/lib/google-shopping-merchant-products-v1.rb +21 -0
  28. data/proto_docs/README.md +4 -0
  29. data/proto_docs/google/api/client.rb +473 -0
  30. data/proto_docs/google/api/field_behavior.rb +85 -0
  31. data/proto_docs/google/api/launch_stage.rb +71 -0
  32. data/proto_docs/google/api/resource.rb +227 -0
  33. data/proto_docs/google/protobuf/duration.rb +98 -0
  34. data/proto_docs/google/protobuf/empty.rb +34 -0
  35. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  36. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  37. data/proto_docs/google/shopping/merchant/products/v1/productinputs.rb +221 -0
  38. data/proto_docs/google/shopping/merchant/products/v1/products.rb +175 -0
  39. data/proto_docs/google/shopping/merchant/products/v1/products_common.rb +1303 -0
  40. data/proto_docs/google/shopping/type/types.rb +210 -0
  41. data/proto_docs/google/type/interval.rb +45 -0
  42. metadata +100 -9
@@ -0,0 +1,205 @@
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/products/v1/products_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Products
25
+ module V1
26
+ module ProductsService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the ProductsService 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 get_product REST call
79
+ #
80
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest]
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::Products::V1::Product]
87
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
88
+ #
89
+ # @return [::Google::Shopping::Merchant::Products::V1::Product]
90
+ # A result object deserialized from the server's reply
91
+ def get_product 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_get_product_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: "get_product",
107
+ options: options
108
+ )
109
+ operation = ::Gapic::Rest::TransportOperation.new response
110
+ result = ::Google::Shopping::Merchant::Products::V1::Product.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 list_products REST call
119
+ #
120
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest]
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::Products::V1::ListProductsResponse]
127
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
128
+ #
129
+ # @return [::Google::Shopping::Merchant::Products::V1::ListProductsResponse]
130
+ # A result object deserialized from the server's reply
131
+ def list_products 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_list_products_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: "list_products",
147
+ options: options
148
+ )
149
+ operation = ::Gapic::Rest::TransportOperation.new response
150
+ result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.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
+ # @private
159
+ #
160
+ # GRPC transcoding helper method for the get_product REST call
161
+ #
162
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest]
163
+ # A request object representing the call parameters. Required.
164
+ # @return [Array(String, [String, nil], Hash{String => String})]
165
+ # Uri, Body, Query string parameters
166
+ def self.transcode_get_product_request request_pb
167
+ transcoder = Gapic::Rest::GrpcTranscoder.new
168
+ .with_bindings(
169
+ uri_method: :get,
170
+ uri_template: "/products/v1/{name}",
171
+ matches: [
172
+ ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
173
+ ]
174
+ )
175
+ transcoder.transcode request_pb
176
+ end
177
+
178
+ ##
179
+ # @private
180
+ #
181
+ # GRPC transcoding helper method for the list_products REST call
182
+ #
183
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @return [Array(String, [String, nil], Hash{String => String})]
186
+ # Uri, Body, Query string parameters
187
+ def self.transcode_list_products_request request_pb
188
+ transcoder = Gapic::Rest::GrpcTranscoder.new
189
+ .with_bindings(
190
+ uri_method: :get,
191
+ uri_template: "/products/v1/{parent}/products",
192
+ matches: [
193
+ ["parent", %r{^accounts/[^/]+/?$}, false]
194
+ ]
195
+ )
196
+ transcoder.transcode request_pb
197
+ end
198
+ end
199
+ end
200
+ end
201
+ end
202
+ end
203
+ end
204
+ end
205
+ 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/products/v1/version"
24
+
25
+ require "google/shopping/merchant/products/v1/products_service/credentials"
26
+ require "google/shopping/merchant/products/v1/products_service/paths"
27
+ require "google/shopping/merchant/products/v1/products_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Products
33
+ module V1
34
+ ##
35
+ # Service to use Product resource.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/products/v1/products_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new
41
+ #
42
+ module ProductsService
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/products/v1/products_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/products/v1/version"
24
+
25
+ require "google/shopping/merchant/products/v1/products_service/credentials"
26
+ require "google/shopping/merchant/products/v1/products_service/paths"
27
+ require "google/shopping/merchant/products/v1/products_service/client"
28
+ require "google/shopping/merchant/products/v1/products_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Products
34
+ module V1
35
+ ##
36
+ # Service to use Product resource.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/products/v1/products_service"
41
+ # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/products/v1/products_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new
47
+ #
48
+ module ProductsService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "products_service", "helpers.rb"
57
+ require "google/shopping/merchant/products/v1/products_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/products/v1/products.proto for package 'Google.Shopping.Merchant.Products.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/products/v1/products_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Products
26
+ module V1
27
+ module ProductsService
28
+ # Service to use Product resource.
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.products.v1.ProductsService'
36
+
37
+ # Retrieves the processed product from your Merchant Center account.
38
+ #
39
+ # After inserting, updating, or deleting a product input, it may take several
40
+ # minutes before the updated final product can be retrieved.
41
+ rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Google::Shopping::Merchant::Products::V1::Product
42
+ # Lists the processed products in your Merchant Center account. The response
43
+ # might contain fewer items than specified by `pageSize`. Rely on `pageToken`
44
+ # to determine if there are more items to be requested.
45
+ #
46
+ # After inserting, updating, or deleting a product input, it may take several
47
+ # minutes before the updated processed product can be retrieved.
48
+ rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1::ListProductsResponse
49
+ end
50
+
51
+ Stub = Service.rpc_stub_class
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,40 @@
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/products/v1/product_inputs_service/rest"
20
+ require "google/shopping/merchant/products/v1/products_service/rest"
21
+ require "google/shopping/merchant/products/v1/version"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Products
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/products/v1/rest"
33
+ # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new
34
+ #
35
+ module V1
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright 2025 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 Products
19
24
  module V1
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 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/products/v1/product_inputs_service"
20
+ require "google/shopping/merchant/products/v1/products_service"
21
+ require "google/shopping/merchant/products/v1/version"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Products
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/products/v1"
33
+ # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new
34
+ #
35
+ # @example Load this package, including all its services, and instantiate a REST client
36
+ #
37
+ # require "google/shopping/merchant/products/v1"
38
+ # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new
39
+ #
40
+ module V1
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
48
+ require "google/shopping/merchant/products/v1/_helpers" if ::File.file? helper_path
@@ -0,0 +1,21 @@
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
+ # 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/products/v1"
@@ -0,0 +1,4 @@
1
+ # Merchant V1 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.