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.
10859 10860 10861 10862 10863 10864 10865 10866 10867 |
# File 'lib/models/porcelain.rb', line 10859 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.
10853 10854 10855 |
# File 'lib/models/porcelain.rb', line 10853 def @meta end |
#policy ⇒ Object
The requested Policy.
10855 10856 10857 |
# File 'lib/models/porcelain.rb', line 10855 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
10857 10858 10859 |
# File 'lib/models/porcelain.rb', line 10857 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
10869 10870 10871 10872 10873 10874 10875 |
# File 'lib/models/porcelain.rb', line 10869 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 |