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.
13952 13953 13954 13955 13956 13957 13958 13959 13960 |
# File 'lib/models/porcelain.rb', line 13952 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.
13946 13947 13948 |
# File 'lib/models/porcelain.rb', line 13946 def @meta end |
#policy ⇒ Object
The requested Policy.
13948 13949 13950 |
# File 'lib/models/porcelain.rb', line 13948 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
13950 13951 13952 |
# File 'lib/models/porcelain.rb', line 13950 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
13962 13963 13964 13965 13966 13967 13968 |
# File 'lib/models/porcelain.rb', line 13962 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 |