Class: SDM::PolicyGetResponse
- Inherits:
-
Object
- Object
- SDM::PolicyGetResponse
- Defined in:
- lib/models/porcelain.rb
Overview
PolicyGetResponse returns a requested Policy.
Instance Attribute Summary collapse
-
#meta ⇒ Object
Reserved for future use.
-
#policy ⇒ Object
The requested Policy.
-
#rate_limit ⇒ Object
Rate limit information.
Instance Method Summary collapse
-
#initialize(meta: nil, policy: nil, rate_limit: nil) ⇒ PolicyGetResponse
constructor
A new instance of PolicyGetResponse.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(meta: nil, policy: nil, rate_limit: nil) ⇒ PolicyGetResponse
Returns a new instance of PolicyGetResponse.
11035 11036 11037 11038 11039 11040 11041 11042 11043 |
# File 'lib/models/porcelain.rb', line 11035 def initialize( meta: nil, policy: nil, rate_limit: nil ) @meta = == nil ? nil : @policy = policy == nil ? nil : policy @rate_limit = rate_limit == nil ? nil : rate_limit end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
11029 11030 11031 |
# File 'lib/models/porcelain.rb', line 11029 def @meta end |
#policy ⇒ Object
The requested Policy.
11031 11032 11033 |
# File 'lib/models/porcelain.rb', line 11031 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
11033 11034 11035 |
# File 'lib/models/porcelain.rb', line 11033 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
11045 11046 11047 11048 11049 11050 11051 |
# File 'lib/models/porcelain.rb', line 11045 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |