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.
9374 9375 9376 9377 9378 9379 9380 9381 9382 |
# File 'lib/models/porcelain.rb', line 9374 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.
9368 9369 9370 |
# File 'lib/models/porcelain.rb', line 9368 def @meta end |
#policy ⇒ Object
The requested Policy.
9370 9371 9372 |
# File 'lib/models/porcelain.rb', line 9370 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
9372 9373 9374 |
# File 'lib/models/porcelain.rb', line 9372 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9384 9385 9386 9387 9388 9389 9390 |
# File 'lib/models/porcelain.rb', line 9384 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 |