google-shopping-merchant-lfp 0.1.0 → 0.3.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 +4 -4
- data/README.md +33 -3
- data/lib/google/shopping/merchant/lfp/version.rb +1 -1
- data/lib/google/shopping/merchant/lfp.rb +180 -0
- metadata +18 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0aeb15d4fc7b4f5c450352bb84abe04ba86c47cfcfbf485d96263be9481be36
|
4
|
+
data.tar.gz: 7dda683a356ac21f9eaffd2d0e3af3ec280c4774e381bfb390f1af1cb5d1f626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f877ceae1a52e79eb0ed0721dd25ba414e0376b16bbfbcaf0e884af0bfa9b8b3ce9c1e674061b220edec63abb158e6d8274bdb51404de7a865ab8186d80248ab
|
7
|
+
data.tar.gz: cee10a1355966c068820c59d8bcb16fa5569e35d467cc5dc1fd904bb4719d0d3a2f4354d62f39dd13e891985ba8c099b1231dd752d973c704a61690502970c24
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Ruby Client for the Merchant API
|
2
2
|
|
3
|
-
Programmatically manage your Merchant Center
|
3
|
+
Programmatically manage your Merchant Center Accounts.
|
4
4
|
|
5
|
-
|
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-lfp-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-lfp-v1beta](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta).
|
66
|
+
|
37
67
|
## Supported Ruby Versions
|
38
68
|
|
39
|
-
This library is supported on Ruby
|
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
|
@@ -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 LfpInventoryService service.
|
46
|
+
# You can determine whether the method will succeed by calling
|
47
|
+
# {Google::Shopping::Merchant::Lfp.lfp_inventory_service_available?}.
|
48
|
+
#
|
44
49
|
# ## About LfpInventoryService
|
45
50
|
#
|
46
51
|
# Service for a [LFP
|
@@ -64,6 +69,109 @@ module Google
|
|
64
69
|
service_module.const_get(:Client).new(&block)
|
65
70
|
end
|
66
71
|
|
72
|
+
##
|
73
|
+
# Determines whether the LfpInventoryService service is supported by the current client.
|
74
|
+
# If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_inventory_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 LfpInventoryService service,
|
77
|
+
# or if the versioned client gem needs an update to support the LfpInventoryService 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.lfp_inventory_service_available? version: :v1beta, transport: :grpc
|
85
|
+
require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
|
86
|
+
package_name = Google::Shopping::Merchant::Lfp
|
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::Lfp.const_get package_name
|
92
|
+
return false unless service_module.const_defined? :LfpInventoryService
|
93
|
+
service_module = service_module.const_get :LfpInventoryService
|
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 LfpMerchantStateService.
|
105
|
+
#
|
106
|
+
# By default, this returns an instance of
|
107
|
+
# [Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpMerchantStateService/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 LfpMerchantStateService 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 LfpMerchantStateService service.
|
118
|
+
# You can determine whether the method will succeed by calling
|
119
|
+
# {Google::Shopping::Merchant::Lfp.lfp_merchant_state_service_available?}.
|
120
|
+
#
|
121
|
+
# ## About LfpMerchantStateService
|
122
|
+
#
|
123
|
+
# Service for a [LFP
|
124
|
+
# partner](https://support.google.com/merchants/answer/7676652) to get the
|
125
|
+
# state of a merchant.
|
126
|
+
#
|
127
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
128
|
+
# Defaults to `:v1beta`.
|
129
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
130
|
+
# @return [::Object] A client object for the specified version.
|
131
|
+
#
|
132
|
+
def self.lfp_merchant_state_service version: :v1beta, transport: :grpc, &block
|
133
|
+
require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
|
134
|
+
|
135
|
+
package_name = Google::Shopping::Merchant::Lfp
|
136
|
+
.constants
|
137
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
138
|
+
.first
|
139
|
+
service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpMerchantStateService)
|
140
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
141
|
+
service_module.const_get(:Client).new(&block)
|
142
|
+
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# Determines whether the LfpMerchantStateService service is supported by the current client.
|
146
|
+
# If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_merchant_state_service}.
|
147
|
+
# If false, that method will raise an exception. This could happen if the given
|
148
|
+
# API version does not exist or does not support the LfpMerchantStateService service,
|
149
|
+
# or if the versioned client gem needs an update to support the LfpMerchantStateService service.
|
150
|
+
#
|
151
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
152
|
+
# Defaults to `:v1beta`.
|
153
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
154
|
+
# @return [boolean] Whether the service is available.
|
155
|
+
#
|
156
|
+
def self.lfp_merchant_state_service_available? version: :v1beta, transport: :grpc
|
157
|
+
require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
|
158
|
+
package_name = Google::Shopping::Merchant::Lfp
|
159
|
+
.constants
|
160
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
161
|
+
.first
|
162
|
+
return false unless package_name
|
163
|
+
service_module = Google::Shopping::Merchant::Lfp.const_get package_name
|
164
|
+
return false unless service_module.const_defined? :LfpMerchantStateService
|
165
|
+
service_module = service_module.const_get :LfpMerchantStateService
|
166
|
+
if transport == :rest
|
167
|
+
return false unless service_module.const_defined? :Rest
|
168
|
+
service_module = service_module.const_get :Rest
|
169
|
+
end
|
170
|
+
service_module.const_defined? :Client
|
171
|
+
rescue ::LoadError
|
172
|
+
false
|
173
|
+
end
|
174
|
+
|
67
175
|
##
|
68
176
|
# Create a new client object for LfpSaleService.
|
69
177
|
#
|
@@ -77,6 +185,11 @@ module Google
|
|
77
185
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
78
186
|
# the `transport` parameter.
|
79
187
|
#
|
188
|
+
# Raises an exception if the currently installed versioned client gem for the
|
189
|
+
# given API version does not support the given transport of the LfpSaleService service.
|
190
|
+
# You can determine whether the method will succeed by calling
|
191
|
+
# {Google::Shopping::Merchant::Lfp.lfp_sale_service_available?}.
|
192
|
+
#
|
80
193
|
# ## About LfpSaleService
|
81
194
|
#
|
82
195
|
# Service for a [LFP
|
@@ -100,6 +213,37 @@ module Google
|
|
100
213
|
service_module.const_get(:Client).new(&block)
|
101
214
|
end
|
102
215
|
|
216
|
+
##
|
217
|
+
# Determines whether the LfpSaleService service is supported by the current client.
|
218
|
+
# If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_sale_service}.
|
219
|
+
# If false, that method will raise an exception. This could happen if the given
|
220
|
+
# API version does not exist or does not support the LfpSaleService service,
|
221
|
+
# or if the versioned client gem needs an update to support the LfpSaleService service.
|
222
|
+
#
|
223
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
224
|
+
# Defaults to `:v1beta`.
|
225
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
226
|
+
# @return [boolean] Whether the service is available.
|
227
|
+
#
|
228
|
+
def self.lfp_sale_service_available? version: :v1beta, transport: :grpc
|
229
|
+
require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
|
230
|
+
package_name = Google::Shopping::Merchant::Lfp
|
231
|
+
.constants
|
232
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
233
|
+
.first
|
234
|
+
return false unless package_name
|
235
|
+
service_module = Google::Shopping::Merchant::Lfp.const_get package_name
|
236
|
+
return false unless service_module.const_defined? :LfpSaleService
|
237
|
+
service_module = service_module.const_get :LfpSaleService
|
238
|
+
if transport == :rest
|
239
|
+
return false unless service_module.const_defined? :Rest
|
240
|
+
service_module = service_module.const_get :Rest
|
241
|
+
end
|
242
|
+
service_module.const_defined? :Client
|
243
|
+
rescue ::LoadError
|
244
|
+
false
|
245
|
+
end
|
246
|
+
|
103
247
|
##
|
104
248
|
# Create a new client object for LfpStoreService.
|
105
249
|
#
|
@@ -113,6 +257,11 @@ module Google
|
|
113
257
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
114
258
|
# the `transport` parameter.
|
115
259
|
#
|
260
|
+
# Raises an exception if the currently installed versioned client gem for the
|
261
|
+
# given API version does not support the given transport of the LfpStoreService service.
|
262
|
+
# You can determine whether the method will succeed by calling
|
263
|
+
# {Google::Shopping::Merchant::Lfp.lfp_store_service_available?}.
|
264
|
+
#
|
116
265
|
# ## About LfpStoreService
|
117
266
|
#
|
118
267
|
# Service for a [LFP
|
@@ -135,6 +284,37 @@ module Google
|
|
135
284
|
service_module = service_module.const_get(:Rest) if transport == :rest
|
136
285
|
service_module.const_get(:Client).new(&block)
|
137
286
|
end
|
287
|
+
|
288
|
+
##
|
289
|
+
# Determines whether the LfpStoreService service is supported by the current client.
|
290
|
+
# If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_store_service}.
|
291
|
+
# If false, that method will raise an exception. This could happen if the given
|
292
|
+
# API version does not exist or does not support the LfpStoreService service,
|
293
|
+
# or if the versioned client gem needs an update to support the LfpStoreService service.
|
294
|
+
#
|
295
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
296
|
+
# Defaults to `:v1beta`.
|
297
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
298
|
+
# @return [boolean] Whether the service is available.
|
299
|
+
#
|
300
|
+
def self.lfp_store_service_available? version: :v1beta, transport: :grpc
|
301
|
+
require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
|
302
|
+
package_name = Google::Shopping::Merchant::Lfp
|
303
|
+
.constants
|
304
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
305
|
+
.first
|
306
|
+
return false unless package_name
|
307
|
+
service_module = Google::Shopping::Merchant::Lfp.const_get package_name
|
308
|
+
return false unless service_module.const_defined? :LfpStoreService
|
309
|
+
service_module = service_module.const_get :LfpStoreService
|
310
|
+
if transport == :rest
|
311
|
+
return false unless service_module.const_defined? :Rest
|
312
|
+
service_module = service_module.const_get :Rest
|
313
|
+
end
|
314
|
+
service_module.const_defined? :Client
|
315
|
+
rescue ::LoadError
|
316
|
+
false
|
317
|
+
end
|
138
318
|
end
|
139
319
|
end
|
140
320
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-shopping-merchant-lfp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 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:
|
10
|
+
date: 2025-04-21 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -44,7 +43,19 @@ dependencies:
|
|
44
43
|
- - "<"
|
45
44
|
- !ruby/object:Gem::Version
|
46
45
|
version: 2.a
|
47
|
-
description:
|
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: '
|
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
|
80
|
-
signing_key:
|
89
|
+
rubygems_version: 3.6.5
|
81
90
|
specification_version: 4
|
82
|
-
summary: Programmatically manage your Merchant Center
|
91
|
+
summary: Programmatically manage your Merchant Center Accounts.
|
83
92
|
test_files: []
|