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.
16525 16526 16527 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16525 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16523 16524 16525 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16523 def value @value end |
Class Method Details
.ALL ⇒ Object
16545 16546 16547 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16545 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
16530 16531 16532 16533 16534 16535 16536 16537 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16530 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.
16555 16556 16557 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16555 def FraudStatus.approved @@_approved ||= FraudStatus.new('approved') end |
.declined ⇒ Object
Indicates the fraud check has been declined by the fraud providing service.
16560 16561 16562 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16560 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
16540 16541 16542 16543 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16540 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’.
16550 16551 16552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16550 def FraudStatus.pending @@_pending ||= FraudStatus.new('pending') end |
.review ⇒ Object
Indicates the fraud check decision from the fraud providing service is being reviewed.
16566 16567 16568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16566 def FraudStatus.review @@_review ||= FraudStatus.new('review') end |
Instance Method Details
#to_hash ⇒ Object
16570 16571 16572 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16570 def to_hash value end |