Skip to content

Commit

Permalink
fix!: remove invalid feedback types and add missing ones (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
figueredo authored Nov 6, 2024
1 parent 09ad2d2 commit 9f09d5d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
2 changes: 0 additions & 2 deletions incognia.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ var (
ErrMissingIdentifier = errors.New("missing installation id, request token or session token")
ErrMissingAccountID = errors.New("missing account id")
ErrMissingSignupID = errors.New("missing signup id")
ErrMissingTimestamp = errors.New("missing timestamp")
ErrInvalidFeedbackType = errors.New("invalid feedback type")
ErrMissingClientIDOrClientSecret = errors.New("client id and client secret are required")
ErrConfigIsNil = errors.New("incognia client config is required")
)
Expand Down
48 changes: 26 additions & 22 deletions request_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,32 @@ type postAssessmentRequestBody struct {
type FeedbackType string

const (
PaymentAccepted FeedbackType = "payment_accepted"
PaymentDeclined FeedbackType = "payment_declined"
PaymentDeclinedByRiskAnalysis FeedbackType = "payment_declined_by_risk_analysis"
PaymentDeclinedByAcquirer FeedbackType = "payment_declined_by_acquirer"
PaymentDeclinedByBusiness FeedbackType = "payment_declined_by_business"
PaymentDeclinedByManualReview FeedbackType = "payment_declined_by_manual_review"
PaymentAcceptedByThirdParty FeedbackType = "payment_accepted_by_third_party"
LoginAccepted FeedbackType = "login_accepted"
LoginDeclined FeedbackType = "login_declined"
SignupAccepted FeedbackType = "signup_accepted"
SignupDeclined FeedbackType = "signup_declined"
ChallengePassed FeedbackType = "challenge_passed"
ChallengeFailed FeedbackType = "challenge_failed"
PasswordChangedSuccessfully FeedbackType = "password_changed_successfully"
PasswordChangeFailed FeedbackType = "password_change_failed"
Verified FeedbackType = "verified"
NotVerified FeedbackType = "not_verified"
Chargeback FeedbackType = "chargeback"
PromotionAbuse FeedbackType = "promotion_abuse"
AccountTakeover FeedbackType = "account_takeover"
MposFraud FeedbackType = "mpos_fraud"
ChargebackNotification FeedbackType = "chargeback_notification"
AccountAllowed FeedbackType = "account_allowed"
DeviceAllowed FeedbackType = "device_allowed"
Verified FeedbackType = "verified"
Reset FeedbackType = "reset"
AccountTakeover FeedbackType = "account_takeover"
IdentityFraud FeedbackType = "identity_fraud"
Chargeback FeedbackType = "chargeback"
ChargebackNotification FeedbackType = "chargeback_notification"
PromotionAbuse FeedbackType = "promotion_abuse"
LoginAccepted FeedbackType = "login_accepted"
LoginAcceptedByDeviceVerification FeedbackType = "login_accepted_by_device_verification"
LoginAcceptedByFacialBiometrics FeedbackType = "login_accepted_by_facial_biometrics"
LoginAcceptedByManualReview FeedbackType = "login_accepted_by_manual_review"
LoginDeclined FeedbackType = "login_declined"
LoginDeclinedByFacialBiometrics FeedbackType = "login_declined_by_facial_biometrics"
LoginDeclinedByManualReview FeedbackType = "login_declined_by_manual_review"
PaymentAccepted FeedbackType = "payment_accepted"
PaymentAcceptedByControlGroup FeedbackType = "payment_accepted_by_control_group"
PaymentAcceptedByThirdParty FeedbackType = "payment_accepted_by_third_party"
PaymentDeclined FeedbackType = "payment_declined"
PaymentDeclinedByAcquirer FeedbackType = "payment_declined_by_acquirer"
PaymentDeclinedByBusiness FeedbackType = "payment_declined_by_business"
PaymentDeclinedByManualReview FeedbackType = "payment_declined_by_manual_review"
PaymentDeclinedByRiskAnalysis FeedbackType = "payment_declined_by_risk_analysis"
SignupAccepted FeedbackType = "signup_accepted"
SignupDeclined FeedbackType = "signup_declined"
)

type postFeedbackRequestBody struct {
Expand Down

0 comments on commit 9f09d5d

Please sign in to comment.