lib/amsi/utils/snowflake_event_tracker.rb in amsi-1.0.1 vs lib/amsi/utils/snowflake_event_tracker.rb in amsi-1.1.0
- old
+ new
@@ -5,25 +5,21 @@
class SnowflakeEventTracker
IMPORT_PMS_RESIDENT_EVENT = 'import_pms_resident'
IMPORT_PMS_PROSPECT_EVENT = 'import_pms_prospect'
def self.track_pms_resident_event(
- remote_lease_id: nil,
- import_resident_id:,
- resident_type:,
- 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: 0,
- unit_name:,
- resident_id: nil,
- error: nil
- )
+ import_resident_id:, resident_type:, request_params:, unit_name:, remote_lease_id: nil,
+ move_in_date: nil,
+ lease_to: nil,
+ lease_from: nil,
+ first_name_present: false,
+ last_name_present: false,
+ email_present: false,
+ phones_count: 0,
+ resident_id: nil,
+ 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[:property_id],
@@ -61,21 +57,16 @@
)
end
end
def self.track_pms_prospect_event(
- remote_lease_id: nil,
- request_params:,
- first_name_present:,
- last_name_present:,
- email_present:,
- phone_present:,
- contact_date: nil,
- contact_source: nil,
- remote_prospect_id: nil,
- error: nil
- )
+ request_params:, first_name_present:, last_name_present:, email_present:, phone_present:, remote_lease_id: nil,
+ 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[:property_id],
@@ -95,10 +86,10 @@
remote_id: request_params[:remote_id],
prospect_id: request_params[:prospect_id],
first_name_present: first_name_present,
last_name_present: last_name_present,
email_present: email_present,
- phone_present: phone_present,
+ phone_present: phone_present
),
contact_date: contact_date,
contact_source: contact_source,
remote_prospect_id: remote_prospect_id,
move_in_report_type: 'amsi_api',