Class: Google::Apis::ContentV2::HolidaysHoliday

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ HolidaysHoliday

Returns a new instance of HolidaysHoliday



2173
2174
2175
# File 'generated/google/apis/content_v2/classes.rb', line 2173

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

Instance Attribute Details

#country_codeString

The CLDR territory code of the country in which the holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can only be configured in a shipping settings service with matching delivery country. Always present. Corresponds to the JSON property countryCode

Returns:

  • (String)


2141
2142
2143
# File 'generated/google/apis/content_v2/classes.rb', line 2141

def country_code
  @country_code
end

#dateString

Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for Christmas 2016. Always present. Corresponds to the JSON property date

Returns:

  • (String)


2147
2148
2149
# File 'generated/google/apis/content_v2/classes.rb', line 2147

def date
  @date
end

#delivery_guarantee_dateString

Date on which the order has to arrive at the customer's, in ISO 8601 format. E. g. "2016-12-24" for 24th December 2016. Always present. Corresponds to the JSON property deliveryGuaranteeDate

Returns:

  • (String)


2153
2154
2155
# File 'generated/google/apis/content_v2/classes.rb', line 2153

def delivery_guarantee_date
  @delivery_guarantee_date
end

#delivery_guarantee_hourFixnum

Hour of the day in the delivery location's timezone on the guaranteed delivery date by which the order has to arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present. Corresponds to the JSON property deliveryGuaranteeHour

Returns:

  • (Fixnum)


2160
2161
2162
# File 'generated/google/apis/content_v2/classes.rb', line 2160

def delivery_guarantee_hour
  @delivery_guarantee_hour
end

#idString

Unique identifier for the holiday to be used when configuring holiday cutoffs. Always present. Corresponds to the JSON property id

Returns:

  • (String)


2166
2167
2168
# File 'generated/google/apis/content_v2/classes.rb', line 2166

def id
  @id
end

#typeString

The holiday type. Always present. Corresponds to the JSON property type

Returns:

  • (String)


2171
2172
2173
# File 'generated/google/apis/content_v2/classes.rb', line 2171

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2178
2179
2180
2181
2182
2183
2184
2185
# File 'generated/google/apis/content_v2/classes.rb', line 2178

def update!(**args)
  @country_code = args[:country_code] if args.key?(:country_code)
  @date = args[:date] if args.key?(:date)
  @delivery_guarantee_date = args[:delivery_guarantee_date] if args.key?(:delivery_guarantee_date)
  @delivery_guarantee_hour = args[:delivery_guarantee_hour] if args.key?(:delivery_guarantee_hour)
  @id = args[:id] if args.key?(:id)
  @type = args[:type] if args.key?(:type)
end