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
permalink #initialize(meta: nil, policy: nil, rate_limit: nil) ⇒ PolicyGetResponse
Returns a new instance of PolicyGetResponse.
9303 9304 9305 9306 9307 9308 9309 9310 9311 |
# File 'lib/models/porcelain.rb', line 9303 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
permalink #meta ⇒ Object
Reserved for future use.
9297 9298 9299 |
# File 'lib/models/porcelain.rb', line 9297 def @meta end |
permalink #policy ⇒ Object
The requested Policy.
9299 9300 9301 |
# File 'lib/models/porcelain.rb', line 9299 def policy @policy end |
permalink #rate_limit ⇒ Object
Rate limit information.
9301 9302 9303 |
# File 'lib/models/porcelain.rb', line 9301 def rate_limit @rate_limit end |
Instance Method Details
permalink #to_json(options = {}) ⇒ Object
[View source]
9313 9314 9315 9316 9317 9318 9319 |
# File 'lib/models/porcelain.rb', line 9313 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 |