components/financial_assistance/app/domain/financial_assistance/operations/transformers/family_to/cv3_family.rb
def construct_payload(family)
            payload = {
              hbx_id: family.hbx_assigned_id.to_s,
              family_members: transform_family_members(family.family_members),
              households: transform_households(family.households), # TO DO
              renewal_consent_through_year: family.renewal_consent_through_year,
              special_enrollment_periods: transform_special_enrollment_periods(family.special_enrollment_periods),
              payment_transactions: transform_payment_transactions(family.payment_transactions),
              magi_medicaid_applications: transform_applications(family),
              documents: transform_documents(family.documents),
              timestamp: {created_at: family.created_at.to_datetime, modified_at: family.updated_at.to_datetime},
              broker_accounts: transform_broker_accounts(family.broker_agency_accounts)
              # foreign_keys TO DO ??
              # general_agency_accounts = transform_general_agency_accounts(family.general_agency_accounts), #TO DO
              # updated_by: construct_updated_by(updated_by)
            }
            payload.merge!(irs_groups: transform_irs_groups(family.irs_groups)) if family.irs_groups.present?
            Success(payload)
          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 construct_payload(family)
            payload = {
              hbx_id: family.hbx_assigned_id.to_s,
              family_members: transform_family_members(family.family_members),
              households: transform_households(family.households), 
              renewal_consent_through_year: family.renewal_consent_through_year,
              special_enrollment_periods: transform_special_enrollment_periods(family.special_enrollment_periods),
              payment_transactions: transform_payment_transactions(family.payment_transactions),
              magi_medicaid_applications: transform_applications(family),
              documents: transform_documents(family.documents),
              timestamp: {created_at: family.created_at.to_datetime, modified_at: family.updated_at.to_datetime},
              broker_accounts: transform_broker_accounts(family.broker_agency_accounts)
            }
            payload.merge!(irs_groups: transform_irs_groups(family.irs_groups)) if family.irs_groups.present?
            Success(payload)
          end
def construct_payload ( family ) payload = { hbx_id : family . hbx_assigned_id . to_s , family_members : transform_family_members ( family . family_members ) , households : transform_households ( family . households ) , renewal_consent_through_year : family . renewal_consent_through_year , special_enrollment_periods : transform_special_enrollment_periods ( family . special_enrollment_periods ) , payment_transactions : transform_payment_transactions ( family . payment_transactions ) , magi_medicaid_applications : transform_applications ( family ) , documents : transform_documents ( family . documents ) , timestamp : { created_at : family . created_at . to_datetime , modified_at : family . updated_at . to_datetime } , broker_accounts : transform_broker_accounts ( family . broker_agency_accounts ) } payload . merge! ( irs_groups : transform_irs_groups ( family . irs_groups ) ) if family . irs_groups . present? Success ( payload ) end
Constructs cv3 payload including family and FA Application
Constructs cv3 payload including family and FA Application
# TO DO # foreign_keys TO DO ?? # general_agency_accounts = transform_general_agency_accounts(family.general_agency_accounts), #TO DO # updated_by: construct_updated_by(updated_by)
family