Class: Io::Flow::V0::Models::ThreeDSecureCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ThreeDSecureCode
- 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 ThreeDSecureCode for this value, creating a new instance for an unknown value.
- .failed ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ThreeDSecureCode for this value, or nil if not found.
- .not_verified ⇒ Object
- .verified ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ThreeDSecureCode
constructor
A new instance of ThreeDSecureCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ThreeDSecureCode
Returns a new instance of ThreeDSecureCode.
20108 20109 20110 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20108 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20106 20107 20108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20106 def value @value end |
Class Method Details
.ALL ⇒ Object
20128 20129 20130 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20128 def ThreeDSecureCode.ALL @@all ||= [ThreeDSecureCode.verified, ThreeDSecureCode.not_verified, ThreeDSecureCode.failed] end |
.apply(value) ⇒ Object
Returns the instance of ThreeDSecureCode for this value, creating a new instance for an unknown value
20113 20114 20115 20116 20117 20118 20119 20120 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20113 def ThreeDSecureCode.apply(value) if value.instance_of?(ThreeDSecureCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ThreeDSecureCode.new(value)) end end |
.failed ⇒ Object
20140 20141 20142 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20140 def ThreeDSecureCode.failed @@_failed ||= ThreeDSecureCode.new('failed') end |
.from_string(value) ⇒ Object
Returns the instance of ThreeDSecureCode for this value, or nil if not found
20123 20124 20125 20126 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20123 def ThreeDSecureCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ThreeDSecureCode.ALL.find { |v| v.value == value } end |
.not_verified ⇒ Object
20136 20137 20138 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20136 def ThreeDSecureCode.not_verified @@_not_verified ||= ThreeDSecureCode.new('not_verified') end |
.verified ⇒ Object
20132 20133 20134 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20132 def ThreeDSecureCode.verified @@_verified ||= ThreeDSecureCode.new('verified') end |
Instance Method Details
#to_hash ⇒ Object
20144 20145 20146 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20144 def to_hash value end |