Class: SDM::RoleUpdateResponse

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

Overview

RoleUpdateResponse returns the fields of a Role after it has been updated by a RoleUpdateRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, rate_limit: nil, role: nil) ⇒ RoleUpdateResponse

Returns a new instance of RoleUpdateResponse.



9980
9981
9982
9983
9984
9985
9986
9987
9988
# File 'lib/models/porcelain.rb', line 9980

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

Instance Attribute Details

#metaObject

Reserved for future use.



9974
9975
9976
# File 'lib/models/porcelain.rb', line 9974

def meta
  @meta
end

#rate_limitObject

Rate limit information.



9976
9977
9978
# File 'lib/models/porcelain.rb', line 9976

def rate_limit
  @rate_limit
end

#roleObject

The updated Role.



9978
9979
9980
# File 'lib/models/porcelain.rb', line 9978

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9990
9991
9992
9993
9994
9995
9996
# File 'lib/models/porcelain.rb', line 9990

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