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.
9453 9454 9455 9456 9457 9458 9459 9460 9461 |
# File 'lib/models/porcelain.rb', line 9453 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.
9447 9448 9449 |
# File 'lib/models/porcelain.rb', line 9447 def @meta end |
#policy ⇒ Object
The requested Policy.
9449 9450 9451 |
# File 'lib/models/porcelain.rb', line 9449 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
9451 9452 9453 |
# File 'lib/models/porcelain.rb', line 9451 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9463 9464 9465 9466 9467 9468 9469 |
# File 'lib/models/porcelain.rb', line 9463 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 |