Class: SFRest::Factory_standard_domain
- Inherits:
-
Object
- Object
- SFRest::Factory_standard_domain
- Defined in:
- lib/sfrest/factory_standard_domain.rb
Overview
We need to keep this naming due to the way connection.rb autoloads things. rubocop: disable Naming/ClassAndModuleCamelCase Manage the factory standard domain feature.
Instance Method Summary collapse
-
#backfill_domains ⇒ Array
Backfills the factory standard domains using the templates defined.
-
#disable_factory_standard_domain_template(domain_template_name) ⇒ Array
Disable the centralized role management settings for a given role.
-
#enable_factory_standard_domain_template(domain_template_name, new_template = []) ⇒ Array
Enable the factory standard domains settings for a given template name.
-
#factory_standard_domain_mapping ⇒ Array
Get current factory standard domains settings.
-
#initialize(conn) ⇒ Factory_standard_domain
constructor
A new instance of Factory_standard_domain.
Constructor Details
#initialize(conn) ⇒ Factory_standard_domain
Returns a new instance of Factory_standard_domain.
11 12 13 |
# File 'lib/sfrest/factory_standard_domain.rb', line 11 def initialize(conn) @conn = conn end |
Instance Method Details
#backfill_domains ⇒ Array
Backfills the factory standard domains using the templates defined.
45 46 47 |
# File 'lib/sfrest/factory_standard_domain.rb', line 45 def backfill_domains @conn.post('/api/v1/factory-standard-domains', {}.to_json) end |
#disable_factory_standard_domain_template(domain_template_name) ⇒ Array
Disable the centralized role management settings for a given role.
38 39 40 |
# File 'lib/sfrest/factory_standard_domain.rb', line 38 def disable_factory_standard_domain_template(domain_template_name) @conn.delete("/api/v1/factory-standard-domains/#{domain_template_name}") end |
#enable_factory_standard_domain_template(domain_template_name, new_template = []) ⇒ Array
Enable the factory standard domains settings for a given template name.
27 28 29 30 31 32 |
# File 'lib/sfrest/factory_standard_domain.rb', line 27 def enable_factory_standard_domain_template(domain_template_name, new_template = []) payload = { 'new_template' => new_template }.to_json @conn.put("/api/v1/factory-standard-domains/#{domain_template_name}", payload) end |
#factory_standard_domain_mapping ⇒ Array
Get current factory standard domains settings
18 19 20 |
# File 'lib/sfrest/factory_standard_domain.rb', line 18 def factory_standard_domain_mapping @conn.get('/api/v1/factory-standard-domains') end |