google-shopping-merchant-data_sources 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5946614ec6e2c7d14aaae2e28dc6e20a2fb85dc9f1f3149be6d4ac068f74927a
4
- data.tar.gz: 37da46d9ebff96e4493067d4cb154efe7d732f3d51b1949f570406bce04189b1
3
+ metadata.gz: ff80dd03269deb18f72a01f526d87cd36c86d38a14e9cef77ba3c9d817117e6b
4
+ data.tar.gz: 2b06516f0bf50ae27561a86a19a47d5e40a4a289f17e91ce0b6f10801fa0126f
5
5
  SHA512:
6
- metadata.gz: 5ee07a59792e23b89ff56f9c5d1022fdb87b62fe57d1acfbe0f437cb72b5edd0ff7908f87bd101d629d4c5d7215e6be4105beef8606d6f848d1fced3e7d040b9
7
- data.tar.gz: 1b5ebb87af6aab700be2d3206b0d433772815e14726bf285fe92748f7c993352e541cb45904ea79d767844e6b7907a23fd4984d1739cd9ed3fb752a332f55125
6
+ metadata.gz: fc66eff21d3f151dd5d6718760f515c21b86f6a4ca9ace5689bc6f445afb82ebba06da5001b34283a11df257acc3184b070dd4e75aa73bd27dd0435468180c46
7
+ data.tar.gz: a4139bbb51d0a68049aa1090d87479740c69407dc58876d59bb7cfd3c2d87a315b4f4f531f6e4c9be6ec0b6516d39c61d14d7ce907383a5402ab0892f30d918e
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby Client for the Merchant API
2
2
 
3
- Programmatically manage your Merchant Center accounts.
3
+ Programmatically manage your Merchant Center Accounts.
4
4
 
