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
Flow takes any fraud liability for the order.
-
.from_string(value) ⇒ Object
Returns the instance of FraudLiability for this value, or nil if not found.
-
.organization ⇒ Object
The merchant takes any fraud liability for the order.
Instance Method Summary collapse
-
#initialize(value) ⇒ FraudLiability
constructor
A new instance of FraudLiability.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FraudLiability
14619 14620 14621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14619 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14617 14618 14619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14617 def value @value end |
Class Method Details
.ALL ⇒ Object
14639 14640 14641 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14639 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
14624 14625 14626 14627 14628 14629 14630 14631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14624 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
Flow takes any fraud liability for the order.
14644 14645 14646 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14644 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
14634 14635 14636 14637 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14634 def FraudLiability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FraudLiability.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
The merchant takes any fraud liability for the order.
14649 14650 14651 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14649 def FraudLiability.organization @@_organization ||= FraudLiability.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
14653 14654 14655 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14653 def to_hash value end |