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’.
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.
9881 9882 9883 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9881 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
9879 9880 9881 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9879 def value @value end |
Class Method Details
.ALL ⇒ Object
9901 9902 9903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9901 def FraudStatus.ALL @@all ||= [FraudStatus.pending, FraudStatus.approved, FraudStatus.declined] end |
.apply(value) ⇒ Object
Returns the instance of FraudStatus for this value, creating a new instance for an unknown value
9886 9887 9888 9889 9890 9891 9892 9893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9886 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.
9911 9912 9913 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9911 def FraudStatus.approved @@_approved ||= FraudStatus.new('approved') end |
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
9916 9917 9918 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9916 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
9896 9897 9898 9899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9896 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’.
9906 9907 9908 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9906 def FraudStatus.pending @@_pending ||= FraudStatus.new('pending') end |
Instance Method Details
#to_hash ⇒ Object
9920 9921 9922 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9920 def to_hash value end |