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.
15529 15530 15531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15529 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15527 15528 15529 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15527 def value @value end |
Class Method Details
.ALL ⇒ Object
15549 15550 15551 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15549 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
15534 15535 15536 15537 15538 15539 15540 15541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15534 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.
15559 15560 15561 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15559 def FraudStatus.approved @@_approved ||= FraudStatus.new('approved') end |
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
15564 15565 15566 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15564 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
15544 15545 15546 15547 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15544 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’.
15554 15555 15556 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15554 def FraudStatus.pending @@_pending ||= FraudStatus.new('pending') end |
.review ⇒ Object
Indicates the fraud check decision from the fraud providing service is being reviewed.
15570 15571 15572 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15570 def FraudStatus.review @@_review ||= FraudStatus.new('review') end |
Instance Method Details
#to_hash ⇒ Object
15574 15575 15576 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15574 def to_hash value end |