components/financial_assistance/app/domain/financial_assistance/operations/transformers/family_to/cv3_family.rb
def transform_applications(family)
            return unless EnrollRegistry.feature_enabled?(:financial_assistance)
            member_hbx_ids = family.active_family_members.collect {|family_member| family_member.person.hbx_id}
            applications = ::FinancialAssistance::Application.where(family_id: family.id).where(:aasm_state.in => ["submitted", "determined"])
            applications.collect do |application|
              applicant_person_hbx_ids = application.active_applicants.pluck(:person_hbx_id)
              if member_hbx_ids.to_set == applicant_person_hbx_ids.to_set
                appl = ::FinancialAssistance::Operations::Applications::Transformers::ApplicationTo::Cv3Application.new.call(application)
                appl.success? ? appl.value! : {result: appl }
              end
            end.compact
          end
# Constructs cv3 payload including family and FA Application
Constructs cv3 payload including family and FA Application
Constructs cv3 payload including family and FA Application
def transform_applications(family)
            return unless EnrollRegistry.feature_enabled?(:financial_assistance)
            member_hbx_ids = family.active_family_members.collect {|family_member| family_member.person.hbx_id}
            applications = ::FinancialAssistance::Application.where(family_id: family.id).where(:aasm_state.in => ["submitted", "determined"])
            applications.collect do |application|
              applicant_person_hbx_ids = application.active_applicants.pluck(:person_hbx_id)
              if member_hbx_ids.to_set == applicant_person_hbx_ids.to_set
                appl = ::FinancialAssistance::Operations::Applications::Transformers::ApplicationTo::Cv3Application.new.call(application)
                appl.success? ? appl.value! : {result: appl }
              end
            end.compact
          end
def transform_applications ( family ) return unless EnrollRegistry . feature_enabled? ( :financial_assistance ) member_hbx_ids = family . active_family_members . collect { | family_member | family_member . person . hbx_id } applications = :: FinancialAssistance :: Application . where ( family_id : family . id ) . where ( :aasm_state . in => [ "submitted" , "determined" ] ) applications . collect do | application | applicant_person_hbx_ids = application . active_applicants . pluck ( :person_hbx_id ) if member_hbx_ids . to_set == applicant_person_hbx_ids . to_set appl = :: FinancialAssistance :: Operations :: Applications :: Transformers :: ApplicationTo :: Cv3Application . new . call ( application ) appl . success? ? appl . value! : { result : appl } end end . compact end
Constructs cv3 payload including family and FA Application
Constructs cv3 payload including family and FA Application
family