Class: BGS::VnpBenefitClaim

Inherits:
Object
  • Object
show all
Defined in:
lib/bgs/vnp_benefit_claim.rb

Instance Method Summary collapse

Constructor Details

#initialize(proc_id:, veteran:, user:) ⇒ VnpBenefitClaim

Returns a new instance of VnpBenefitClaim.



7
8
9
10
11
# File 'lib/bgs/vnp_benefit_claim.rb', line 7

def initialize(proc_id:, veteran:, user:)
  @user = user
  @veteran = veteran
  @proc_id = proc_id
end

Instance Method Details

#bgs_serviceObject (private)



36
37
38
# File 'lib/bgs/vnp_benefit_claim.rb', line 36

def bgs_service
  BGS::Service.new(@user)
end

#bgs_vnp_benefit_claimObject (private)



29
30
31
32
33
34
# File 'lib/bgs/vnp_benefit_claim.rb', line 29

def bgs_vnp_benefit_claim
  BGSDependents::VnpBenefitClaim.new(
    @proc_id,
    @veteran
  )
end

#createObject



13
14
15
16
17
18
19
# File 'lib/bgs/vnp_benefit_claim.rb', line 13

def create
  vnp_benefit_claim = bgs_service.vnp_create_benefit_claim(
    bgs_vnp_benefit_claim.create_params_for_686c
  )

  bgs_vnp_benefit_claim.vnp_benefit_claim_response(vnp_benefit_claim)
end

#update(benefit_claim, vnp_benefit_claim) ⇒ Object



21
22
23
24
25
# File 'lib/bgs/vnp_benefit_claim.rb', line 21

def update(benefit_claim, vnp_benefit_claim)
  bgs_service.vnp_benefit_claim_update(
    bgs_vnp_benefit_claim.update_params_for_686c(vnp_benefit_claim, benefit_claim)
  )
end