Class: Io::Flow::V0::Models::FraudEmailRuleDecision
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FraudEmailRuleDecision
- 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 FraudEmailRuleDecision for this value, creating a new instance for an unknown value.
-
.approved ⇒ Object
Approve all orders matching the customers email address.
-
.declined ⇒ Object
Decline all orders matching the customers email address.
-
.from_string(value) ⇒ Object
Returns the instance of FraudEmailRuleDecision for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ FraudEmailRuleDecision
constructor
A new instance of FraudEmailRuleDecision.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FraudEmailRuleDecision
Returns a new instance of FraudEmailRuleDecision.
14575 14576 14577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14575 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14573 14574 14575 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14573 def value @value end |
Class Method Details
.ALL ⇒ Object
14595 14596 14597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14595 def FraudEmailRuleDecision.ALL @@all ||= [FraudEmailRuleDecision.approved, FraudEmailRuleDecision.declined] end |
.apply(value) ⇒ Object
Returns the instance of FraudEmailRuleDecision for this value, creating a new instance for an unknown value
14580 14581 14582 14583 14584 14585 14586 14587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14580 def FraudEmailRuleDecision.apply(value) if value.instance_of?(FraudEmailRuleDecision) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FraudEmailRuleDecision.new(value)) end end |
.approved ⇒ Object
Approve all orders matching the customers email address.
14600 14601 14602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14600 def FraudEmailRuleDecision.approved @@_approved ||= FraudEmailRuleDecision.new('approved') end |
.declined ⇒ Object
Decline all orders matching the customers email address.
14605 14606 14607 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14605 def FraudEmailRuleDecision.declined @@_declined ||= FraudEmailRuleDecision.new('declined') end |
.from_string(value) ⇒ Object
Returns the instance of FraudEmailRuleDecision for this value, or nil if not found
14590 14591 14592 14593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14590 def FraudEmailRuleDecision.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FraudEmailRuleDecision.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
14609 14610 14611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14609 def to_hash value end |