Class: Io::Flow::V0::Models::RouteAudit
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RouteAudit
- 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.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RouteAudit
constructor
A new instance of RouteAudit.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RouteAudit
Returns a new instance of RouteAudit.
39360 39361 39362 39363 39364 39365 39366 39367 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39360 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.from_json(x)) } end |
Instance Attribute Details
#authentication_techniques ⇒ Object (readonly)
Returns the value of attribute authentication_techniques.
39358 39359 39360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39358 def authentication_techniques @authentication_techniques end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
39358 39359 39360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39358 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
39358 39359 39360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39358 def path @path end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
39358 39359 39360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39358 def roles @roles end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
39373 39374 39375 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39373 def copy(incoming={}) RouteAudit.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
39377 39378 39379 39380 39381 39382 39383 39384 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39377 def to_hash { :method => method.value, :path => path, :authentication_techniques => authentication_techniques.map { |o| o.value }, :roles => roles.map { |o| o.to_hash } } end |
#to_json ⇒ Object
39369 39370 39371 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39369 def to_json JSON.dump(to_hash) end |