Class: Google::Apis::MerchantapiDatasourcesV1beta::FetchSettings

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_datasources_v1beta/classes.rb,
lib/google/apis/merchantapi_datasources_v1beta/representations.rb,
lib/google/apis/merchantapi_datasources_v1beta/representations.rb

Overview

Fetch details to deliver the data source.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FetchSettings

Returns a new instance of FetchSettings.



270
271
272
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 270

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#day_of_monthFixnum

Optional. The day of the month when the data source file should be fetched (1- 31). This field can only be set for monthly frequency. Corresponds to the JSON property dayOfMonth

Returns:

  • (Fixnum)


218
219
220
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 218

def day_of_month
  @day_of_month
end

#day_of_weekString

Optional. The day of the week when the data source file should be fetched. This field can only be set for weekly frequency. Corresponds to the JSON property dayOfWeek

Returns:

  • (String)


224
225
226
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 224

def day_of_week
  @day_of_week
end

#enabledBoolean Also known as: enabled?

Optional. Enables or pauses the fetch schedule. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


229
230
231
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 229

def enabled
  @enabled
end

#fetch_uriString

Optional. The URL where the data source file can be fetched. Google Merchant Center supports automatic scheduled uploads using the HTTP, HTTPS or SFTP protocols, so the value will need to be a valid link using one of those three protocols. Immutable for Google Sheets files. Corresponds to the JSON property fetchUri

Returns:

  • (String)


238
239
240
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 238

def fetch_uri
  @fetch_uri
end

#frequencyString

Required. The frequency describing fetch schedule. Corresponds to the JSON property frequency

Returns:

  • (String)


243
244
245
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 243

def frequency
  @frequency
end

#passwordString

Optional. An optional password for fetch_uri. Used for submitting data sources through SFTP. Corresponds to the JSON property password

Returns:

  • (String)


249
250
251
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 249

def password
  @password
end

#time_of_dayGoogle::Apis::MerchantapiDatasourcesV1beta::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property timeOfDay



256
257
258
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 256

def time_of_day
  @time_of_day
end

#time_zoneString

Optional. Time zone used for schedule. UTC by default. For example, "America/Los_Angeles". Corresponds to the JSON property timeZone

Returns:

  • (String)


262
263
264
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 262

def time_zone
  @time_zone
end

#usernameString

Optional. An optional user name for fetch_uri. Used for submitting data sources through SFTP. Corresponds to the JSON property username

Returns:

  • (String)


268
269
270
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 268

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



275
276
277
278
279
280
281
282
283
284
285
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 275

def update!(**args)
  @day_of_month = args[:day_of_month] if args.key?(:day_of_month)
  @day_of_week = args[:day_of_week] if args.key?(:day_of_week)
  @enabled = args[:enabled] if args.key?(:enabled)
  @fetch_uri = args[:fetch_uri] if args.key?(:fetch_uri)
  @frequency = args[:frequency] if args.key?(:frequency)
  @password = args[:password] if args.key?(:password)
  @time_of_day = args[:time_of_day] if args.key?(:time_of_day)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @username = args[:username] if args.key?(:username)
end