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.
9521 9522 9523 9524 9525 9526 9527 9528 9529 |
# File 'lib/models/porcelain.rb', line 9521 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.
9515 9516 9517 |
# File 'lib/models/porcelain.rb', line 9515 def @meta end |
#policy ⇒ Object
The requested Policy.
9517 9518 9519 |
# File 'lib/models/porcelain.rb', line 9517 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
9519 9520 9521 |
# File 'lib/models/porcelain.rb', line 9519 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9531 9532 9533 9534 9535 9536 9537 |
# File 'lib/models/porcelain.rb', line 9531 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 |