5
- Programmatically manage your Merchant Center accounts.
5
+ Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.
6
6
 
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-shopping-merchant-data_sources-v*`.
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-shopping-merchant-data_sources-v1beta](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1beta).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Shopping
22
22
  module Merchant
23
23
  module DataSources
24
- VERSION = "0.1.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -41,6 +41,11 @@ module Google
41
41
  # You can also specify a different transport by passing `:rest` or `:grpc` in
42
42
  # the `transport` parameter.
43
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 DataSourcesService service.
46
+ # You can determine whether the method will succeed by calling
47
+ # {Google::Shopping::Merchant::DataSources.data_sources_service_available?}.
48
+ #
44
49
  # ## About DataSourcesService
45
50
  #
46
51
  # Service to manage primary, supplemental, inventory and other data sources.
@@ -63,6 +68,107 @@ module Google
63
68
  service_module = service_module.const_get(:Rest) if transport == :rest
64
69
  service_module.const_get(:Client).new(&block)
65
70
  end
71
+
72
+ ##
73
+ # Determines whether the DataSourcesService service is supported by the current client.
74
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::DataSources.data_sources_service}.
75
+ # If false, that method will raise an exception. This could happen if the given
76
+ # API version does not exist or does not support the DataSourcesService service,
77
+ # or if the versioned client gem needs an update to support the DataSourcesService service.
78
+ #
79
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
80
+ # Defaults to `:v1beta`.
81
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
82
+ # @return [boolean] Whether the service is available.
83
+ #
84
+ def self.data_sources_service_available? version: :v1beta, transport: :grpc
85
+ require "google/shopping/merchant/data_sources/#{version.to_s.downcase}"
86
+ package_name = Google::Shopping::Merchant::DataSources
87
+ .constants
88
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
89
+ .first
90
+ return false unless package_name
91
+ service_module = Google::Shopping::Merchant::DataSources.const_get package_name
92
+ return false unless service_module.const_defined? :DataSourcesService
93
+ service_module = service_module.const_get :DataSourcesService
94
+ if transport == :rest
95
+ return false unless service_module.const_defined? :Rest
96
+ service_module = service_module.const_get :Rest
97
+ end
98
+ service_module.const_defined? :Client
99
+ rescue ::LoadError
100
+ false
101
+ end
102
+
103
+ ##
104
+ # Create a new client object for FileUploadsService.
105
+ #
106
+ # By default, this returns an instance of
107
+ # [Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1beta/Google/Shopping/Merchant/DataSources/V1beta/FileUploadsService/Client)
108
+ # for a gRPC client for version V1beta of the API.
109
+ # However, you can specify a different API version by passing it in the
110
+ # `version` parameter. If the FileUploadsService service is
111
+ # supported by that API version, and the corresponding gem is available, the
112
+ # appropriate versioned client will be returned.
113
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
114
+ # the `transport` parameter.
115
+ #
116
+ # Raises an exception if the currently installed versioned client gem for the
117
+ # given API version does not support the given transport of the FileUploadsService service.
118
+ # You can determine whether the method will succeed by calling
119
+ # {Google::Shopping::Merchant::DataSources.file_uploads_service_available?}.
120
+ #
121
+ # ## About FileUploadsService
122
+ #
123
+ # Service to manage data source file uploads.
124
+ #
125
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
126
+ # Defaults to `:v1beta`.
127
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
128
+ # @return [::Object] A client object for the specified version.
129
+ #
130
+ def self.file_uploads_service version: :v1beta, transport: :grpc, &block
131
+ require "google/shopping/merchant/data_sources/#{version.to_s.downcase}"
132
+
133
+ package_name = Google::Shopping::Merchant::DataSources
134
+ .constants
135
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
136
+ .first
137
+ service_module = Google::Shopping::Merchant::DataSources.const_get(package_name).const_get(:FileUploadsService)
138
+ service_module = service_module.const_get(:Rest) if transport == :rest
139
+ service_module.const_get(:Client).new(&block)
140
+ end
141
+
142
+ ##
143
+ # Determines whether the FileUploadsService service is supported by the current client.
144
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::DataSources.file_uploads_service}.
145
+ # If false, that method will raise an exception. This could happen if the given
146
+ # API version does not exist or does not support the FileUploadsService service,
147
+ # or if the versioned client gem needs an update to support the FileUploadsService service.
148
+ #
149
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
150
+ # Defaults to `:v1beta`.
151
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
152
+ # @return [boolean] Whether the service is available.
153
+ #
154
+ def self.file_uploads_service_available? version: :v1beta, transport: :grpc
155
+ require "google/shopping/merchant/data_sources/#{version.to_s.downcase}"
156
+ package_name = Google::Shopping::Merchant::DataSources
157
+ .constants
158
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
159
+ .first
160
+ return false unless package_name
161
+ service_module = Google::Shopping::Merchant::DataSources.const_get package_name
162
+ return false unless service_module.const_defined? :FileUploadsService
163
+ service_module = service_module.const_get :FileUploadsService
164
+ if transport == :rest
165
+ return false unless service_module.const_defined? :Rest
166
+ service_module = service_module.const_get :Rest
167
+ end
168
+ service_module.const_defined? :Client
169
+ rescue ::LoadError
170
+ false
171
+ end
66
172
  end
67
173
  end
68
174
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-shopping-merchant-data_sources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-06 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -30,7 +29,7 @@ dependencies:
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '0.0'
32
+ version: '0.2'
34
33
  - - "<"
35
34
  - !ruby/object:Gem::Version
36
35
  version: 2.a
@@ -40,11 +39,23 @@ dependencies:
40
39
  requirements:
41
40
  - - ">="
42
41
  - !ruby/object:Gem::Version
43
- version: '0.0'
42
+ version: '0.2'
44
43
  - - "<"
45
44
  - !ruby/object:Gem::Version
46
45
  version: 2.a
47
- description: Programmatically manage your Merchant Center accounts.
46
+ description: 'Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables
47
+ you to programmatically manage your accounts. Conversions Sub-API: Enables you to
48
+ programmatically manage your conversion sources for a merchant account. Datasources
49
+ Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API:
50
+ This bundle enables you to programmatically manage your local and regional inventories.
51
+ Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local
52
+ inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically
53
+ manage your notification subscriptions. Products Sub-API: This bundle enables you
54
+ to programmatically manage your products. Promotions Sub-API: This bundle enables
55
+ you to programmatically manage your promotions for products. Quota Sub-API: This
56
+ bundle enables you to list your quotas for all APIs you are using. Reports Sub-API:
57
+ This bundle enables you to programmatically retrieve reports and insights about
58
+ products, their performance and their competitive environment.'
48
59
  email: googleapis-packages@google.com
49
60
  executables: []
50
61
  extensions: []
@@ -61,7 +72,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
61
72
  licenses:
62
73
  - Apache-2.0
63
74
  metadata: {}
64
- post_install_message:
65
75
  rdoc_options: []
66
76
  require_paths:
67
77
  - lib
@@ -69,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
79
  requirements:
70
80
  - - ">="
71
81
  - !ruby/object:Gem::Version
72
- version: '2.7'
82
+ version: '3.0'
73
83
  required_rubygems_version: !ruby/object:Gem::Requirement
74
84
  requirements:
75
85
  - - ">="
76
86
  - !ruby/object:Gem::Version
77
87
  version: '0'
78
88
  requirements: []
79
- rubygems_version: 3.5.6
80
- signing_key:
89
+ rubygems_version: 3.6.2
81
90
  specification_version: 4
82
- summary: Programmatically manage your Merchant Center accounts.
91
+ summary: Programmatically manage your Merchant Center Accounts.
83
92
  test_files: []