Class: UU::OS::Friend::FriendCreate

Inherits:
REST::DTO
  • Object
show all
Defined in:
uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from REST::DTO

#initialize, #to_hash, #to_json

Constructor Details

This class inherits a constructor from UU::OS::REST::DTO

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class UU::OS::REST::DTO

Instance Attribute Details

- (Object) code

Code of the new friend. If nil is set, the code is generated automatically using the system sequence. The code must be unique in the given territory, otherwise the create command fails.



30
31
32
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 30

def code
  @code
end

- (Object) description

Description of the new friend. If nil is set, tDescription from meta artifact is used if set, otherwise no description is set on the new friend.



34
35
36
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 34

def description
  @description
end

- (Object) first_name

First name of the new friend. If nil is set, the value is used from friend's personal role (but if nil is set and the attribute surname is not nil, the command fails).



21
22
23
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 21

def first_name
  @first_name
end

- (Object) icon_uri

URI of the friend's icon. If nil is set, the friend uses icon from meta artifact.

Examples:

Allowed format UESURI of icon:

ues:#{system}:#{ues_v5.core_v1.codetable_v1.base_v1.CodeTable_Icons}:#{CODE_OF_ICON}

For example:

ues:#{system}:#{ues_v5.core_v1.codetable_v1.base_v1.CodeTable_Icons}:#{ART_077}


46
47
48
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 46

def icon_uri
  @icon_uri
end

- (Object) message

Personal message for the friend. The message is used in friendship confirmation activity.



49
50
51
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 49

def message
  @message
end

- (Object) meta_artifact_uri

UESURI of the meta artifact. Only a meta artifact with the template class of Friend (not its descendants) can be used. If the rights does not permit to create a new friend from the meta artifact, the create command fails.



14
15
16
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 14

def meta_artifact_uri
  @meta_artifact_uri
end

- (Object) security_level

Security level of the new friend. If nil is set, security level is taken from the meta artifact tSecurityLevel. If the meta artifact tSecurityLevel is higher than the user's security clearance, the create command fails.



38
39
40
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 38

def security_level
  @security_level
end

- (Object) surname

Surname of the new friend. If nil is set, the value is used from friend's personal role (but if nil is set and the attribute name is not nil, the command fails).



25
26
27
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 25

def surname
  @surname
end

- (Object) universe_id

Universe identifier of the friend. If nil is set, the create command fails.



17
18
19
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 17

def universe_id
  @universe_id
end

Instance Method Details

- (Object) middle_name



81
82
83
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 81

def middle_name
  attributes[:middleName]
end

- (Object) middle_name=(val)



85
86
87
# File 'uu_os_client-0.10.6/lib/uu/os/friend/friend_create.rb', line 85

def middle_name=(val)
  attributes[:middleName] = val
end