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.
10781 10782 10783 10784 10785 10786 10787 10788 10789 |
# File 'lib/models/porcelain.rb', line 10781 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.
10775 10776 10777 |
# File 'lib/models/porcelain.rb', line 10775 def @meta end |
#policy ⇒ Object
The requested Policy.
10777 10778 10779 |
# File 'lib/models/porcelain.rb', line 10777 def policy @policy end |
#rate_limit ⇒ Object
Rate limit information.
10779 10780 10781 |
# File 'lib/models/porcelain.rb', line 10779 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
10791 10792 10793 10794 10795 10796 10797 |
# File 'lib/models/porcelain.rb', line 10791 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 |