Class: EtnaApp::Magma::Models::SetDateShiftRoot

Inherits:
Etna::Command show all
Includes:
StrongConfirmation, WithEtnaClients, WithLogger
Defined in:
lib/commands.rb

Instance Attribute Summary

Attributes inherited from Etna::Command

#parent

Instance Method Summary collapse

Methods included from StrongConfirmation

#confirm

Methods included from WithLogger

#logger

Methods included from WithEtnaClients

#environment, #exit, exit, #janus_client, #magma_client, #metis_client, #polyphemus_client, #token

Methods inherited from Etna::Command

#completions, #fill_in_missing_params, #find_command, #initialize, parent_scope, #setup

Methods included from Etna::CommandOrExecutor

#command_name, #completions_for, #desc, #flag_argspec, #flag_as_parameter, included, #parse_flags, #program_name, #usage

Constructor Details

This class inherits a constructor from Etna::Command

Instance Method Details

#execute(project_name, target_model: 'subject', date_shift_root: false) ⇒ Object



596
597
598
599
600
601
602
603
604
# File 'lib/commands.rb', line 596

def execute(project_name, target_model: 'subject', date_shift_root: false)
  magma_client.update_model(Etna::Clients::Magma::UpdateModelRequest.new(
    actions:[Etna::Clients::Magma::SetDateShiftRootAction.new(
      model_name: target_model,
      date_shift_root: date_shift_root
    )],
    project_name: project_name,
  ))
end