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.
12633 12634 12635 12636 12637 12638 12639 12640 12641 |
# File 'lib/models/porcelain.rb', line 12633 def initialize( meta: nil, policy: nil, rate_limit: nil ) = == 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.
12627 12628 12629 |
# File 'lib/models/porcelain.rb', line 12627 def end |
#policy ⇒ Object
The requested Policy.
12629 12630 12631 |
# File 'lib/models/porcelain.rb', line 12629 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
12631 12632 12633 |
# File 'lib/models/porcelain.rb', line 12631 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
12643 12644 12645 12646 12647 12648 12649 |
# File 'lib/models/porcelain.rb', line 12643 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 |