Class: LighthouseIntentToFileProvider

Inherits:
Object
  • Object
show all
Includes:
IntentToFileProvider
Defined in:
lib/disability_compensation/providers/intent_to_file/lighthouse_intent_to_file_provider.rb

Instance Method Summary collapse

Methods included from IntentToFileProvider

create_intent_to_file, get_intent_to_file

Constructor Details

#initialize(current_user) ⇒ LighthouseIntentToFileProvider

Returns a new instance of LighthouseIntentToFileProvider.



10
11
12
13
# File 'lib/disability_compensation/providers/intent_to_file/lighthouse_intent_to_file_provider.rb', line 10

def initialize(current_user)
  @current_user = current_user
  @service = BenefitsClaims::Service.new(current_user.icn)
end

Instance Method Details

#create_intent_to_file(type, lighthouse_client_id, lighthouse_rsa_key_path) ⇒ Object



20
21
22
23
24
# File 'lib/disability_compensation/providers/intent_to_file/lighthouse_intent_to_file_provider.rb', line 20

def create_intent_to_file(type, lighthouse_client_id, lighthouse_rsa_key_path)
  data = @service.create_intent_to_file(type, @current_user.ssn, lighthouse_client_id,
                                        lighthouse_rsa_key_path)['data']
  transform(data)
end

#get_intent_to_file(type, lighthouse_client_id, lighthouse_rsa_key_path) ⇒ Object



15
16
17
18
# File 'lib/disability_compensation/providers/intent_to_file/lighthouse_intent_to_file_provider.rb', line 15

def get_intent_to_file(type, lighthouse_client_id, lighthouse_rsa_key_path)
  data = @service.get_intent_to_file(type, lighthouse_client_id, lighthouse_rsa_key_path)['data']
  transform(data)
end