Class: Dina::Organization
- Inherits:
-
BaseModel
- Object
- JsonApiClient::Resource
- BaseModel
- Dina::Organization
show all
- Defined in:
- lib/dina/models/agent/organization.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseModel
custom_headers, find_by_group, #initialize, properties, site
Class Method Details
.endpoint_path ⇒ Object
14
15
16
|
# File 'lib/dina/models/agent/organization.rb', line 14
def self.endpoint_path
"agent-api/"
end
|
.table_name ⇒ Object
18
19
20
|
# File 'lib/dina/models/agent/organization.rb', line 18
def self.table_name
"organization"
end
|
Instance Method Details
#englishName ⇒ Object
27
28
29
|
# File 'lib/dina/models/agent/organization.rb', line 27
def englishName
names.select{|o| o[:languageCode] == "EN"}.first[:name]
end
|
#englishName=(name) ⇒ Object
22
23
24
25
|
# File 'lib/dina/models/agent/organization.rb', line 22
def englishName=(name)
names.delete_if{|o| o[:languageCode] == "EN"}
names << { languageCode: "EN", name: name }
end
|
#frenchName ⇒ Object
36
37
38
|
# File 'lib/dina/models/agent/organization.rb', line 36
def frenchName
names.select{|o| o[:languageCode] == "FR"}.first[:name]
end
|
#frenchName=(name) ⇒ Object
31
32
33
34
|
# File 'lib/dina/models/agent/organization.rb', line 31
def frenchName=(name)
names.delete_if{|o| o[:languageCode] == "FR"}
names << { languageCode: "FR", name: name }
end
|