class Io::Flow::V0::Models::Calendar
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17412 def Calendar.ALL @@all ||= [Calendar.weekdays, Calendar.everyday] end
apply(value)
click to toggle source
Returns the instance of Calendar
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 17397 def Calendar.apply(value) if value.instance_of?(Calendar) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || Calendar.new(value)) end end
everyday()
click to toggle source
7 days per week
# File lib/flow_commerce/flow_api_v0_client.rb, line 17422 def Calendar.everyday @@_everyday ||= Calendar.new('everyday') end
from_string(value)
click to toggle source
Returns the instance of Calendar
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 17407 def Calendar.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) Calendar.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17392 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
weekdays()
click to toggle source
Mon - Fri
# File lib/flow_commerce/flow_api_v0_client.rb, line 17417 def Calendar.weekdays @@_weekdays ||= Calendar.new('weekdays') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17426 def to_hash value end