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.



10902
10903
10904
10905
10906
10907
10908
10909
10910
# File 'lib/models/porcelain.rb', line 10902

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.



10896
10897
10898
# File 'lib/models/porcelain.rb', line 10896

def meta
  @meta
end

#rate_limitObject

Rate limit information.



10898
10899
10900
# File 'lib/models/porcelain.rb', line 10898

def rate_limit
  @rate_limit
end

#roleObject

The updated Role.



10900
10901
10902
# File 'lib/models/porcelain.rb', line 10900

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10912
10913
10914
10915
10916
10917
10918
# File 'lib/models/porcelain.rb', line 10912

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