lithic 0.17.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/type/union.rb +7 -21
  5. data/lib/lithic/models/auth_rules/rule_feature.rb +291 -2
  6. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  7. data/lib/lithic/models/card_authorization.rb +7 -6
  8. data/lib/lithic/models/claim_created_webhook_event.rb +190 -0
  9. data/lib/lithic/models/claim_document_accepted_webhook_event.rb +175 -0
  10. data/lib/lithic/models/claim_document_rejected_webhook_event.rb +175 -0
  11. data/lib/lithic/models/claim_document_uploaded_webhook_event.rb +175 -0
  12. data/lib/lithic/models/claim_updated_webhook_event.rb +190 -0
  13. data/lib/lithic/models/event.rb +23 -0
  14. data/lib/lithic/models/event_list_params.rb +14 -0
  15. data/lib/lithic/models/event_subscription.rb +14 -0
  16. data/lib/lithic/models/events/subscription_create_params.rb +14 -0
  17. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +5 -0
  18. data/lib/lithic/models/events/subscription_update_params.rb +14 -0
  19. data/lib/lithic/models/parsed_webhook_event.rb +11 -1
  20. data/lib/lithic/models/transaction_monitoring/case_transaction.rb +120 -43
  21. data/lib/lithic/models.rb +10 -0
  22. data/lib/lithic/resources/transaction_monitoring/cases.rb +1 -1
  23. data/lib/lithic/resources/webhooks.rb +1 -1
  24. data/lib/lithic/version.rb +1 -1
  25. data/lib/lithic.rb +5 -0
  26. data/rbi/lithic/models/auth_rules/rule_feature.rbi +686 -2
  27. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +15 -3
  28. data/rbi/lithic/models/card_authorization.rbi +12 -10
  29. data/rbi/lithic/models/claim_created_webhook_event.rbi +386 -0
  30. data/rbi/lithic/models/claim_document_accepted_webhook_event.rbi +315 -0
  31. data/rbi/lithic/models/claim_document_rejected_webhook_event.rbi +315 -0
  32. data/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi +315 -0
  33. data/rbi/lithic/models/claim_updated_webhook_event.rbi +386 -0
  34. data/rbi/lithic/models/event.rbi +46 -0
  35. data/rbi/lithic/models/event_list_params.rbi +34 -0
  36. data/rbi/lithic/models/event_subscription.rbi +34 -0
  37. data/rbi/lithic/models/events/subscription_create_params.rbi +34 -0
  38. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +25 -0
  39. data/rbi/lithic/models/events/subscription_update_params.rbi +34 -0
  40. data/rbi/lithic/models/parsed_webhook_event.rbi +5 -0
  41. data/rbi/lithic/models/transaction_monitoring/case_transaction.rbi +151 -46
  42. data/rbi/lithic/models.rbi +13 -0
  43. data/rbi/lithic/resources/transaction_monitoring/cases.rbi +1 -1
  44. data/rbi/lithic/resources/webhooks.rbi +5 -0
  45. data/sig/lithic/models/auth_rules/rule_feature.rbs +252 -0
  46. data/sig/lithic/models/claim_created_webhook_event.rbs +169 -0
  47. data/sig/lithic/models/claim_document_accepted_webhook_event.rbs +131 -0
  48. data/sig/lithic/models/claim_document_rejected_webhook_event.rbs +131 -0
  49. data/sig/lithic/models/claim_document_uploaded_webhook_event.rbs +131 -0
  50. data/sig/lithic/models/claim_updated_webhook_event.rbs +169 -0
  51. data/sig/lithic/models/event.rbs +10 -0
  52. data/sig/lithic/models/event_list_params.rbs +10 -0
  53. data/sig/lithic/models/event_subscription.rbs +10 -0
  54. data/sig/lithic/models/events/subscription_create_params.rbs +10 -0
  55. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +10 -0
  56. data/sig/lithic/models/events/subscription_update_params.rbs +10 -0
  57. data/sig/lithic/models/parsed_webhook_event.rbs +5 -0
  58. data/sig/lithic/models/transaction_monitoring/case_transaction.rbs +93 -34
  59. data/sig/lithic/models.rbs +10 -0
  60. data/sig/lithic/resources/transaction_monitoring/cases.rbs +1 -1
  61. data/sig/lithic/resources/webhooks.rbs +5 -0
  62. metadata +17 -2
