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.
8297 8298 8299 8300 8301 8302 8303 8304 8305 |
# File 'lib/models/porcelain.rb', line 8297 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.
8291 8292 8293 |
# File 'lib/models/porcelain.rb', line 8291 def @meta end |
#policy ⇒ Object
The requested Policy.
8293 8294 8295 |
# File 'lib/models/porcelain.rb', line 8293 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
8295 8296 8297 |
# File 'lib/models/porcelain.rb', line 8295 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8307 8308 8309 8310 8311 8312 8313 |
# File 'lib/models/porcelain.rb', line 8307 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 |