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
Rule to apply to enable white-listing and black-listing for an email address.
Instance Attribute Summary collapse
-
#decision ⇒ Object
readonly
Returns the value of attribute decision.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
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.
32771 32772 32773 32774 32775 32776 32777 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32771 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:email, :decision], 'FraudEmailRule') @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String)) @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.
32769 32770 32771 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32769 def decision @decision end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
32769 32770 32771 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32769 def email @email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
32769 32770 32771 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32769 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32783 32784 32785 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32783 def copy(incoming={}) FraudEmailRule.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
32787 32788 32789 32790 32791 32792 32793 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32787 def to_hash { :id => id, :email => email, :decision => decision.value } end |
#to_json ⇒ Object
32779 32780 32781 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32779 def to_json JSON.dump(to_hash) end |