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.



6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
# File 'lib/models/porcelain.rb', line 6354

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

Instance Attribute Details

#metaObject

Reserved for future use.



6348
6349
6350
# File 'lib/models/porcelain.rb', line 6348

def meta
  @meta
end

#rate_limitObject

Rate limit information.



6350
6351
6352
# File 'lib/models/porcelain.rb', line 6350

def rate_limit
  @rate_limit
end

#roleObject

The created Role.



6352
6353
6354
# File 'lib/models/porcelain.rb', line 6352

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6370
6371
6372
6373
6374
6375
6376
# File 'lib/models/porcelain.rb', line 6370

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