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.



4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
# File 'lib/models/porcelain.rb', line 4806

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.



4801
4802
4803
# File 'lib/models/porcelain.rb', line 4801

def meta
  @meta
end

#rate_limitObject

Rate limit information.



4805
4806
4807
# File 'lib/models/porcelain.rb', line 4805

def rate_limit
  @rate_limit
end

#roleObject

The created Role.



4803
4804
4805
# File 'lib/models/porcelain.rb', line 4803

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



4823
4824
4825
4826
4827
4828
4829
# File 'lib/models/porcelain.rb', line 4823

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