Class: OnboardingService
- Inherits:
-
Object
- Object
- OnboardingService
- Defined in:
- app/services/onboarding_service.rb
Instance Attribute Summary collapse
-
#app_mode ⇒ Object
readonly
Returns the value of attribute app_mode.
-
#company_params ⇒ Object
readonly
Returns the value of attribute company_params.
-
#current_company ⇒ Object
readonly
Returns the value of attribute current_company.
-
#current_tenant ⇒ Object
readonly
Returns the value of attribute current_tenant.
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#payroll_periods_params ⇒ Object
readonly
Returns the value of attribute payroll_periods_params.
-
#ship_name ⇒ Object
readonly
Returns the value of attribute ship_name.
-
#tenant_params ⇒ Object
readonly
Returns the value of attribute tenant_params.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(current_user:, current_company:, current_tenant:, tenant_params:, company_params:, ship_name:, payroll_periods_params:, app_mode:) ⇒ OnboardingService
constructor
A new instance of OnboardingService.
Constructor Details
#initialize(current_user:, current_company:, current_tenant:, tenant_params:, company_params:, ship_name:, payroll_periods_params:, app_mode:) ⇒ OnboardingService
Returns a new instance of OnboardingService.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/services/onboarding_service.rb', line 5 def initialize( current_user:, current_company:, current_tenant:, tenant_params:, company_params:, ship_name:, payroll_periods_params:, app_mode: ) @current_user = current_user @current_company = current_company @current_tenant = current_tenant @tenant_params = tenant_params @company_params = company_params @ship_name = ship_name @payroll_periods_params = payroll_periods_params @app_mode = app_mode end |
Instance Attribute Details
#app_mode ⇒ Object (readonly)
Returns the value of attribute app_mode.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def app_mode @app_mode end |
#company_params ⇒ Object (readonly)
Returns the value of attribute company_params.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def company_params @company_params end |
#current_company ⇒ Object (readonly)
Returns the value of attribute current_company.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def current_company @current_company end |
#current_tenant ⇒ Object (readonly)
Returns the value of attribute current_tenant.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def current_tenant @current_tenant end |
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def current_user @current_user end |
#payroll_periods_params ⇒ Object (readonly)
Returns the value of attribute payroll_periods_params.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def payroll_periods_params @payroll_periods_params end |
#ship_name ⇒ Object (readonly)
Returns the value of attribute ship_name.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def ship_name @ship_name end |
#tenant_params ⇒ Object (readonly)
Returns the value of attribute tenant_params.
2 3 4 |
# File 'app/services/onboarding_service.rb', line 2 def tenant_params @tenant_params end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'app/services/onboarding_service.rb', line 25 def call ActiveRecord::Base.transaction do update_tenant update_company create_contact create_periods create_event_notification_configurations end end |