@@ -11,11 +11,11 @@ import (
11
11
type EventType string
12
12
13
13
const (
14
- EventTypeAccountCreate = EventType ("account.created" )
15
- EventTypeInquiryCreate = EventType ("inquiry.created" )
14
+ EventTypeAccountCreated = EventType ("account.created" )
15
+ EventTypeInquiryCreated = EventType ("inquiry.created" )
16
16
EventTypeInquiryStarted = EventType ("inquiry.started" )
17
17
EventTypeInquiryCompleted = EventType ("inquiry.completed" )
18
- EventyTypeVerificationCreate = EventType ("verification.create " )
18
+ EventTypeVerificationCreated = EventType ("verification.created " )
19
19
EventTypeVerificationPassed = EventType ("verification.passed" )
20
20
EventTypeVerificationFailed = EventType ("verification.failed" )
21
21
)
@@ -47,21 +47,21 @@ func (a EventAttributes) GetType() EventType {
47
47
48
48
func (a EventAttributes ) GetPayloadData () (PayloadData , error ) {
49
49
switch a .GetType () {
50
- case EventTypeAccountCreate :
50
+ case EventTypeAccountCreated :
51
51
var data Account
52
52
err := json .Unmarshal (a .Payload .Data , & data )
53
53
if err != nil {
54
54
return nil , common .StringError (err )
55
55
}
56
56
return data , nil
57
- case EventTypeInquiryCreate , EventTypeInquiryStarted , EventTypeInquiryCompleted :
57
+ case EventTypeInquiryCreated , EventTypeInquiryStarted , EventTypeInquiryCompleted :
58
58
var data Inquiry
59
59
err := json .Unmarshal (a .Payload .Data , & data )
60
60
if err != nil {
61
61
return nil , common .StringError (err )
62
62
}
63
63
return data , nil
64
- case EventyTypeVerificationCreate , EventTypeVerificationPassed , EventTypeVerificationFailed :
64
+ case EventTypeVerificationCreated , EventTypeVerificationPassed , EventTypeVerificationFailed :
65
65
var data Verification
66
66
err := json .Unmarshal (a .Payload .Data , & data )
67
67
if err != nil {
0 commit comments