Class: Rx::MedicationsClient

Inherits:
Client show all
Includes:
Common::Client::Concerns::MHVSessionBasedClient
Defined in:
lib/rx/medications_client.rb

Overview

Core class responsible for Rx API interface operations on va.gov

Constant Summary

Constants included from Common::Client::Concerns::MhvLockedSessionClient

Common::Client::Concerns::MhvLockedSessionClient::LOCK_RETRY_DELAY, Common::Client::Concerns::MhvLockedSessionClient::RETRY_ATTEMPTS

Constants inherited from Client

Client::CACHE_TTL, Client::CACHE_TTL_ZERO, Client::STATSD_KEY_PREFIX

Instance Attribute Summary

Attributes included from Common::Client::Concerns::MHVSessionBasedClient

#session

Attributes included from Common::Client::Concerns::MhvLockedSessionClient

#session

Instance Method Summary collapse

Methods included from Common::Client::Concerns::MHVSessionBasedClient

#get_session, #get_session_tagged, #invalid?, #session_config_key, #token_headers, #user_key

Methods included from SentryLogging

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

Methods included from Common::Client::Concerns::MhvLockedSessionClient

#authenticate, #initialize, #invalid?, #lock_and_get_session, #obtain_redis_lock, #refresh_session, #release_redis_lock

Methods inherited from Client

#cache_key, #get_active_rxs, #get_active_rxs_with_details, #get_all_rxs, #get_history_rxs, #get_notification_email_address, #get_preferences, #get_rx, #get_rx_details, #get_rx_documentation, #get_rx_preference_flag, #get_tracking_history_rx, #get_tracking_rx, #increment_refill, #initialize, #post_notification_email_address, #post_preferences, #post_refill_rx, #post_refill_rxs, #post_rx_preference_flag, #request

Methods inherited from Common::Client::Base

#config, configuration, #connection, #delete, #get, #perform, #post, #put, #raise_backend_exception, #raise_not_authenticated, #request, #sanitize_headers!, #service_name

Instance Method Details

#auth_headersObject



19
20
21
22
# File 'lib/rx/medications_client.rb', line 19

def auth_headers
  config.base_request_headers.merge('appToken' =>
    config.app_token_va_gov, 'mhvCorrelationId' => session.user_id.to_s)
end