Class: Maestrano::Api::OrganizationResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Maestrano::Api::OrganizationResource
show all
- Defined in:
- app/resources/maestrano/api/organization_resource.rb
Constant Summary
Constants inherited
from BaseResource
BaseResource::API_SQL_OPERATOR_MAPPING
Instance Method Summary
collapse
all_filters, attribute_type, generate_composite_filters, tables_exists?
Instance Method Details
#account_creation_link ⇒ Object
#account_linked? ⇒ Boolean
Also known as:
has_account_linked
23
24
25
|
# File 'app/resources/maestrano/api/organization_resource.rb', line 23
def account_linked?
@model.oauth_uid.present?
end
|
#entities_types ⇒ Object
38
39
40
|
# File 'app/resources/maestrano/api/organization_resource.rb', line 38
def entities_types
['All', *Maestrano::Connector::Rails::IdMap.uniq.pluck(:external_entity)]
end
|
#save ⇒ Object
33
34
35
36
|
# File 'app/resources/maestrano/api/organization_resource.rb', line 33
def save
@model.tenant = context[:client]
super
end
|