Class: Io::Flow::V0::Models::FraudEmailRule
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FraudEmailRule
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
White and black listing
Instance Attribute Summary collapse
-
#decision ⇒ Object
readonly
Returns the value of attribute decision.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FraudEmailRule
constructor
A new instance of FraudEmailRule.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ FraudEmailRule
Returns a new instance of FraudEmailRule.
26030 26031 26032 26033 26034 26035 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26030 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:email, :decision], 'FraudEmailRule') @email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String) @decision = (x = opts.delete(:decision); x.is_a?(::Io::Flow::V0::Models::FraudEmailRuleDecision) ? x : ::Io::Flow::V0::Models::FraudEmailRuleDecision.apply(x)) end |
Instance Attribute Details
#decision ⇒ Object (readonly)
Returns the value of attribute decision.
26028 26029 26030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26028 def decision @decision end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
26028 26029 26030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26028 def email @email end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
26041 26042 26043 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26041 def copy(incoming={}) FraudEmailRule.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
26045 26046 26047 26048 26049 26050 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26045 def to_hash { :email => email, :decision => decision.value } end |
#to_json ⇒ Object
26037 26038 26039 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26037 def to_json JSON.dump(to_hash) end |