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.
13539 13540 13541 13542 13543 13544 13545 13546 13547 |
# File 'lib/models/porcelain.rb', line 13539 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.
13533 13534 13535 |
# File 'lib/models/porcelain.rb', line 13533 def @meta end |
#policy ⇒ Object
The requested Policy.
13535 13536 13537 |
# File 'lib/models/porcelain.rb', line 13535 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
13537 13538 13539 |
# File 'lib/models/porcelain.rb', line 13537 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
13549 13550 13551 13552 13553 13554 13555 |
# File 'lib/models/porcelain.rb', line 13549 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 |