google-apis-merchantapi_datasources_v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,255 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module MerchantapiDatasourcesV1beta
24
+
25
+ class DataSource
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class Empty
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class FetchDataSourceRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class FetchSettings
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class FileInput
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListDataSourcesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class LocalInventoryDataSource
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class PrimaryProductDataSource
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ProductChange
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ProductStatusChangeMessage
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class PromotionDataSource
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class RegionalInventoryDataSource
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class SupplementalProductDataSource
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class TimeOfDay
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class DataSource
110
+ # @private
111
+ class Representation < Google::Apis::Core::JsonRepresentation
112
+ property :data_source_id, :numeric_string => true, as: 'dataSourceId'
113
+ property :display_name, as: 'displayName'
114
+ property :file_input, as: 'fileInput', class: Google::Apis::MerchantapiDatasourcesV1beta::FileInput, decorator: Google::Apis::MerchantapiDatasourcesV1beta::FileInput::Representation
115
+
116
+ property :input, as: 'input'
117
+ property :local_inventory_data_source, as: 'localInventoryDataSource', class: Google::Apis::MerchantapiDatasourcesV1beta::LocalInventoryDataSource, decorator: Google::Apis::MerchantapiDatasourcesV1beta::LocalInventoryDataSource::Representation
118
+
119
+ property :name, as: 'name'
120
+ property :primary_product_data_source, as: 'primaryProductDataSource', class: Google::Apis::MerchantapiDatasourcesV1beta::PrimaryProductDataSource, decorator: Google::Apis::MerchantapiDatasourcesV1beta::PrimaryProductDataSource::Representation
121
+
122
+ property :promotion_data_source, as: 'promotionDataSource', class: Google::Apis::MerchantapiDatasourcesV1beta::PromotionDataSource, decorator: Google::Apis::MerchantapiDatasourcesV1beta::PromotionDataSource::Representation
123
+
124
+ property :regional_inventory_data_source, as: 'regionalInventoryDataSource', class: Google::Apis::MerchantapiDatasourcesV1beta::RegionalInventoryDataSource, decorator: Google::Apis::MerchantapiDatasourcesV1beta::RegionalInventoryDataSource::Representation
125
+
126
+ property :supplemental_product_data_source, as: 'supplementalProductDataSource', class: Google::Apis::MerchantapiDatasourcesV1beta::SupplementalProductDataSource, decorator: Google::Apis::MerchantapiDatasourcesV1beta::SupplementalProductDataSource::Representation
127
+
128
+ end
129
+ end
130
+
131
+ class Empty
132
+ # @private
133
+ class Representation < Google::Apis::Core::JsonRepresentation
134
+ end
135
+ end
136
+
137
+ class FetchDataSourceRequest
138
+ # @private
139
+ class Representation < Google::Apis::Core::JsonRepresentation
140
+ end
141
+ end
142
+
143
+ class FetchSettings
144
+ # @private
145
+ class Representation < Google::Apis::Core::JsonRepresentation
146
+ property :day_of_month, as: 'dayOfMonth'
147
+ property :day_of_week, as: 'dayOfWeek'
148
+ property :enabled, as: 'enabled'
149
+ property :fetch_uri, as: 'fetchUri'
150
+ property :frequency, as: 'frequency'
151
+ property :password, as: 'password'
152
+ property :time_of_day, as: 'timeOfDay', class: Google::Apis::MerchantapiDatasourcesV1beta::TimeOfDay, decorator: Google::Apis::MerchantapiDatasourcesV1beta::TimeOfDay::Representation
153
+
154
+ property :time_zone, as: 'timeZone'
155
+ property :username, as: 'username'
156
+ end
157
+ end
158
+
159
+ class FileInput
160
+ # @private
161
+ class Representation < Google::Apis::Core::JsonRepresentation
162
+ property :fetch_settings, as: 'fetchSettings', class: Google::Apis::MerchantapiDatasourcesV1beta::FetchSettings, decorator: Google::Apis::MerchantapiDatasourcesV1beta::FetchSettings::Representation
163
+
164
+ property :file_input_type, as: 'fileInputType'
165
+ property :file_name, as: 'fileName'
166
+ end
167
+ end
168
+
169
+ class ListDataSourcesResponse
170
+ # @private
171
+ class Representation < Google::Apis::Core::JsonRepresentation
172
+ collection :data_sources, as: 'dataSources', class: Google::Apis::MerchantapiDatasourcesV1beta::DataSource, decorator: Google::Apis::MerchantapiDatasourcesV1beta::DataSource::Representation
173
+
174
+ property :next_page_token, as: 'nextPageToken'
175
+ end
176
+ end
177
+
178
+ class LocalInventoryDataSource
179
+ # @private
180
+ class Representation < Google::Apis::Core::JsonRepresentation
181
+ property :content_language, as: 'contentLanguage'
182
+ property :feed_label, as: 'feedLabel'
183
+ end
184
+ end
185
+
186
+ class PrimaryProductDataSource
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ property :channel, as: 'channel'
190
+ property :content_language, as: 'contentLanguage'
191
+ collection :countries, as: 'countries'
192
+ property :feed_label, as: 'feedLabel'
193
+ end
194
+ end
195
+
196
+ class ProductChange
197
+ # @private
198
+ class Representation < Google::Apis::Core::JsonRepresentation
199
+ property :new_value, as: 'newValue'
200
+ property :old_value, as: 'oldValue'
201
+ property :region_code, as: 'regionCode'
202
+ property :reporting_context, as: 'reportingContext'
203
+ end
204
+ end
205
+
206
+ class ProductStatusChangeMessage
207
+ # @private
208
+ class Representation < Google::Apis::Core::JsonRepresentation
209
+ property :account, as: 'account'
210
+ property :attribute, as: 'attribute'
211
+ collection :changes, as: 'changes', class: Google::Apis::MerchantapiDatasourcesV1beta::ProductChange, decorator: Google::Apis::MerchantapiDatasourcesV1beta::ProductChange::Representation
212
+
213
+ property :managing_account, as: 'managingAccount'
214
+ property :resource, as: 'resource'
215
+ property :resource_id, as: 'resourceId'
216
+ property :resource_type, as: 'resourceType'
217
+ end
218
+ end
219
+
220
+ class PromotionDataSource
221
+ # @private
222
+ class Representation < Google::Apis::Core::JsonRepresentation
223
+ property :content_language, as: 'contentLanguage'
224
+ property :target_country, as: 'targetCountry'
225
+ end
226
+ end
227
+
228
+ class RegionalInventoryDataSource
229
+ # @private
230
+ class Representation < Google::Apis::Core::JsonRepresentation
231
+ property :content_language, as: 'contentLanguage'
232
+ property :feed_label, as: 'feedLabel'
233
+ end
234
+ end
235
+
236
+ class SupplementalProductDataSource
237
+ # @private
238
+ class Representation < Google::Apis::Core::JsonRepresentation
239
+ property :content_language, as: 'contentLanguage'
240
+ property :feed_label, as: 'feedLabel'
241
+ end
242
+ end
243
+
244
+ class TimeOfDay
245
+ # @private
246
+ class Representation < Google::Apis::Core::JsonRepresentation
247
+ property :hours, as: 'hours'
248
+ property :minutes, as: 'minutes'
249
+ property :nanos, as: 'nanos'
250
+ property :seconds, as: 'seconds'
251
+ end
252
+ end
253
+ end
254
+ end
255
+ end
@@ -0,0 +1,279 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module MerchantapiDatasourcesV1beta
23
+ # Merchant API
24
+ #
25
+ # Programmatically manage your Merchant Center Accounts.
26
+ #
27
+ # @example
28
+ # require 'google/apis/merchantapi_datasources_v1beta'
29
+ #
30
+ # Merchantapi = Google::Apis::MerchantapiDatasourcesV1beta # Alias the module
31
+ # service = Merchantapi::MerchantService.new
32
+ #
33
+ # @see https://developers.devsite.corp.google.com/merchant/api
34
+ class MerchantService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://merchantapi.$UNIVERSE_DOMAIN$/"
36
+
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
49
+ client_name: 'google-apis-merchantapi_datasources_v1beta',
50
+ client_version: Google::Apis::MerchantapiDatasourcesV1beta::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Creates the new data source configuration for the given account.
55
+ # @param [String] parent
56
+ # Required. The account where this data source will be created. Format: `
57
+ # accounts/`account``
58
+ # @param [Google::Apis::MerchantapiDatasourcesV1beta::DataSource] data_source_object
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::MerchantapiDatasourcesV1beta::DataSource] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::MerchantapiDatasourcesV1beta::DataSource]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def create_account_data_source(parent, data_source_object = nil, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'datasources/v1beta/{+parent}/dataSources', options)
78
+ command.request_representation = Google::Apis::MerchantapiDatasourcesV1beta::DataSource::Representation
79
+ command.request_object = data_source_object
80
+ command.response_representation = Google::Apis::MerchantapiDatasourcesV1beta::DataSource::Representation
81
+ command.response_class = Google::Apis::MerchantapiDatasourcesV1beta::DataSource
82
+ command.params['parent'] = parent unless parent.nil?
83
+ command.query['fields'] = fields unless fields.nil?
84
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
+ execute_or_queue_command(command, &block)
86
+ end
87
+
88
+ # Deletes a data source from your Merchant Center account.
89
+ # @param [String] name
90
+ # Required. The name of the data source to delete. Format: `accounts/`account`/
91
+ # dataSources/`datasource``
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::MerchantapiDatasourcesV1beta::Empty] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::MerchantapiDatasourcesV1beta::Empty]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def delete_account_data_source(name, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:delete, 'datasources/v1beta/{+name}', options)
111
+ command.response_representation = Google::Apis::MerchantapiDatasourcesV1beta::Empty::Representation
112
+ command.response_class = Google::Apis::MerchantapiDatasourcesV1beta::Empty
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Performs the data fetch immediately (even outside fetch schedule) on a data
120
+ # source from your Merchant Center Account. If you need to call this method more
121
+ # than once per day, you should use the Products service to update your product
122
+ # data instead. This method only works on data sources with a file input set.
123
+ # @param [String] name
124
+ # Required. The name of the data source resource to fetch. Format: `accounts/`
125
+ # account`/dataSources/`datasource``
126
+ # @param [Google::Apis::MerchantapiDatasourcesV1beta::FetchDataSourceRequest] fetch_data_source_request_object
127
+ # @param [String] fields
128
+ # Selector specifying which fields to include in a partial response.
129
+ # @param [String] quota_user
130
+ # Available to use for quota purposes for server-side applications. Can be any
131
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
132
+ # @param [Google::Apis::RequestOptions] options
133
+ # Request-specific options
134
+ #
135
+ # @yield [result, err] Result & error if block supplied
136
+ # @yieldparam result [Google::Apis::MerchantapiDatasourcesV1beta::Empty] parsed result object
137
+ # @yieldparam err [StandardError] error object if request failed
138
+ #
139
+ # @return [Google::Apis::MerchantapiDatasourcesV1beta::Empty]
140
+ #
141
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
142
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
143
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
144
+ def fetch_data_source(name, fetch_data_source_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
145
+ command = make_simple_command(:post, 'datasources/v1beta/{+name}:fetch', options)
146
+ command.request_representation = Google::Apis::MerchantapiDatasourcesV1beta::FetchDataSourceRequest::Representation
147
+ command.request_object = fetch_data_source_request_object
148
+ command.response_representation = Google::Apis::MerchantapiDatasourcesV1beta::Empty::Representation
149
+ command.response_class = Google::Apis::MerchantapiDatasourcesV1beta::Empty
150
+ command.params['name'] = name unless name.nil?
151
+ command.query['fields'] = fields unless fields.nil?
152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
153
+ execute_or_queue_command(command, &block)
154
+ end
155
+
156
+ # Retrieves the data source configuration for the given account.
157
+ # @param [String] name
158
+ # Required. The name of the data source to retrieve. Format: `accounts/`account`/
159
+ # dataSources/`datasource``
160
+ # @param [String] fields
161
+ # Selector specifying which fields to include in a partial response.
162
+ # @param [String] quota_user
163
+ # Available to use for quota purposes for server-side applications. Can be any
164
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
165
+ # @param [Google::Apis::RequestOptions] options
166
+ # Request-specific options
167
+ #
168
+ # @yield [result, err] Result & error if block supplied
169
+ # @yieldparam result [Google::Apis::MerchantapiDatasourcesV1beta::DataSource] parsed result object
170
+ # @yieldparam err [StandardError] error object if request failed
171
+ #
172
+ # @return [Google::Apis::MerchantapiDatasourcesV1beta::DataSource]
173
+ #
174
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
175
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
176
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
177
+ def get_account_data_source(name, fields: nil, quota_user: nil, options: nil, &block)
178
+ command = make_simple_command(:get, 'datasources/v1beta/{+name}', options)
179
+ command.response_representation = Google::Apis::MerchantapiDatasourcesV1beta::DataSource::Representation
180
+ command.response_class = Google::Apis::MerchantapiDatasourcesV1beta::DataSource
181
+ command.params['name'] = name unless name.nil?
182
+ command.query['fields'] = fields unless fields.nil?
183
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
184
+ execute_or_queue_command(command, &block)
185
+ end
186
+
187
+ # Lists the configurations for data sources for the given account.
188
+ # @param [String] parent
189
+ # Required. The account to list data sources for. Format: `accounts/`account``
190
+ # @param [Fixnum] page_size
191
+ # Optional. The maximum number of data sources to return. The service may return
192
+ # fewer than this value. The maximum value is 1000; values above 1000 will be
193
+ # coerced to 1000. If unspecified, the maximum number of data sources will be
194
+ # returned.
195
+ # @param [String] page_token
196
+ # Optional. A page token, received from a previous `ListDataSources` call.
197
+ # Provide this to retrieve the subsequent page. When paginating, all other
198
+ # parameters provided to `ListDataSources` must match the call that provided the
199
+ # page token.
200
+ # @param [String] fields
201
+ # Selector specifying which fields to include in a partial response.
202
+ # @param [String] quota_user
203
+ # Available to use for quota purposes for server-side applications. Can be any
204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
205
+ # @param [Google::Apis::RequestOptions] options
206
+ # Request-specific options
207
+ #
208
+ # @yield [result, err] Result & error if block supplied
209
+ # @yieldparam result [Google::Apis::MerchantapiDatasourcesV1beta::ListDataSourcesResponse] parsed result object
210
+ # @yieldparam err [StandardError] error object if request failed
211
+ #
212
+ # @return [Google::Apis::MerchantapiDatasourcesV1beta::ListDataSourcesResponse]
213
+ #
214
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
215
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
216
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
217
+ def list_account_data_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
218
+ command = make_simple_command(:get, 'datasources/v1beta/{+parent}/dataSources', options)
219
+ command.response_representation = Google::Apis::MerchantapiDatasourcesV1beta::ListDataSourcesResponse::Representation
220
+ command.response_class = Google::Apis::MerchantapiDatasourcesV1beta::ListDataSourcesResponse
221
+ command.params['parent'] = parent unless parent.nil?
222
+ command.query['pageSize'] = page_size unless page_size.nil?
223
+ command.query['pageToken'] = page_token unless page_token.nil?
224
+ command.query['fields'] = fields unless fields.nil?
225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
226
+ execute_or_queue_command(command, &block)
227
+ end
228
+
229
+ # Updates the existing data source configuration. The fields that are set in the
230
+ # update mask but not provided in the resource will be deleted.
231
+ # @param [String] name
232
+ # Identifier. The name of the data source. Format: ``datasource.name=accounts/`
233
+ # account`/dataSources/`datasource```
234
+ # @param [Google::Apis::MerchantapiDatasourcesV1beta::DataSource] data_source_object
235
+ # @param [String] update_mask
236
+ # Required. The list of data source fields to be updated. Fields specified in
237
+ # the update mask without a value specified in the body will be deleted from the
238
+ # data source. Providing special "*" value for full data source replacement is
239
+ # not supported.
240
+ # @param [String] fields
241
+ # Selector specifying which fields to include in a partial response.
242
+ # @param [String] quota_user
243
+ # Available to use for quota purposes for server-side applications. Can be any
244
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
245
+ # @param [Google::Apis::RequestOptions] options
246
+ # Request-specific options
247
+ #
248
+ # @yield [result, err] Result & error if block supplied
249
+ # @yieldparam result [Google::Apis::MerchantapiDatasourcesV1beta::DataSource] parsed result object
250
+ # @yieldparam err [StandardError] error object if request failed
251
+ #
252
+ # @return [Google::Apis::MerchantapiDatasourcesV1beta::DataSource]
253
+ #
254
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
255
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
256
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
257
+ def patch_account_data_source(name, data_source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
258
+ command = make_simple_command(:patch, 'datasources/v1beta/{+name}', options)
259
+ command.request_representation = Google::Apis::MerchantapiDatasourcesV1beta::DataSource::Representation
260
+ command.request_object = data_source_object
261
+ command.response_representation = Google::Apis::MerchantapiDatasourcesV1beta::DataSource::Representation
262
+ command.response_class = Google::Apis::MerchantapiDatasourcesV1beta::DataSource
263
+ command.params['name'] = name unless name.nil?
264
+ command.query['updateMask'] = update_mask unless update_mask.nil?
265
+ command.query['fields'] = fields unless fields.nil?
266
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
267
+ execute_or_queue_command(command, &block)
268
+ end
269
+
270
+ protected
271
+
272
+ def apply_command_defaults(command)
273
+ command.query['key'] = key unless key.nil?
274
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
275
+ end
276
+ end
277
+ end
278
+ end
279
+ end
@@ -0,0 +1,36 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/merchantapi_datasources_v1beta/service.rb'
16
+ require 'google/apis/merchantapi_datasources_v1beta/classes.rb'
17
+ require 'google/apis/merchantapi_datasources_v1beta/representations.rb'
18
+ require 'google/apis/merchantapi_datasources_v1beta/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Merchant API
23
+ #
24
+ # Programmatically manage your Merchant Center Accounts.
25
+ #
26
+ # @see https://developers.devsite.corp.google.com/merchant/api
27
+ module MerchantapiDatasourcesV1beta
28
+ # Version of the Merchant API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'DatasourcesV1beta'
31
+
32
+ # Manage your product listings and accounts for Google Shopping
33
+ AUTH_CONTENT = 'https://www.googleapis.com/auth/content'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/merchantapi_datasources_v1beta"
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-merchantapi_datasources_v1beta
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-06-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.15.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.a
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.15.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.a
33
+ description: This is the simple REST client for Merchant API DatasourcesV1beta. Simple
34
+ REST clients are Ruby client libraries that provide access to Google services via
35
+ their HTTP REST API endpoints. These libraries are generated and updated automatically
36
+ based on the discovery documents published by the service, and they handle most
37
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
38
+ use this client to access the Merchant API, but note that some services may provide
39
+ a separate modern client that is easier to use.
40
+ email: googleapis-packages@google.com
41
+ executables: []
42
+ extensions: []
43
+ extra_rdoc_files: []
44
+ files:
45
+ - ".yardopts"
46
+ - CHANGELOG.md
47
+ - LICENSE.md
48
+ - OVERVIEW.md
49
+ - lib/google-apis-merchantapi_datasources_v1beta.rb
50
+ - lib/google/apis/merchantapi_datasources_v1beta.rb
51
+ - lib/google/apis/merchantapi_datasources_v1beta/classes.rb
52
+ - lib/google/apis/merchantapi_datasources_v1beta/gem_version.rb
53
+ - lib/google/apis/merchantapi_datasources_v1beta/representations.rb
54
+ - lib/google/apis/merchantapi_datasources_v1beta/service.rb
55
+ homepage: https://github.com/google/google-api-ruby-client
56
+ licenses:
57
+ - Apache-2.0
58
+ metadata:
59
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-merchantapi_datasources_v1beta/CHANGELOG.md
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-merchantapi_datasources_v1beta/v0.1.0
62
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-merchantapi_datasources_v1beta
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '2.7'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.5.6
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Simple REST client for Merchant API DatasourcesV1beta
82
+ test_files: []