Class: SDM::RoleCreateResponse

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

Overview

RoleCreateResponse reports how the Roles were created in the system. It can communicate partial successes or failures.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of RoleCreateResponse.



14275
14276
14277
14278
14279
14280
14281
14282
14283
# File 'lib/models/porcelain.rb', line 14275

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.



14269
14270
14271
# File 'lib/models/porcelain.rb', line 14269

def meta
  @meta
end

#rate_limitObject

Rate limit information.



14271
14272
14273
# File 'lib/models/porcelain.rb', line 14271

def rate_limit
  @rate_limit
end

#roleObject

The created Role.



14273
14274
14275
# File 'lib/models/porcelain.rb', line 14273

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



14285
14286
14287
14288
14289
14290
14291
# File 'lib/models/porcelain.rb', line 14285

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