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.
11532 11533 11534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11532 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
11530 11531 11532 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11530 def value @value end |
Class Method Details
.ALL ⇒ Object
11552 11553 11554 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11552 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
11537 11538 11539 11540 11541 11542 11543 11544 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11537 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
11556 11557 11558 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11556 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
11547 11548 11549 11550 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11547 def FraudLiability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FraudLiability.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
11560 11561 11562 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11560 def FraudLiability.organization @@_organization ||= FraudLiability.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
11564 11565 11566 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11564 def to_hash value end |