Skip to content

Instantly share code, notes, and snippets.

@emailrhoads
Created April 20, 2022 21:18
Show Gist options
  • Save emailrhoads/668fa6fd99fe21f3977cfe3643699ea2 to your computer and use it in GitHub Desktop.
Save emailrhoads/668fa6fd99fe21f3977cfe3643699ea2 to your computer and use it in GitHub Desktop.
[Debug Execs] #gemini
@posting = Marty::Posting.last
client_id = 700106
@bulk_engine = Marty::ScriptSet.new.get_engine('BulkApi')
# from bulk spec
@p = {
'commitment_days' => 15,
'automated_underwriting_system_type' => 'DesktopUnderwriter',
'mortgage_type' => 'Conventional',
'amortization_type' => 'Fixed',
'loan_amortization_period_count' => 360,
'note_rate' => 4.75,
'base_loan_amount' => 173700.0,
'note_amount' => 173700.0,
'ltv_ratio_percent' => 90.0,
'cltv_ratio_percent' => 90.0,
'conforming_indicator' => true,
'debt_expense_ratio_percent' => 39.779327,
'loan_level_credit_score_value' => 686.0,
'financed_unit_count' => 1,
'loan_purpose_type' => 'Purchase',
'property_usage_type' => 'PrimaryResidence',
'streamline_type' => 'Not Streamlined',
'fha_203k_indicator' => false,
'project_legal_structure_type' => nil,
'refinance_cash_out_determination_type' => 'NoCashOut',
'escrow_indicator' => true,
'pud_indicator' => false,
'pt' => @posting.created_dt,
'client_id' => client_id,
'poc_selected' => true,
'mbs_snapshot' => nil,
'rule_pt' => @posting.created_dt,
'property_county_name' => 'SUMNER',
'property_state' => 'TN',
}.freeze
params = {
'loan_program' => 'Conv Fixed 30 Year FNMA',
'loan_attrs' => @p,
'pt_name' => @posting.name,
'note_rate' => 2.0,
'division' => 'CLG',
'lock_type' => 'Best Efforts',
'commitment_days' => 10,
};
res = @bulk_engine.evaluate('BulkPricing', 'bx_debug_candidates', @p + {})
res = Marty::Script.evaluate(
nil,
'Base',
'BaseProgram',
'bx_rec',
params
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment