Class: SDM::PolicyUpdateResponse

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

Overview

PolicyUpdateResponse returns the fields of a Policy after it has been updated by a PolicyUpdateRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of PolicyUpdateResponse.



14080
14081
14082
14083
14084
14085
14086
# File 'lib/models/porcelain.rb', line 14080

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 updated Policy.



14076
14077
14078
# File 'lib/models/porcelain.rb', line 14076

def policy
  @policy
end

#rate_limit ⇒ Object

Rate limit information.



14078
14079
14080
# File 'lib/models/porcelain.rb', line 14078

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



14088
14089
14090
14091
14092
14093
14094
# File 'lib/models/porcelain.rb', line 14088

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