Class: Io::Flow::V0::Models::ExperienceCountryStatus

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) ⇒ ExperienceCountryStatus

Returns a new instance of ExperienceCountryStatus.



18070
18071
18072
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18070

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18068
18069
18070
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18068

def value
  @value
end

Class Method Details

.ALLObject



18090
18091
18092
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18090

def ExperienceCountryStatus.ALL
  @@all ||= [ExperienceCountryStatus.enabled, ExperienceCountryStatus.disabled]
end

.apply(value) ⇒ Object

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



18075
18076
18077
18078
18079
18080
18081
18082
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18075

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

.disabledObject



18098
18099
18100
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18098

def ExperienceCountryStatus.disabled
  @@_disabled ||= ExperienceCountryStatus.new('disabled')
end

.enabledObject



18094
18095
18096
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18094

def ExperienceCountryStatus.enabled
  @@_enabled ||= ExperienceCountryStatus.new('enabled')
end

.from_string(value) ⇒ Object

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



18085
18086
18087
18088
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18085

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

Instance Method Details

#to_hashObject



18102
18103
18104
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18102

def to_hash
  value
end