class Io::Flow::V0::Models::OptinResponseType
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22870 def OptinResponseType.ALL @@all ||= [OptinResponseType.not_shown, OptinResponseType.opted_in, OptinResponseType.opted_out] end
apply(value)
click to toggle source
Returns the instance of OptinResponseType
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 22855 def OptinResponseType.apply(value) if value.instance_of?(OptinResponseType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OptinResponseType.new(value)) end end
from_string(value)
click to toggle source
Returns the instance of OptinResponseType
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 22865 def OptinResponseType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OptinResponseType.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22850 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
not_shown()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22874 def OptinResponseType.not_shown @@_not_shown ||= OptinResponseType.new('not_shown') end
opted_in()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22878 def OptinResponseType.opted_in @@_opted_in ||= OptinResponseType.new('opted_in') end
opted_out()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22882 def OptinResponseType.opted_out @@_opted_out ||= OptinResponseType.new('opted_out') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22886 def to_hash value end