class Io::Flow::V0::Models::AvailabilityStatus

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17210
def AvailabilityStatus.ALL
  @@all ||= [AvailabilityStatus.enabled, AvailabilityStatus.disabled]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 17195
def AvailabilityStatus.apply(value)
  if value.instance_of?(AvailabilityStatus)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || AvailabilityStatus.new(value))
  end
end
disabled() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17218
def AvailabilityStatus.disabled
  @@_disabled ||= AvailabilityStatus.new('disabled')
end
enabled() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17214
def AvailabilityStatus.enabled
  @@_enabled ||= AvailabilityStatus.new('enabled')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 17205
def AvailabilityStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  AvailabilityStatus.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17190
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17222
def to_hash
  value
end