Class: V0::Profile::TelephonesController

Inherits:
ApplicationController show all
Includes:
Vet360::Writeable
Defined in:
app/controllers/v0/profile/telephones_controller.rb

Constant Summary

Constants inherited from ApplicationController

ApplicationController::VERSION_STATUS

Constants included from SignIn::Authentication

SignIn::Authentication::BEARER_PATTERN

Constants included from ExceptionHandling

ExceptionHandling::SKIP_SENTRY_EXCEPTION_TYPES

Instance Method Summary collapse

Methods included from Vet360::Writeable

#invalidate_cache, #write_to_vet360_and_render_transaction!

Methods inherited from ApplicationController

#clear_saved_form, #cors_preflight, #routing_error

Methods included from Traceable

#set_trace_tags

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger

Methods included from SignIn::Authentication

#authenticate, #authenticate_service_account, #load_user

Methods included from Headers

#block_unknown_hosts, #set_app_info_headers

Methods included from AuthenticationAndSSOConcerns

#authenticate, #clear_session, #extend_session!, #load_user, #log_sso_info, #render_unauthorized, #reset_session, #set_api_cookie!, #set_session_expiration_header, #sso_logging_info, #validate_inbound_login_params, #validate_session

Instance Method Details

#createObject



12
13
14
15
16
17
18
# File 'app/controllers/v0/profile/telephones_controller.rb', line 12

def create
  write_to_vet360_and_render_transaction!(
    'telephone',
    telephone_params
  )
  Rails.logger.warn('TelephonesController#create request completed', sso_logging_info)
end

#create_or_updateObject



20
21
22
23
24
25
26
# File 'app/controllers/v0/profile/telephones_controller.rb', line 20

def create_or_update
  write_to_vet360_and_render_transaction!(
    'telephone',
    telephone_params,
    http_verb: 'update'
  )
end

#destroyObject



37
38
39
40
41
42
43
44
# File 'app/controllers/v0/profile/telephones_controller.rb', line 37

def destroy
  write_to_vet360_and_render_transaction!(
    'telephone',
    add_effective_end_date(telephone_params),
    http_verb: 'put'
  )
  Rails.logger.warn('TelephonesController#destroy request completed', sso_logging_info)
end

#updateObject



28
29
30
31
32
33
34
35
# File 'app/controllers/v0/profile/telephones_controller.rb', line 28

def update
  write_to_vet360_and_render_transaction!(
    'telephone',
    telephone_params,
    http_verb: 'put'
  )
  Rails.logger.warn('TelephonesController#update request completed', sso_logging_info)
end