app/domain/operations/transformers/family_to/cv3_family.rb
# 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_households(households)
          households.collect do |household|
            enrollments = household.hbx_enrollments.where(:aasm_state.ne => "shopping", :product_id.ne => nil)
            household_data = {
              start_date: household.effective_starting_on,
              end_date: household.effective_ending_on,
              is_active: household.is_active,
              irs_groups: construct_irs_group(household.family.irs_groups.last),
              tax_households: transform_tax_households(household.tax_households),
              coverage_households: transform_coverage_households(household.coverage_households)
            }
            household_data.merge!(hbx_enrollments: transform_hbx_enrollments(enrollments)) if enrollments.present?
            household_data
          end
        end
def transform_households ( households ) households . collect do | household | enrollments = household . hbx_enrollments . where ( :aasm_state . ne => "shopping" , :product_id . ne => nil ) household_data = { start_date : household . effective_starting_on , end_date : household . effective_ending_on , is_active : household . is_active , irs_groups : construct_irs_group ( household . family . irs_groups . last ) , tax_households : transform_tax_households ( household . tax_households ) , coverage_households : transform_coverage_households ( household . coverage_households ) } household_data . merge! ( hbx_enrollments : transform_hbx_enrollments ( enrollments ) ) if enrollments . present? household_data end end
Constructs cv3 payload including family and FA Application
Constructs cv3 payload including family and FA Application
households