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.
11972 11973 11974 11975 11976 11977 11978 11979 11980 |
# File 'lib/models/porcelain.rb', line 11972 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.
11966 11967 11968 |
# File 'lib/models/porcelain.rb', line 11966 def @meta end |
#policy ⇒ Object
The requested Policy.
11968 11969 11970 |
# File 'lib/models/porcelain.rb', line 11968 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
11970 11971 11972 |
# File 'lib/models/porcelain.rb', line 11970 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
11982 11983 11984 11985 11986 11987 11988 |
# File 'lib/models/porcelain.rb', line 11982 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 |