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.
8862 8863 8864 8865 8866 8867 8868 8869 8870 |
# File 'lib/models/porcelain.rb', line 8862 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.
8856 8857 8858 |
# File 'lib/models/porcelain.rb', line 8856 def @meta end |
#policy ⇒ Object
The requested Policy.
8858 8859 8860 |
# File 'lib/models/porcelain.rb', line 8858 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
8860 8861 8862 |
# File 'lib/models/porcelain.rb', line 8860 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8872 8873 8874 8875 8876 8877 8878 |
# File 'lib/models/porcelain.rb', line 8872 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 |