Class: Post911SOB::DGIB::Client
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- Post911SOB::DGIB::Client
- Includes:
- Common::Client::Concerns::Monitoring
- Defined in:
- lib/post911_sob/dgib/client.rb
Constant Summary collapse
- BENEFIT_TYPE =
'Chapter33'
Instance Method Summary collapse
- #end_point ⇒ Object private
- #get_entitlement_transferred_out ⇒ Object
-
#initialize(claimant_id) ⇒ Client
constructor
A new instance of Client.
- #request_headers ⇒ Object private
Methods included from Common::Client::Concerns::Monitoring
#increment, #increment_failure, #increment_total, #with_monitoring
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
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
Constructor Details
#initialize(claimant_id) ⇒ Client
Returns a new instance of Client.
16 17 18 19 20 |
# File 'lib/post911_sob/dgib/client.rb', line 16 def initialize(claimant_id) @claimant_id = claimant_id super() end |
Instance Method Details
#end_point ⇒ Object (private)
31 32 33 |
# File 'lib/post911_sob/dgib/client.rb', line 31 def end_point "transferees/#{@claimant_id}/toe" end |
#get_entitlement_transferred_out ⇒ Object
22 23 24 25 26 27 |
# File 'lib/post911_sob/dgib/client.rb', line 22 def get_entitlement_transferred_out # TO-DO add monitoring and serialized response # TO-DO Filter response by chapter33 benefit type = { timeout: 60 } perform(:get, end_point, {}, request_headers, ) end |
#request_headers ⇒ Object (private)
35 36 37 38 39 |
# File 'lib/post911_sob/dgib/client.rb', line 35 def request_headers { Authorization: "Bearer #{Post911SOB::DGIB::AuthenticationTokenService.call}" } end |