google-shopping-merchant-lfp 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89f331f6c89e9aaccf5db957faf6209bfbabe17047f38a3762ad383f32a13629
4
- data.tar.gz: 5d5e0f65c1083ca6980d8aa6119e0d90f862e3fffc4d2912499a3ce89fcc3588
3
+ metadata.gz: d0aeb15d4fc7b4f5c450352bb84abe04ba86c47cfcfbf485d96263be9481be36
4
+ data.tar.gz: 7dda683a356ac21f9eaffd2d0e3af3ec280c4774e381bfb390f1af1cb5d1f626
5
5
  SHA512:
6
- metadata.gz: 35f192b85c8e524600f79e7816ec846a4892f41d357bb3017ebc4b7d98d6ab5547a49dda1649c1037cb6c7263727a9ec16baae8483e2e4f5850f7482c9067d44
7
- data.tar.gz: f8c6e1be234372bd5b215369102004d30c5fd6b45301dfee0d106c96dfe498217f9393ca7cfda0b6c2837a436a9315ecaeee0599d39e094a39cdd4bf8fdff198
6
+ metadata.gz: f877ceae1a52e79eb0ed0721dd25ba414e0376b16bbfbcaf0e884af0bfa9b8b3ce9c1e674061b220edec63abb158e6d8274bdb51404de7a865ab8186d80248ab
7
+ data.tar.gz: cee10a1355966c068820c59d8bcb16fa5569e35d467cc5dc1fd904bb4719d0d3a2f4354d62f39dd13e891985ba8c099b1231dd752d973c704a61690502970c24
data/README.md CHANGED
@@ -1,7 +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
+ 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.
5
6
 
6
7
  Actual client classes for the various versions of this API are defined in
7
8
  _versioned_ client gems, with names of the form `google-shopping-merchant-lfp-v*`.
@@ -21,7 +21,7 @@ module Google
21
21
  module Shopping
22
22
  module Merchant
23
23
  module Lfp
24
- VERSION = "0.2.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -100,6 +100,78 @@ module Google
100
100
  false
101
101
  end
102
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
+
103
175
  ##
104
176
  # Create a new client object for LfpSaleService.
105
177
  #
metadata CHANGED
@@ -1,13 +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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-04-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -43,7 +43,19 @@ dependencies:
43
43
  - - "<"
44
44
  - !ruby/object:Gem::Version
45
45
  version: 2.a
46
- 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.'
47
59
  email: googleapis-packages@google.com
48
60
  executables: []
49
61
  extensions: []
@@ -74,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
86
  - !ruby/object:Gem::Version
75
87
  version: '0'
76
88
  requirements: []
77
- rubygems_version: 3.6.2
89
+ rubygems_version: 3.6.5
78
90
  specification_version: 4
79
- summary: Programmatically manage your Merchant Center accounts.
91
+ summary: Programmatically manage your Merchant Center Accounts.
80
92
  test_files: []