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.



5858
5859
5860
5861
5862
5863
5864
5865
5866
# File 'lib/models/porcelain.rb', line 5858

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.



5852
5853
5854
# File 'lib/models/porcelain.rb', line 5852

def meta
  @meta
end

#rate_limitObject

Rate limit information.



5854
5855
5856
# File 'lib/models/porcelain.rb', line 5854

def rate_limit
  @rate_limit
end

#roleObject

The updated Role.



5856
5857
5858
# File 'lib/models/porcelain.rb', line 5856

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5868
5869
5870
5871
5872
5873
5874
# File 'lib/models/porcelain.rb', line 5868

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