class Io::Flow::V0::Models::BehaviorAudit
Attributes
authentication_techniques[R]
behavior[R]
roles[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32241 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
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32253 def copy(incoming={}) BehaviorAudit.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32257 def to_hash { :behavior => behavior.value, :authentication_techniques => authentication_techniques.map { |o| o.value }, :roles => roles.map { |o| o.value } } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32249 def to_json JSON.dump(to_hash) end