Class: SDM::PolicyCreateResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

PolicyCreateResponse reports how the Policy was created in the system.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy: nil, rate_limit: nil) ⇒ PolicyCreateResponse

Returns a new instance of PolicyCreateResponse.



13906
13907
13908
13909
13910
13911
13912
# File 'lib/models/porcelain.rb', line 13906

def initialize(
  policy: nil,
  rate_limit: nil
)
  @policy = policy == nil ? nil : policy
  @rate_limit = rate_limit == nil ? nil : rate_limit
end

Instance Attribute Details

#policy ⇒ Object

The created Policy.



13902
13903
13904
# File 'lib/models/porcelain.rb', line 13902

def policy
  @policy
end

#rate_limit ⇒ Object

Rate limit information.



13904
13905
13906
# File 'lib/models/porcelain.rb', line 13904

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



13914
13915
13916
13917
13918
13919
13920
# File 'lib/models/porcelain.rb', line 13914

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end