Class: Rafflesia::JoinApproval

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/registry/join_approval.rb

Constant Summary collapse

HASH_ATTRS =
{
  approved_at: :approved_at,
  approved_by: :approved_by,
  evidence_digest: :evidence_digest,
  evidence_id: :evidence_id,
  from: :from,
  id: :id,
  key_variant: :key_variant,
  object: :object,
  organization_id: :organization_id,
  reason: :reason,
  relationship_id: :relationship_id,
  resource_group_id: :resource_group_id,
  status: :status,
  to: :to
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ JoinApproval

Returns a new instance of JoinApproval.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rafflesia/registry/join_approval.rb', line 41

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @approved_at = hash[:approved_at]
  @approved_by = hash[:approved_by]
  @evidence_digest = hash[:evidence_digest]
  @evidence_id = hash[:evidence_id]
  @from = hash[:from] ? Rafflesia::JoinSide.new(hash[:from]) : nil
  @id = hash[:id]
  @key_variant = hash[:key_variant]
  @object = hash[:object]
  @organization_id = hash[:organization_id]
  @reason = hash[:reason]
  @relationship_id = hash[:relationship_id]
  @resource_group_id = hash[:resource_group_id]
  @status = hash[:status]
  @to = hash[:to] ? Rafflesia::JoinSide.new(hash[:to]) : nil
end

Instance Attribute Details

#approved_atObject

Returns the value of attribute approved_at.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def approved_at
  @approved_at
end

#approved_byObject

Returns the value of attribute approved_by.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def approved_by
  @approved_by
end

#evidence_digestObject

Returns the value of attribute evidence_digest.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def evidence_digest
  @evidence_digest
end

#evidence_idObject

Returns the value of attribute evidence_id.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def evidence_id
  @evidence_id
end

#fromObject

Returns the value of attribute from.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def from
  @from
end

#idObject

Returns the value of attribute id.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def id
  @id
end

#key_variantObject

Returns the value of attribute key_variant.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def key_variant
  @key_variant
end

#objectObject

Returns the value of attribute object.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def organization_id
  @organization_id
end

#reasonObject

Returns the value of attribute reason.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def reason
  @reason
end

#relationship_idObject

Returns the value of attribute relationship_id.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def relationship_id
  @relationship_id
end

#resource_group_idObject

Returns the value of attribute resource_group_id.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def resource_group_id
  @resource_group_id
end

#statusObject

Returns the value of attribute status.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def status
  @status
end

#toObject

Returns the value of attribute to.



25
26
27
# File 'lib/rafflesia/registry/join_approval.rb', line 25

def to
  @to
end