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.
8849 8850 8851 8852 8853 8854 8855 8856 8857 |
# File 'lib/models/porcelain.rb', line 8849 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.
8843 8844 8845 |
# File 'lib/models/porcelain.rb', line 8843 def @meta end |
#policy ⇒ Object
The requested Policy.
8845 8846 8847 |
# File 'lib/models/porcelain.rb', line 8845 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
8847 8848 8849 |
# File 'lib/models/porcelain.rb', line 8847 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8859 8860 8861 8862 8863 8864 8865 |
# File 'lib/models/porcelain.rb', line 8859 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 |