10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/rock_rms/resources/attribute.rb', line 10
def create_attribute(
description: nil,
field_type_id:,
entity_type_id:,
key:,
name:,
order: Random.rand(100..1000)
)
options = {
'FieldTypeId' => field_type_id,
'EntityTypeId' => entity_type_id,
'Key' => key,
'Name' => name,
'Description' => description,
'Order' => order,
'IsSystem' => false,
'IsGridColumn' => false,
'IsMultiValue' => false,
'IsRequired' => false,
'AllowSearch' => false
}
post(attributes_path, options)
end
|