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.



10919
10920
10921
10922
10923
10924
10925
10926
10927
# File 'lib/models/porcelain.rb', line 10919

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.



10913
10914
10915
# File 'lib/models/porcelain.rb', line 10913

def meta
  @meta
end

#rate_limitObject

Rate limit information.



10915
10916
10917
# File 'lib/models/porcelain.rb', line 10915

def rate_limit
  @rate_limit
end

#roleObject

The updated Role.



10917
10918
10919
# File 'lib/models/porcelain.rb', line 10917

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10929
10930
10931
10932
10933
10934
10935
# File 'lib/models/porcelain.rb', line 10929

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