Class: Io::Flow::V0::Models::FraudLiability
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FraudLiability
- 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 FraudLiability for this value, creating a new instance for an unknown value.
- .flow ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of FraudLiability for this value, or nil if not found.
- .organization ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ FraudLiability
constructor
A new instance of FraudLiability.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FraudLiability
Returns a new instance of FraudLiability.
12947 12948 12949 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12947 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
12945 12946 12947 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12945 def value @value end |
Class Method Details
.ALL ⇒ Object
12967 12968 12969 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12967 def FraudLiability.ALL @@all ||= [FraudLiability.flow, FraudLiability.organization] end |
.apply(value) ⇒ Object
Returns the instance of FraudLiability for this value, creating a new instance for an unknown value
12952 12953 12954 12955 12956 12957 12958 12959 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12952 def FraudLiability.apply(value) if value.instance_of?(FraudLiability) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FraudLiability.new(value)) end end |
.flow ⇒ Object
12971 12972 12973 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12971 def FraudLiability.flow @@_flow ||= FraudLiability.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of FraudLiability for this value, or nil if not found
12962 12963 12964 12965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12962 def FraudLiability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FraudLiability.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
12975 12976 12977 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12975 def FraudLiability.organization @@_organization ||= FraudLiability.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
12979 12980 12981 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12979 def to_hash value end |