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.



20259
20260
20261
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20259

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20257
20258
20259
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20257

def value
  @value
end

Class Method Details

.ALLObject



20279
20280
20281
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20279

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



20264
20265
20266
20267
20268
20269
20270
20271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20264

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



20287
20288
20289
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20287

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

.enabledObject



20283
20284
20285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20283

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



20274
20275
20276
20277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20274

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



20291
20292
20293
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20291

def to_hash
  value
end