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.
19696 19697 19698 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19696 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19694 19695 19696 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19694 def value @value end |
Class Method Details
.ALL ⇒ Object
19716 19717 19718 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19716 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
19701 19702 19703 19704 19705 19706 19707 19708 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19701 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
19728 19729 19730 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19728 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
19711 19712 19713 19714 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19711 def ThreeDSecureCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ThreeDSecureCode.ALL.find { |v| v.value == value } end |
.not_verified ⇒ Object
19724 19725 19726 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19724 def ThreeDSecureCode.not_verified @@_not_verified ||= ThreeDSecureCode.new('not_verified') end |
.verified ⇒ Object
19720 19721 19722 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19720 def ThreeDSecureCode.verified @@_verified ||= ThreeDSecureCode.new('verified') end |
Instance Method Details
#to_hash ⇒ Object
19732 19733 19734 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19732 def to_hash value end |