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.
15751 15752 15753 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15751 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15749 15750 15751 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15749 def value @value end |
Class Method Details
.ALL ⇒ Object
15771 15772 15773 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15771 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
15756 15757 15758 15759 15760 15761 15762 15763 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15756 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.
15781 15782 15783 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15781 def FraudStatus.approved @@_approved ||= FraudStatus.new('approved') end |
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
15786 15787 15788 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15786 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
15766 15767 15768 15769 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15766 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’.
15776 15777 15778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15776 def FraudStatus.pending @@_pending ||= FraudStatus.new('pending') end |
.review ⇒ Object
Indicates the fraud check decision from the fraud providing service is being reviewed.
15792 15793 15794 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15792 def FraudStatus.review @@_review ||= FraudStatus.new('review') end |
Instance Method Details
#to_hash ⇒ Object
15796 15797 15798 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15796 def to_hash value end |