google-cloud-commerce-consumer-procurement-v1 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +3 -3
  4. data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/client.rb +224 -1
  5. data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/client.rb +210 -1
  6. data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/service_stub.rb +120 -0
  7. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/client.rb +825 -0
  8. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/credentials.rb +51 -0
  9. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/paths.rb +54 -0
  10. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/client.rb +764 -0
  11. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb +371 -0
  12. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest.rb +56 -0
  13. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service.rb +59 -0
  14. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_pb.rb +69 -0
  15. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_services_pb.rb +57 -0
  16. data/lib/google/cloud/commerce/consumer/procurement/v1/procurement_service_pb.rb +8 -1
  17. data/lib/google/cloud/commerce/consumer/procurement/v1/procurement_service_services_pb.rb +7 -0
  18. data/lib/google/cloud/commerce/consumer/procurement/v1/rest.rb +2 -1
  19. data/lib/google/cloud/commerce/consumer/procurement/v1/version.rb +1 -1
  20. data/lib/google/cloud/commerce/consumer/procurement/v1.rb +3 -2
  21. data/proto_docs/google/cloud/commerce/consumer/procurement/v1/license_management_service.rb +196 -0
  22. data/proto_docs/google/cloud/commerce/consumer/procurement/v1/order.rb +14 -10
  23. data/proto_docs/google/cloud/commerce/consumer/procurement/v1/procurement_service.rb +115 -1
  24. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  25. metadata +14 -3
@@ -177,6 +177,82 @@ module Google
177
177
  result
178
178
  end
179
179
 
180
+ ##
181
+ # Baseline implementation for the modify_order REST call
182
+ #
183
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::ModifyOrderRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @param options [::Gapic::CallOptions]
186
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
187
+ #
188
+ # @yield [result, operation] Access the result along with the TransportOperation object
189
+ # @yieldparam result [::Google::Longrunning::Operation]
190
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
191
+ #
192
+ # @return [::Google::Longrunning::Operation]
193
+ # A result object deserialized from the server's reply
194
+ def modify_order request_pb, options = nil
195
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
196
+
197
+ verb, uri, query_string_params, body = ServiceStub.transcode_modify_order_request request_pb
198
+ query_string_params = if query_string_params.any?
199
+ query_string_params.to_h { |p| p.split "=", 2 }
200
+ else
201
+ {}
202
+ end
203
+
204
+ response = @client_stub.make_http_request(
205
+ verb,
206
+ uri: uri,
207
+ body: body || "",
208
+ params: query_string_params,
209
+ options: options
210
+ )
211
+ operation = ::Gapic::Rest::TransportOperation.new response
212
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
213
+
214
+ yield result, operation if block_given?
215
+ result
216
+ end
217
+
218
+ ##
219
+ # Baseline implementation for the cancel_order REST call
220
+ #
221
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::CancelOrderRequest]
222
+ # A request object representing the call parameters. Required.
223
+ # @param options [::Gapic::CallOptions]
224
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
225
+ #
226
+ # @yield [result, operation] Access the result along with the TransportOperation object
227
+ # @yieldparam result [::Google::Longrunning::Operation]
228
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
229
+ #
230
+ # @return [::Google::Longrunning::Operation]
231
+ # A result object deserialized from the server's reply
232
+ def cancel_order request_pb, options = nil
233
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
234
+
235
+ verb, uri, query_string_params, body = ServiceStub.transcode_cancel_order_request request_pb
236
+ query_string_params = if query_string_params.any?
237
+ query_string_params.to_h { |p| p.split "=", 2 }
238
+ else
239
+ {}
240
+ end
241
+
242
+ response = @client_stub.make_http_request(
243
+ verb,
244
+ uri: uri,
245
+ body: body || "",
246
+ params: query_string_params,
247
+ options: options
248
+ )
249
+ operation = ::Gapic::Rest::TransportOperation.new response
250
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
251
+
252
+ yield result, operation if block_given?
253
+ result
254
+ end
255
+
180
256
  ##
181
257
  # @private
182
258
  #
@@ -240,6 +316,50 @@ module Google
240
316
  )
241
317
  transcoder.transcode request_pb
242
318
  end
319
+
320
+ ##
321
+ # @private
322
+ #
323
+ # GRPC transcoding helper method for the modify_order REST call
324
+ #
325
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::ModifyOrderRequest]
326
+ # A request object representing the call parameters. Required.
327
+ # @return [Array(String, [String, nil], Hash{String => String})]
328
+ # Uri, Body, Query string parameters
329
+ def self.transcode_modify_order_request request_pb
330
+ transcoder = Gapic::Rest::GrpcTranscoder.new
331
+ .with_bindings(
332
+ uri_method: :post,
333
+ uri_template: "/v1/{name}:modify",
334
+ body: "*",
335
+ matches: [
336
+ ["name", %r{^billingAccounts/[^/]+/orders/[^/]+/?$}, false]
337
+ ]
338
+ )
339
+ transcoder.transcode request_pb
340
+ end
341
+
342
+ ##
343
+ # @private
344
+ #
345
+ # GRPC transcoding helper method for the cancel_order REST call
346
+ #
347
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::CancelOrderRequest]
348
+ # A request object representing the call parameters. Required.
349
+ # @return [Array(String, [String, nil], Hash{String => String})]
350
+ # Uri, Body, Query string parameters
351
+ def self.transcode_cancel_order_request request_pb
352
+ transcoder = Gapic::Rest::GrpcTranscoder.new
353
+ .with_bindings(
354
+ uri_method: :post,
355
+ uri_template: "/v1/{name}:cancel",
356
+ body: "*",
357
+ matches: [
358
+ ["name", %r{^billingAccounts/[^/]+/orders/[^/]+/?$}, false]
359
+ ]
360
+ )
361
+ transcoder.transcode request_pb
362
+ end
243
363
  end
244
364
  end
245
365
  end