Class: Decidim::Voca::Rpc::GetSettings

Inherits:
Object
  • Object
show all
Includes:
VocaDecidim
Defined in:
app/rpc/decidim/voca/rpc/get_settings.rb

Constant Summary

Constants included from VocaDecidim

VocaDecidim::DecidimOrganizationColorSettings, VocaDecidim::DecidimOrganizationFeatureFlagSettings, VocaDecidim::DecidimOrganizationFileUploadSettings, VocaDecidim::DecidimOrganizationLocaleSettings, VocaDecidim::DecidimOrganizationNamingSettings, VocaDecidim::DecidimOrganizationPermissionSettings, VocaDecidim::DecidimOrganizationSMTPSettings, VocaDecidim::GetSettingsResponse, VocaDecidim::PingResponse, VocaDecidim::SETTINGS_MACHINE_TRANSLATION_PRIORITY_OPTION, VocaDecidim::SETTINGS_REGISTER_MODE_OPTION, VocaDecidim::SETTINGS_SMTP_AUTHENTICATION_OPTION, VocaDecidim::SETTINGS_SMTP_OPENSSL_OPTION, VocaDecidim::SeedAdminRequest, VocaDecidim::SeedAdminResponse, VocaDecidim::SetSettingsRequest

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, organization) ⇒ GetSettings

Returns a new instance of GetSettings.



9
10
11
12
# File 'app/rpc/decidim/voca/rpc/get_settings.rb', line 9

def initialize(message, organization)
  @message = message
  @organization = organization
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



8
9
10
# File 'app/rpc/decidim/voca/rpc/get_settings.rb', line 8

def message
  @message
end

#organizationObject (readonly)

Returns the value of attribute organization.



8
9
10
# File 'app/rpc/decidim/voca/rpc/get_settings.rb', line 8

def organization
  @organization
end

Instance Method Details

#get_settingsObject

get all the settings linked to the organization.



16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/rpc/decidim/voca/rpc/get_settings.rb', line 16

def get_settings
  GetSettingsResponse.new(
    id: organization.id,
    permission_settings: permission_settings,
    naming_settings: naming_settings,
    locale_settings: locale_settings,
    smtp_settings: smtp_settings,
    color_settings: color_settings,
    file_upload_settings: file_upload_settings,
    feature_settings: feature_settings
  )
end