google-shopping-merchant-issue_resolution 0.1.0 → 0.2.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f9b71a0e6bc9f65cd6adff6db1db77b2d3be10877408a32a6b39aee568d930a
|
4
|
+
data.tar.gz: 2dff4d4cb19b84ba86f4f6cfed597aba8c4b5ddf3edd7318b53cb5f04a9b4956
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a446b96b6a466fc9ef25643931ff9db62382b21851b15cccd1d59bef5bdd6b6fbdfab6c9c313c90d38d39495e45fa2b8978e4dc348becf2bf09f9c9845f82dca
|
7
|
+
data.tar.gz: e7c025877d771801df361190642dbe6fb848e57f05d7e68ad15586fe82f21fdc23df4b08b0474d609ba9924302100b955dbbaa120db9546202da7ebaf3f95405
|
data/AUTHENTICATION.md
CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
|
|
56
56
|
```ruby
|
57
57
|
require "google/shopping/merchant/issue_resolution"
|
58
58
|
|
59
|
-
client = Google::Shopping::Merchant::IssueResolution.
|
59
|
+
client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Shopping::Merchant::IssueResolution.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Shopping::Merchant::IssueResolution.
|
73
|
+
client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/shopping/merchant/issue_resolution"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Shopping::Merchant::IssueResolution.
|
103
|
+
client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
@@ -28,6 +28,76 @@ module Google
|
|
28
28
|
module Shopping
|
29
29
|
module Merchant
|
30
30
|
module IssueResolution
|
31
|
+
##
|
32
|
+
# Create a new client object for AggregateProductStatusesService.
|
33
|
+
#
|
34
|
+
# By default, this returns an instance of
|
35
|
+
# [Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta/Google/Shopping/Merchant/IssueResolution/V1beta/AggregateProductStatusesService/Client)
|
36
|
+
# for a gRPC client for version V1beta of the API.
|
37
|
+
# However, you can specify a different API version by passing it in the
|
38
|
+
# `version` parameter. If the AggregateProductStatusesService service is
|
39
|
+
# supported by that API version, and the corresponding gem is available, the
|
40
|
+
# appropriate versioned client will be returned.
|
41
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
42
|
+
# the `transport` parameter.
|
43
|
+
#
|
44
|
+
# Raises an exception if the currently installed versioned client gem for the
|
45
|
+
# given API version does not support the given transport of the AggregateProductStatusesService service.
|
46
|
+
# You can determine whether the method will succeed by calling
|
47
|
+
# {Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service_available?}.
|
48
|
+
#
|
49
|
+
# ## About AggregateProductStatusesService
|
50
|
+
#
|
51
|
+
# Service to manage aggregate product statuses.
|
52
|
+
#
|
53
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
54
|
+
# Defaults to `:v1beta`.
|
55
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
56
|
+
# @return [::Object] A client object for the specified version.
|
57
|
+
#
|
58
|
+
def self.aggregate_product_statuses_service version: :v1beta, transport: :grpc, &block
|
59
|
+
require "google/shopping/merchant/issue_resolution/#{version.to_s.downcase}"
|
60
|
+
|
61
|
+
package_name = Google::Shopping::Merchant::IssueResolution
|
62
|
+
.constants
|
63
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
64
|
+
.first
|
65
|
+
service_module = Google::Shopping::Merchant::IssueResolution.const_get(package_name).const_get(:AggregateProductStatusesService)
|
66
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
67
|
+
service_module.const_get(:Client).new(&block)
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# Determines whether the AggregateProductStatusesService service is supported by the current client.
|
72
|
+
# If true, you can retrieve a client object by calling {Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service}.
|
73
|
+
# If false, that method will raise an exception. This could happen if the given
|
74
|
+
# API version does not exist or does not support the AggregateProductStatusesService service,
|
75
|
+
# or if the versioned client gem needs an update to support the AggregateProductStatusesService service.
|
76
|
+
#
|
77
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
78
|
+
# Defaults to `:v1beta`.
|
79
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
80
|
+
# @return [boolean] Whether the service is available.
|
81
|
+
#
|
82
|
+
def self.aggregate_product_statuses_service_available? version: :v1beta, transport: :grpc
|
83
|
+
require "google/shopping/merchant/issue_resolution/#{version.to_s.downcase}"
|
84
|
+
package_name = Google::Shopping::Merchant::IssueResolution
|
85
|
+
.constants
|
86
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
87
|
+
.first
|
88
|
+
return false unless package_name
|
89
|
+
service_module = Google::Shopping::Merchant::IssueResolution.const_get package_name
|
90
|
+
return false unless service_module.const_defined? :AggregateProductStatusesService
|
91
|
+
service_module = service_module.const_get :AggregateProductStatusesService
|
92
|
+
if transport == :rest
|
93
|
+
return false unless service_module.const_defined? :Rest
|
94
|
+
service_module = service_module.const_get :Rest
|
95
|
+
end
|
96
|
+
service_module.const_defined? :Client
|
97
|
+
rescue ::LoadError
|
98
|
+
false
|
99
|
+
end
|
100
|
+
|
31
101
|
##
|
32
102
|
# Create a new client object for IssueResolutionService.
|
33
103
|
#
|