class Io::Flow::V0::Models::RouteAudit
Attributes
authentication_techniques[R]
method[R]
path[R]
roles[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 64905 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:method, :path, :authentication_techniques, :roles], 'RouteAudit') @method = (x = opts.delete(:method); x.is_a?(::Io::Flow::V0::Models::PermittedHttpMethod) ? x : ::Io::Flow::V0::Models::PermittedHttpMethod.apply(x)) @path = HttpClient::Preconditions.assert_class('path', opts.delete(:path), String) @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 64918 def copy(incoming={}) RouteAudit.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 64922 def to_hash { :method => method.value, :path => path, :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 64914 def to_json JSON.dump(to_hash) end