Class: Io::Flow::V0::Models::FraudStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FraudStatus
- 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 FraudStatus for this value, creating a new instance for an unknown value.
-
.approved ⇒ Object
Fraud check has passed and the order is approved.
-
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
-
.from_string(value) ⇒ Object
Returns the instance of FraudStatus for this value, or nil if not found.
-
.pending ⇒ Object
If an immediate response is not available, the state will be ‘pending’.
-
.review ⇒ Object
Indicates the fraud check decision from the fraud providing service is being reviewed.
Instance Method Summary collapse
-
#initialize(value) ⇒ FraudStatus
constructor
A new instance of FraudStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FraudStatus
Returns a new instance of FraudStatus.
12974 12975 12976 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12974 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
12972 12973 12974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12972 def value @value end |
Class Method Details
.ALL ⇒ Object
12994 12995 12996 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12994 def FraudStatus.ALL @@all ||= [FraudStatus.pending, FraudStatus.approved, FraudStatus.declined, FraudStatus.review] end |
.apply(value) ⇒ Object
Returns the instance of FraudStatus for this value, creating a new instance for an unknown value
12979 12980 12981 12982 12983 12984 12985 12986 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12979 def FraudStatus.apply(value) if value.instance_of?(FraudStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FraudStatus.new(value)) end end |
.approved ⇒ Object
Fraud check has passed and the order is approved.
13004 13005 13006 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13004 def FraudStatus.approved @@_approved ||= FraudStatus.new('approved') end |
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
13009 13010 13011 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13009 def FraudStatus.declined @@_declined ||= FraudStatus.new('declined') end |
.from_string(value) ⇒ Object
Returns the instance of FraudStatus for this value, or nil if not found
12989 12990 12991 12992 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12989 def FraudStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FraudStatus.ALL.find { |v| v.value == value } end |
.pending ⇒ Object
If an immediate response is not available, the state will be ‘pending’.
12999 13000 13001 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12999 def FraudStatus.pending @@_pending ||= FraudStatus.new('pending') end |
.review ⇒ Object
Indicates the fraud check decision from the fraud providing service is being reviewed.
13015 13016 13017 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13015 def FraudStatus.review @@_review ||= FraudStatus.new('review') end |
Instance Method Details
#to_hash ⇒ Object
13019 13020 13021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13019 def to_hash value end |