Class: Io::Flow::V0::Models::PermissionAudit
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PermissionAudit
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Returns all known permissions, along with their authorization technique and all of the roles which contain them.
Instance Attribute Summary collapse
-
#behaviors ⇒ Object
readonly
Returns the value of attribute behaviors.
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PermissionAudit
constructor
A new instance of PermissionAudit.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PermissionAudit
Returns a new instance of PermissionAudit.
59558 59559 59560 59561 59562 59563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59558 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:routes, :behaviors], 'PermissionAudit') @routes = HttpClient::Preconditions.assert_class('routes', opts.delete(:routes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::RouteAudit) ? x : ::Io::Flow::V0::Models::RouteAudit.new(x)) } @behaviors = HttpClient::Preconditions.assert_class('behaviors', opts.delete(:behaviors), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::BehaviorAudit) ? x : ::Io::Flow::V0::Models::BehaviorAudit.new(x)) } end |
Instance Attribute Details
#behaviors ⇒ Object (readonly)
Returns the value of attribute behaviors.
59556 59557 59558 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59556 def behaviors @behaviors end |
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
59556 59557 59558 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59556 def routes @routes end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59569 59570 59571 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59569 def copy(incoming={}) PermissionAudit.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
59573 59574 59575 59576 59577 59578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59573 def to_hash { :routes => routes.map { |o| o.to_hash }, :behaviors => behaviors.map { |o| o.to_hash } } end |
#to_json ⇒ Object
59565 59566 59567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59565 def to_json JSON.dump(to_hash) end |