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



5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
# File 'lib/models/porcelain.rb', line 5588

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.



5582
5583
5584
# File 'lib/models/porcelain.rb', line 5582

def meta
  @meta
end

#rate_limitObject

Rate limit information.



5584
5585
5586
# File 'lib/models/porcelain.rb', line 5584

def rate_limit
  @rate_limit
end

#roleObject

The created Role.



5586
5587
5588
# File 'lib/models/porcelain.rb', line 5586

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5604
5605
5606
5607
5608
5609
5610
# File 'lib/models/porcelain.rb', line 5604

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