Class: RealPage::Utils::SnowflakeEventTracker
- Inherits:
-
Object
- Object
- RealPage::Utils::SnowflakeEventTracker
- Defined in:
- lib/real_page/utils/snowflake_event_tracker.rb
Constant Summary collapse
- IMPORT_PMS_RESIDENT_EVENT =
'import_pms_resident'- IMPORT_PMS_PROSPECT_EVENT =
'import_pms_prospect'
Class Method Summary collapse
- .track_pms_prospect_event(remote_lease_id: nil, resident_type:, request_params:, contact_date: nil, contact_source: nil, remote_prospect_id: nil, error: nil) ⇒ Object
- .track_pms_resident_event(remote_lease_id: nil, import_resident_id:, resident_type:, api_name:, request_params:, move_in_date: nil, lease_to: nil, lease_from: nil, first_name_present: false, last_name_present: false, email_present: false, phones_count:, error: nil) ⇒ Object
Class Method Details
.track_pms_prospect_event(remote_lease_id: nil, resident_type:, request_params:, contact_date: nil, contact_source: nil, remote_prospect_id: nil, error: nil) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/real_page/utils/snowflake_event_tracker.rb', line 63 def self.track_pms_prospect_event( remote_lease_id: nil, resident_type:, request_params:, contact_date: nil, contact_source: nil, remote_prospect_id: nil, error: nil ) EventTracker.track_process_events(name: IMPORT_PMS_PROSPECT_EVENT) do |events| events.add_imported_event( EventTracker::ResourceFactory.build_pms_prospect( billing_import: EventTracker::BillingImportFactory.build_billing_import( property_id: request_params[:billing_config].property_id, billing_config_id: request_params[:billing_config].id, remote_id: request_params[:site_id], pms_type: 'real_page', import_id: request_params[:import_id], pmc_id: request_params[:pmc_id], service: RealPage.config.app_name ), remote_lease_id: remote_lease_id, import_resident_id: request_params[:import_resident_id] || '', resident_type: resident_type, api_name: 'ProspectSearch', request_params: EventTracker::ResourceFactory::PmsProspect.build_request_params( pmc_id: request_params[:pmc_id], remote_id: request_params[:site_id], prospect_id: request_params[:guest_card_id] ), contact_date: contact_date, contact_source: contact_source, remote_prospect_id: remote_prospect_id, error: error ) ) end end |
.track_pms_resident_event(remote_lease_id: nil, import_resident_id:, resident_type:, api_name:, request_params:, move_in_date: nil, lease_to: nil, lease_from: nil, first_name_present: false, last_name_present: false, email_present: false, phones_count:, error: nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/real_page/utils/snowflake_event_tracker.rb', line 11 def self.track_pms_resident_event( remote_lease_id: nil, import_resident_id:, resident_type:, api_name:, request_params:, move_in_date: nil, lease_to: nil, lease_from: nil, first_name_present: false, last_name_present: false, email_present: false, phones_count:, error: nil ) EventTracker.track_process_events(name: IMPORT_PMS_RESIDENT_EVENT) do |events| events.add_imported_event( EventTracker::ResourceFactory.build_pms_resident( billing_import: EventTracker::BillingImportFactory.build_billing_import( property_id: request_params[:billing_config].property_id, billing_config_id: request_params[:billing_config].id, remote_id: request_params[:site_id], pms_type: 'real_page', import_id: request_params[:import_id], pmc_id: request_params[:pmc_id], service: RealPage.config.app_name ), remote_lease_id: remote_lease_id, import_resident_id: import_resident_id, resident_type: resident_type, api_name: api_name, request_params: EventTracker::ResourceFactory::PmsResident.build_request_params( start_date: (request_params[:start_date] || '').to_time, end_date: (request_params[:end_date] || '').to_time, prospect_id: request_params[:guest_card_id], pmc_id: request_params[:pmc_id], remote_id: request_params[:site_id], traffic_source_id: request_params[:traffic_source_id] ), move_in_date: move_in_date, lease_to: lease_to, lease_from: lease_from, first_name_present: first_name_present, last_name_present: last_name_present, email_present: email_present, phones_count: phones_count, error: error ) ) end end |