Class: Io::Flow::V0::Models::TokenRbacAuthenticationForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TokenRbacAuthenticationForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Used to authenticate a given token with RBAC checks.
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#path_pattern ⇒ Object
readonly
Returns the value of attribute path_pattern.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ TokenRbacAuthenticationForm
constructor
A new instance of TokenRbacAuthenticationForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ TokenRbacAuthenticationForm
Returns a new instance of TokenRbacAuthenticationForm.
71179 71180 71181 71182 71183 71184 71185 71186 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71179 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:token, :method, :path_pattern, :path], 'TokenRbacAuthenticationForm') @token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String) @method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String) @path_pattern = HttpClient::Preconditions.assert_class('path_pattern', opts.delete(:path_pattern), String) @path = HttpClient::Preconditions.assert_class('path', opts.delete(:path), String) end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
71177 71178 71179 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71177 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
71177 71178 71179 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71177 def path @path end |
#path_pattern ⇒ Object (readonly)
Returns the value of attribute path_pattern.
71177 71178 71179 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71177 def path_pattern @path_pattern end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
71177 71178 71179 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71177 def token @token end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
71192 71193 71194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71192 def copy(incoming={}) TokenRbacAuthenticationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
71196 71197 71198 71199 71200 71201 71202 71203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71196 def to_hash { :token => token, :method => method, :path_pattern => path_pattern, :path => path } end |
#to_json ⇒ Object
71188 71189 71190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71188 def to_json JSON.dump(to_hash) end |