Class: VAProfile::Person::Service
- Inherits:
-
Service
- Object
- Common::Client::Base
- Service
- VAProfile::Person::Service
- Includes:
- Common::Client::Concerns::Monitoring, ERB::Util
- Defined in:
- lib/va_profile/person/service.rb
Constant Summary
Constants inherited from Service
Instance Method Summary collapse
-
#init_vet360_id(icn = nil) ⇒ VAProfile::ContactInformation::PersonTransactionResponse
Initializes a vet360_id for a user that does not have one.
Methods included from Common::Client::Concerns::Monitoring
Methods inherited from Service
breakers_service, #initialize, #perform
Methods inherited from Common::Client::Base
configuration, #raise_backend_exception
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Constructor Details
This class inherits a constructor from VAProfile::Service
Instance Method Details
#init_vet360_id(icn = nil) ⇒ VAProfile::ContactInformation::PersonTransactionResponse
Initializes a vet360_id for a user that does not have one. Can be used when a current user is present, or through a rake task when no user is present (through passing in their ICN). This is an asynchronous process for VAProfile, so it returns VAProfile transaction information.
25 26 27 28 29 30 31 32 33 |
# File 'lib/va_profile/person/service.rb', line 25 def init_vet360_id(icn = nil) with_monitoring do raw_response = perform(:post, encode_url!(icn), empty_body) VAProfile::ContactInformation::PersonTransactionResponse.from(raw_response, @user) end rescue => e handle_error(e) end |