mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 15:42:32 -05:00
sms fail event
This commit is contained in:
1 parent
f3a8100734
commit
038d780265
6 files changed
+29
-3
No files matched your search
@@ -8,6 +8,13 @@ module Submitters
|
||||
methods: %i[status application_key]
|
||||
}.freeze
|
||||
|
||||
EVENT_DATA_KEYS = {
|
||||
'decline_form' => %w[reason],
|
||||
'complete_verification' => %w[firstname lastname method country idcode],
|
||||
'fail_kba' => %w[issues],
|
||||
'fail_sms' => %w[status error_code]
|
||||
}.freeze
|
||||
|
||||
module_function
|
||||
|
||||
def call(submitter, with_template: false, with_events: false, with_documents: true, with_urls: false,
|
||||
@@ -55,7 +62,7 @@ module Submitters
|
||||
def serialize_events(events)
|
||||
events.map do |event|
|
||||
event.as_json(only: %i[id submitter_id event_type event_timestamp])
|
||||
.merge('data' => event.data.slice('reason', 'firstname', 'lastname', 'method', 'country', 'idcode'))
|
||||
.merge('data' => event.data.slice(*EVENT_DATA_KEYS[event.event_type]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user