@@ -0,0 +1,190 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ # @!attribute token
7
+ # Unique identifier for the claim, in UUID format
8
+ #
9
+ # @return [String]
10
+ required :token, String
11
+
12
+ # @!attribute account_holder_token
13
+ # Token for the account holder that filed the claim
14
+ #
15
+ # @return [String, nil]
16
+ required :account_holder_token, String, nil?: true
17
+
18
+ # @!attribute account_token
19
+ # Token for the account associated with the claim
20
+ #
21
+ # @return [String, nil]
22
+ required :account_token, String, nil?: true
23
+
24
+ # @!attribute card_tokens
25
+ # Tokens for the cards associated with the disputed transactions
26
+ #
27
+ # @return [Array<String>]
28
+ required :card_tokens, Lithic::Internal::Type::ArrayOf[String]
29
+
30
+ # @!attribute created
31
+ # When the claim was created
32
+ #
33
+ # @return [Time]
34
+ required :created, Time
35
+
36
+ # @!attribute disputed_transactions
37
+ # Transactions included in this claim
38
+ #
39
+ # @return [Array<Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction>]
40
+ required :disputed_transactions,
41
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction] }
42
+
43
+ # @!attribute event_type
44
+ # The type of event that occurred.
45
+ #
46
+ # @return [Symbol, :"claim.created"]
47
+ required :event_type, const: :"claim.created"
48
+
49
+ # @!attribute outstanding_requirements
50
+ # Requirements that must be fulfilled before the claim can be submitted
51
+ #
52
+ # @return [Array<Symbol, Lithic::Models::ClaimCreatedWebhookEvent::OutstandingRequirement>]
53
+ required :outstanding_requirements,
54
+ -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement] }
55
+
56
+ # @!attribute reason
57
+ # Dispute reason code provided when creating the claim
58
+ #
59
+ # @return [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Reason]
60
+ required :reason, enum: -> { Lithic::ClaimCreatedWebhookEvent::Reason }
61
+
62
+ # @!attribute status
63
+ # Current lifecycle status of the claim
64
+ #
65
+ # @return [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Status]
66
+ required :status, enum: -> { Lithic::ClaimCreatedWebhookEvent::Status }
67
+
68
+ # @!attribute submitted
69
+ # When the claim was submitted. Null until the claim reaches `SUBMITTED` status
70
+ #
71
+ # @return [Time, nil]
72
+ required :submitted, Time, nil?: true
73
+
74
+ # @!attribute updated
75
+ # When the claim was last updated
76
+ #
77
+ # @return [Time]
78
+ required :updated, Time
79
+
80
+ # @!method initialize(token:, account_holder_token:, account_token:, card_tokens:, created:, disputed_transactions:, outstanding_requirements:, reason:, status:, submitted:, updated:, event_type: :"claim.created")
81
+ # @param token [String] Unique identifier for the claim, in UUID format
82
+ #
83
+ # @param account_holder_token [String, nil] Token for the account holder that filed the claim
84
+ #
85
+ # @param account_token [String, nil] Token for the account associated with the claim
86
+ #
87
+ # @param card_tokens [Array<String>] Tokens for the cards associated with the disputed transactions
88
+ #
89
+ # @param created [Time] When the claim was created
90
+ #
91
+ # @param disputed_transactions [Array<Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction>] Transactions included in this claim
92
+ #
93
+ # @param outstanding_requirements [Array<Symbol, Lithic::Models::ClaimCreatedWebhookEvent::OutstandingRequirement>] Requirements that must be fulfilled before the claim can be submitted
94
+ #
95
+ # @param reason [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Reason] Dispute reason code provided when creating the claim
96
+ #
97
+ # @param status [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Status] Current lifecycle status of the claim
98
+ #
99
+ # @param submitted [Time, nil] When the claim was submitted. Null until the claim reaches `SUBMITTED` status
100
+ #
101
+ # @param updated [Time] When the claim was last updated
102
+ #
103
+ # @param event_type [Symbol, :"claim.created"] The type of event that occurred.
104
+
105
+ class DisputedTransaction < Lithic::Internal::Type::BaseModel
106
+ # @!attribute event_tokens
107
+ # Tokens for the specific events within the transaction being disputed. Lithic
108
+ # creates one dispute per event token
109
+ #
110
+ # @return [Array<String>]
111
+ required :event_tokens, Lithic::Internal::Type::ArrayOf[String]
112
+
113
+ # @!attribute transaction_token
114
+ # Token for the transaction being disputed, in UUID format
115
+ #
116
+ # @return [String]
117
+ required :transaction_token, String
118
+
119
+ # @!method initialize(event_tokens:, transaction_token:)
120
+ # Some parameter documentations has been truncated, see
121
+ # {Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction} for more
122
+ # details.
123
+ #
124
+ # A transaction included in a claim, along with the specific events being
125
+ # disputed.
126
+ #
127
+ # @param event_tokens [Array<String>] Tokens for the specific events within the transaction being disputed. Lithic cre
128
+ #
129
+ # @param transaction_token [String] Token for the transaction being disputed, in UUID format
130
+ end
131
+
132
+ module OutstandingRequirement
133
+ extend Lithic::Internal::Type::Enum
134
+
135
+ QUESTIONNAIRE = :QUESTIONNAIRE
136
+ DOCUMENTS = :DOCUMENTS
137
+
138
+ # @!method self.values
139
+ # @return [Array<Symbol>]
140
+ end
141
+
142
+ # Dispute reason code provided when creating the claim
143
+ #
144
+ # @see Lithic::Models::ClaimCreatedWebhookEvent#reason
145
+ module Reason
146
+ extend Lithic::Internal::Type::Enum
147
+
148
+ CARD_NOT_PRESENT = :CARD_NOT_PRESENT
149
+ CARD_LOST = :CARD_LOST
150
+ CARD_STOLEN = :CARD_STOLEN
151
+ CARD_NEVER_RECEIVED = :CARD_NEVER_RECEIVED
152
+ COUNTERFEIT = :COUNTERFEIT
153
+ ACCOUNT_TAKEOVER = :ACCOUNT_TAKEOVER
154
+ PRODUCT_NOT_RECEIVED = :PRODUCT_NOT_RECEIVED
155
+ NOT_AS_DESCRIBED = :NOT_AS_DESCRIBED
156
+ CREDIT_NOT_PROCESSED = :CREDIT_NOT_PROCESSED
157
+ CANCELLED_RECURRING = :CANCELLED_RECURRING
158
+ PAID_BY_OTHER_MEANS = :PAID_BY_OTHER_MEANS
159
+ DUPLICATE_CHARGE = :DUPLICATE_CHARGE
160
+ LATE_PRESENTMENT = :LATE_PRESENTMENT
161
+ INCORRECT_TRANSACTION_CODE = :INCORRECT_TRANSACTION_CODE
162
+ NO_AUTHORIZATION = :NO_AUTHORIZATION
163
+ DECLINED = :DECLINED
164
+ INCORRECT_AMOUNT = :INCORRECT_AMOUNT
165
+ ATM_CASH_NOT_DISPENSED = :ATM_CASH_NOT_DISPENSED
166
+ ATM_DEPOSIT_WRONG_AMOUNT = :ATM_DEPOSIT_WRONG_AMOUNT
167
+ ATM_DEPOSIT_MISSING = :ATM_DEPOSIT_MISSING
168
+
169
+ # @!method self.values
170
+ # @return [Array<Symbol>]
171
+ end
172
+
173
+ # Current lifecycle status of the claim
174
+ #
175
+ # @see Lithic::Models::ClaimCreatedWebhookEvent#status
176
+ module Status
177
+ extend Lithic::Internal::Type::Enum
178
+
179
+ INITIALIZING = :INITIALIZING
180
+ AWAITING_INFO = :AWAITING_INFO
181
+ SUBMITTED = :SUBMITTED
182
+ RESOLVED = :RESOLVED
183
+ ABANDONED = :ABANDONED
184
+
185
+ # @!method self.values
186
+ # @return [Array<Symbol>]
187
+ end
188
+ end
189
+ end
190
+ end
@@ -0,0 +1,175 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ class ClaimDocumentAcceptedWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ # @!attribute token
7
+ # Unique identifier for the document, in UUID format
8
+ #
9
+ # @return [String]
10
+ required :token, String
11
+
12
+ # @!attribute created
13
+ # When the document was created
14
+ #
15
+ # @return [Time]
16
+ required :created, Time
17
+
18
+ # @!attribute download_url
19
+ # Presigned URL for downloading the uploaded document. Available once the document
20
+ # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`)
21
+ #
22
+ # @return [String, nil]
23
+ required :download_url, String, nil?: true
24
+
25
+ # @!attribute download_url_expires_at
26
+ # When the download URL expires
27
+ #
28
+ # @return [Time, nil]
29
+ required :download_url_expires_at, Time, nil?: true
30
+
31
+ # @!attribute event_type
32
+ # The type of event that occurred.
33
+ #
34
+ # @return [Symbol, :"claim_document.accepted"]
35
+ required :event_type, const: :"claim_document.accepted"
36
+
37
+ # @!attribute failure_reason
38
+ # Reason the document failed validation. Null unless `status` is `REJECTED`
39
+ #
40
+ # @return [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::FailureReason, nil]
41
+ required :failure_reason,
42
+ enum: -> { Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason },
43
+ nil?: true
44
+
45
+ # @!attribute name
46
+ # Name provided when the upload intent was created
47
+ #
48
+ # @return [String]
49
+ required :name, String
50
+
51
+ # @!attribute requirement_id
52
+ # Identifier of the document requirement this document satisfies. Null for
53
+ # supplemental documents not tied to a specific requirement
54
+ #
55
+ # @return [String, nil]
56
+ required :requirement_id, String, nil?: true
57
+
58
+ # @!attribute status
59
+ # Current validation status of the document
60
+ #
61
+ # @return [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::Status]
62
+ required :status, enum: -> { Lithic::ClaimDocumentAcceptedWebhookEvent::Status }
63
+
64
+ # @!attribute updated
65
+ # When the document was last updated
66
+ #
67
+ # @return [Time]
68
+ required :updated, Time
69
+
70
+ # @!attribute upload_constraints
71
+ # Constraints that an uploaded file must satisfy.
72
+ #
73
+ # @return [Lithic::Models::ClaimDocumentAcceptedWebhookEvent::UploadConstraints, nil]
74
+ required :upload_constraints,
75
+ -> { Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints },
76
+ nil?: true
77
+
78
+ # @!attribute upload_url
79
+ # Presigned URL for uploading the file via HTTP PUT. Null after the upload window
80
+ # expires or after the document has been validated
81
+ #
82
+ # @return [String, nil]
83
+ required :upload_url, String, nil?: true
84
+
85
+ # @!attribute upload_url_expires_at
86
+ # When the upload URL expires
87
+ #
88
+ # @return [Time, nil]
89
+ required :upload_url_expires_at, Time, nil?: true
90
+
91
+ # @!method initialize(token:, created:, download_url:, download_url_expires_at:, failure_reason:, name:, requirement_id:, status:, updated:, upload_constraints:, upload_url:, upload_url_expires_at:, event_type: :"claim_document.accepted")
92
+ # Some parameter documentations has been truncated, see
93
+ # {Lithic::Models::ClaimDocumentAcceptedWebhookEvent} for more details.
94
+ #
95
+ # @param token [String] Unique identifier for the document, in UUID format
96
+ #
97
+ # @param created [Time] When the document was created
98
+ #
99
+ # @param download_url [String, nil] Presigned URL for downloading the uploaded document. Available once the document
100
+ #
101
+ # @param download_url_expires_at [Time, nil] When the download URL expires
102
+ #
103
+ # @param failure_reason [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::FailureReason, nil] Reason the document failed validation. Null unless `status` is `REJECTED`
104
+ #
105
+ # @param name [String] Name provided when the upload intent was created
106
+ #
107
+ # @param requirement_id [String, nil] Identifier of the document requirement this document satisfies. Null for supplem
108
+ #
109
+ # @param status [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::Status] Current validation status of the document
110
+ #
111
+ # @param updated [Time] When the document was last updated
112
+ #
113
+ # @param upload_constraints [Lithic::Models::ClaimDocumentAcceptedWebhookEvent::UploadConstraints, nil] Constraints that an uploaded file must satisfy.
114
+ #
115
+ # @param upload_url [String, nil] Presigned URL for uploading the file via HTTP PUT. Null after the upload window
116
+ #
117
+ # @param upload_url_expires_at [Time, nil] When the upload URL expires
118
+ #
119
+ # @param event_type [Symbol, :"claim_document.accepted"] The type of event that occurred.
120
+
121
+ # Reason the document failed validation. Null unless `status` is `REJECTED`
122
+ #
123
+ # @see Lithic::Models::ClaimDocumentAcceptedWebhookEvent#failure_reason
124
+ module FailureReason
125
+ extend Lithic::Internal::Type::Enum
126
+
127
+ INVALID_MIME_TYPE = :INVALID_MIME_TYPE
128
+ FILE_TOO_LARGE = :FILE_TOO_LARGE
129
+ FILE_EMPTY = :FILE_EMPTY
130
+ CORRUPT_FILE = :CORRUPT_FILE
131
+ OTHER = :OTHER
132
+
133
+ # @!method self.values
134
+ # @return [Array<Symbol>]
135
+ end
136
+
137
+ # Current validation status of the document
138
+ #
139
+ # @see Lithic::Models::ClaimDocumentAcceptedWebhookEvent#status
140
+ module Status
141
+ extend Lithic::Internal::Type::Enum
142
+
143
+ PENDING = :PENDING
144
+ VALIDATING = :VALIDATING
145
+ ACCEPTED = :ACCEPTED
146
+ REJECTED = :REJECTED
147
+
148
+ # @!method self.values
149
+ # @return [Array<Symbol>]
150
+ end
151
+
152
+ # @see Lithic::Models::ClaimDocumentAcceptedWebhookEvent#upload_constraints
153
+ class UploadConstraints < Lithic::Internal::Type::BaseModel
154
+ # @!attribute accepted_mime_types
155
+ # MIME types accepted for upload
156
+ #
157
+ # @return [Array<String>]
158
+ required :accepted_mime_types, Lithic::Internal::Type::ArrayOf[String]
159
+
160
+ # @!attribute max_size_bytes
161
+ # Maximum file size in bytes. Null if there is no enforced size limit
162
+ #
163
+ # @return [Integer, nil]
164
+ required :max_size_bytes, Integer, nil?: true
165
+
166
+ # @!method initialize(accepted_mime_types:, max_size_bytes:)
167
+ # Constraints that an uploaded file must satisfy.
168
+ #
169
+ # @param accepted_mime_types [Array<String>] MIME types accepted for upload
170
+ #
171
+ # @param max_size_bytes [Integer, nil] Maximum file size in bytes. Null if there is no enforced size limit
172
+ end
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,175 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ class ClaimDocumentRejectedWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ # @!attribute token
7
+ # Unique identifier for the document, in UUID format
8
+ #
9
+ # @return [String]
10
+ required :token, String
11
+
12
+ # @!attribute created
13
+ # When the document was created
14
+ #
15
+ # @return [Time]
16
+ required :created, Time
17
+
18
+ # @!attribute download_url
19
+ # Presigned URL for downloading the uploaded document. Available once the document
20
+ # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`)
21
+ #
22
+ # @return [String, nil]
23
+ required :download_url, String, nil?: true
24
+
25
+ # @!attribute download_url_expires_at
26
+ # When the download URL expires
27
+ #
28
+ # @return [Time, nil]
29
+ required :download_url_expires_at, Time, nil?: true
30
+
31
+ # @!attribute event_type
32
+ # The type of event that occurred.
33
+ #
34
+ # @return [Symbol, :"claim_document.rejected"]
35
+ required :event_type, const: :"claim_document.rejected"
36
+
37
+ # @!attribute failure_reason
38
+ # Reason the document failed validation. Null unless `status` is `REJECTED`
39
+ #
40
+ # @return [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::FailureReason, nil]
41
+ required :failure_reason,
42
+ enum: -> { Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason },
43
+ nil?: true
44
+
45
+ # @!attribute name
46
+ # Name provided when the upload intent was created
47
+ #
48
+ # @return [String]
49
+ required :name, String
50
+
51
+ # @!attribute requirement_id
52
+ # Identifier of the document requirement this document satisfies. Null for
53
+ # supplemental documents not tied to a specific requirement
54
+ #
55
+ # @return [String, nil]
56
+ required :requirement_id, String, nil?: true
57
+
58
+ # @!attribute status
59
+ # Current validation status of the document
60
+ #
61
+ # @return [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::Status]
62
+ required :status, enum: -> { Lithic::ClaimDocumentRejectedWebhookEvent::Status }
63
+
64
+ # @!attribute updated
65
+ # When the document was last updated
66
+ #
67
+ # @return [Time]
68
+ required :updated, Time
69
+
70
+ # @!attribute upload_constraints
71
+ # Constraints that an uploaded file must satisfy.
72
+ #
73
+ # @return [Lithic::Models::ClaimDocumentRejectedWebhookEvent::UploadConstraints, nil]
74
+ required :upload_constraints,
75
+ -> { Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints },
76
+ nil?: true
77
+
78
+ # @!attribute upload_url
79
+ # Presigned URL for uploading the file via HTTP PUT. Null after the upload window
80
+ # expires or after the document has been validated
81
+ #
82
+ # @return [String, nil]
83
+ required :upload_url, String, nil?: true
84
+
85
+ # @!attribute upload_url_expires_at
86
+ # When the upload URL expires
87
+ #
88
+ # @return [Time, nil]
89
+ required :upload_url_expires_at, Time, nil?: true
90
+
91
+ # @!method initialize(token:, created:, download_url:, download_url_expires_at:, failure_reason:, name:, requirement_id:, status:, updated:, upload_constraints:, upload_url:, upload_url_expires_at:, event_type: :"claim_document.rejected")
92
+ # Some parameter documentations has been truncated, see
93
+ # {Lithic::Models::ClaimDocumentRejectedWebhookEvent} for more details.
94
+ #
95
+ # @param token [String] Unique identifier for the document, in UUID format
96
+ #
97
+ # @param created [Time] When the document was created
98
+ #
99
+ # @param download_url [String, nil] Presigned URL for downloading the uploaded document. Available once the document
100
+ #
101
+ # @param download_url_expires_at [Time, nil] When the download URL expires
102
+ #
103
+ # @param failure_reason [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::FailureReason, nil] Reason the document failed validation. Null unless `status` is `REJECTED`
104
+ #
105
+ # @param name [String] Name provided when the upload intent was created
106
+ #
107
+ # @param requirement_id [String, nil] Identifier of the document requirement this document satisfies. Null for supplem
108
+ #
109
+ # @param status [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::Status] Current validation status of the document
110
+ #
111
+ # @param updated [Time] When the document was last updated
112
+ #
113
+ # @param upload_constraints [Lithic::Models::ClaimDocumentRejectedWebhookEvent::UploadConstraints, nil] Constraints that an uploaded file must satisfy.
114
+ #
115
+ # @param upload_url [String, nil] Presigned URL for uploading the file via HTTP PUT. Null after the upload window
116
+ #
117
+ # @param upload_url_expires_at [Time, nil] When the upload URL expires
118
+ #
119
+ # @param event_type [Symbol, :"claim_document.rejected"] The type of event that occurred.
120
+
121
+ # Reason the document failed validation. Null unless `status` is `REJECTED`
122
+ #
123
+ # @see Lithic::Models::ClaimDocumentRejectedWebhookEvent#failure_reason
124
+ module FailureReason
125
+ extend Lithic::Internal::Type::Enum
126
+
127
+ INVALID_MIME_TYPE = :INVALID_MIME_TYPE
128
+ FILE_TOO_LARGE = :FILE_TOO_LARGE
129
+ FILE_EMPTY = :FILE_EMPTY
130
+ CORRUPT_FILE = :CORRUPT_FILE
131
+ OTHER = :OTHER
132
+
133
+ # @!method self.values
134
+ # @return [Array<Symbol>]
135
+ end
136
+
137
+ # Current validation status of the document
138
+ #
139
+ # @see Lithic::Models::ClaimDocumentRejectedWebhookEvent#status
140
+ module Status
141
+ extend Lithic::Internal::Type::Enum
142
+
143
+ PENDING = :PENDING
144
+ VALIDATING = :VALIDATING
145
+ ACCEPTED = :ACCEPTED
146
+ REJECTED = :REJECTED
147
+
148
+ # @!method self.values
149
+ # @return [Array<Symbol>]
150
+ end
151
+
152
+ # @see Lithic::Models::ClaimDocumentRejectedWebhookEvent#upload_constraints
153
+ class UploadConstraints < Lithic::Internal::Type::BaseModel
154
+ # @!attribute accepted_mime_types
155
+ # MIME types accepted for upload
156
+ #
157
+ # @return [Array<String>]
158
+ required :accepted_mime_types, Lithic::Internal::Type::ArrayOf[String]
159
+
160
+ # @!attribute max_size_bytes
161
+ # Maximum file size in bytes. Null if there is no enforced size limit
162
+ #
163
+ # @return [Integer, nil]
164
+ required :max_size_bytes, Integer, nil?: true
165
+
166
+ # @!method initialize(accepted_mime_types:, max_size_bytes:)
167
+ # Constraints that an uploaded file must satisfy.
168
+ #
169
+ # @param accepted_mime_types [Array<String>] MIME types accepted for upload
170
+ #
171
+ # @param max_size_bytes [Integer, nil] Maximum file size in bytes. Null if there is no enforced size limit
172
+ end
173
+ end
174
+ end
175
+ end