Class: Io::Flow::V0::Models::ExperienceCountryStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperienceCountryStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ExperienceCountryStatus for this value, creating a new instance for an unknown value.
- .disabled ⇒ Object
- .enabled ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ExperienceCountryStatus for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ ExperienceCountryStatus
constructor
A new instance of ExperienceCountryStatus.
- #to_hash ⇒ Object
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
#value ⇒ Object (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
.ALL ⇒ Object
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 |
.disabled ⇒ Object
20287 20288 20289 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20287 def ExperienceCountryStatus.disabled @@_disabled ||= ExperienceCountryStatus.new('disabled') end |
.enabled ⇒ Object
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_hash ⇒ Object
20291 20292 20293 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20291 def to_hash value end |