Class: Io::Flow::V0::Models::BehaviorAudit
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::BehaviorAudit
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#authentication_techniques ⇒ Object
readonly
Returns the value of attribute authentication_techniques.
-
#behavior ⇒ Object
readonly
Returns the value of attribute behavior.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ BehaviorAudit
constructor
A new instance of BehaviorAudit.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ BehaviorAudit
Returns a new instance of BehaviorAudit.
24397 24398 24399 24400 24401 24402 24403 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24397 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:behavior, :authentication_techniques, :roles], 'BehaviorAudit') @behavior = (x = opts.delete(:behavior); x.is_a?(::Io::Flow::V0::Models::FlowBehavior) ? x : ::Io::Flow::V0::Models::FlowBehavior.apply(x)) @authentication_techniques = HttpClient::Preconditions.assert_class('authentication_techniques', opts.delete(:authentication_techniques), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthenticationTechnique) ? x : ::Io::Flow::V0::Models::AuthenticationTechnique.apply(x)) } @roles = HttpClient::Preconditions.assert_class('roles', opts.delete(:roles), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FlowRole) ? x : ::Io::Flow::V0::Models::FlowRole.apply(x)) } end |
Instance Attribute Details
#authentication_techniques ⇒ Object (readonly)
Returns the value of attribute authentication_techniques.
24395 24396 24397 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24395 def authentication_techniques @authentication_techniques end |
#behavior ⇒ Object (readonly)
Returns the value of attribute behavior.
24395 24396 24397 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24395 def behavior @behavior end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
24395 24396 24397 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24395 def roles @roles end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
24409 24410 24411 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24409 def copy(incoming={}) BehaviorAudit.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
24413 24414 24415 24416 24417 24418 24419 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24413 def to_hash { :behavior => behavior.value, :authentication_techniques => authentication_techniques.map { |o| o.value }, :roles => roles.map { |o| o.value } } end |
#to_json ⇒ Object
24405 24406 24407 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24405 def to_json JSON.dump(to_hash) end |