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.
18552 18553 18554 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18552 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18550 18551 18552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18550 def value @value end |
Class Method Details
.ALL ⇒ Object
18572 18573 18574 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18572 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
18557 18558 18559 18560 18561 18562 18563 18564 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18557 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.
18582 18583 18584 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18582 def FraudStatus.approved @@_approved ||= FraudStatus.new('approved') end |
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
18587 18588 18589 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18587 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
18567 18568 18569 18570 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18567 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’.
18577 18578 18579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18577 def FraudStatus.pending @@_pending ||= FraudStatus.new('pending') end |
.review ⇒ Object
Indicates the fraud check decision from the fraud providing service is being reviewed.
18593 18594 18595 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18593 def FraudStatus.review @@_review ||= FraudStatus.new('review') end |
Instance Method Details
#to_hash ⇒ Object
18597 18598 18599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18597 def to_hash value end |