Class: Io::Flow::V0::Models::ScheduleExceptionStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ScheduleExceptionStatus

Returns a new instance of ScheduleExceptionStatus.



10789
10790
10791
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10789

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



10787
10788
10789
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10787

def value
  @value
end

Class Method Details

.ALLObject



10809
10810
10811
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10809

def ScheduleExceptionStatus.ALL
  @@all ||= [ScheduleExceptionStatus.open, ScheduleExceptionStatus.closed]
end

.apply(value) ⇒ Object

Returns the instance of ScheduleExceptionStatus for this value, creating a new instance for an unknown value



10794
10795
10796
10797
10798
10799
10800
10801
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10794

def ScheduleExceptionStatus.apply(value)
  if value.instance_of?(ScheduleExceptionStatus)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ScheduleExceptionStatus.new(value))
  end
end

.closedObject



10817
10818
10819
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10817

def ScheduleExceptionStatus.closed
  @@_closed ||= ScheduleExceptionStatus.new('Closed')
end

.from_string(value) ⇒ Object

Returns the instance of ScheduleExceptionStatus for this value, or nil if not found



10804
10805
10806
10807
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10804

def ScheduleExceptionStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ScheduleExceptionStatus.ALL.find { |v| v.value == value }
end

.openObject



10813
10814
10815
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10813

def ScheduleExceptionStatus.open
  @@_open ||= ScheduleExceptionStatus.new('Open')
end

Instance Method Details

#to_hashObject



10821
10822
10823
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10821

def to_hash
  value
end