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, role: nil, rate_limit: nil) ⇒ RoleCreateResponse

Returns a new instance of RoleCreateResponse.



5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
# File 'lib/models/porcelain.rb', line 5234

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

Instance Attribute Details

#metaObject

Reserved for future use.



5228
5229
5230
# File 'lib/models/porcelain.rb', line 5228

def meta
  @meta
end

#rate_limitObject

Rate limit information.



5232
5233
5234
# File 'lib/models/porcelain.rb', line 5232

def rate_limit
  @rate_limit
end

#roleObject

The created Role.



5230
5231
5232
# File 'lib/models/porcelain.rb', line 5230

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5250
5251
5252
5253
5254
5255
5256
# File 'lib/models/porcelain.rb', line 5250

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