lithic 0.17.0 → 0.18.0

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/auth_rules/rule_feature.rb +291 -2
  5. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  6. data/lib/lithic/models/claim_created_webhook_event.rb +190 -0
  7. data/lib/lithic/models/claim_document_accepted_webhook_event.rb +175 -0
  8. data/lib/lithic/models/claim_document_rejected_webhook_event.rb +175 -0
  9. data/lib/lithic/models/claim_document_uploaded_webhook_event.rb +175 -0
  10. data/lib/lithic/models/claim_updated_webhook_event.rb +190 -0
  11. data/lib/lithic/models/event.rb +23 -0
  12. data/lib/lithic/models/event_list_params.rb +14 -0
  13. data/lib/lithic/models/event_subscription.rb +14 -0
  14. data/lib/lithic/models/events/subscription_create_params.rb +14 -0
  15. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +5 -0
  16. data/lib/lithic/models/events/subscription_update_params.rb +14 -0
  17. data/lib/lithic/models/parsed_webhook_event.rb +11 -1
  18. data/lib/lithic/models.rb +10 -0
  19. data/lib/lithic/resources/webhooks.rb +1 -1
  20. data/lib/lithic/version.rb +1 -1
  21. data/lib/lithic.rb +5 -0
  22. data/rbi/lithic/models/auth_rules/rule_feature.rbi +686 -2
  23. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +15 -3
  24. data/rbi/lithic/models/claim_created_webhook_event.rbi +386 -0
  25. data/rbi/lithic/models/claim_document_accepted_webhook_event.rbi +315 -0
  26. data/rbi/lithic/models/claim_document_rejected_webhook_event.rbi +315 -0
  27. data/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi +315 -0
  28. data/rbi/lithic/models/claim_updated_webhook_event.rbi +386 -0
  29. data/rbi/lithic/models/event.rbi +46 -0
  30. data/rbi/lithic/models/event_list_params.rbi +34 -0
  31. data/rbi/lithic/models/event_subscription.rbi +34 -0
  32. data/rbi/lithic/models/events/subscription_create_params.rbi +34 -0
  33. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +25 -0
  34. data/rbi/lithic/models/events/subscription_update_params.rbi +34 -0
  35. data/rbi/lithic/models/parsed_webhook_event.rbi +5 -0
  36. data/rbi/lithic/models.rbi +13 -0
  37. data/rbi/lithic/resources/webhooks.rbi +5 -0
  38. data/sig/lithic/models/auth_rules/rule_feature.rbs +252 -0
  39. data/sig/lithic/models/claim_created_webhook_event.rbs +169 -0
  40. data/sig/lithic/models/claim_document_accepted_webhook_event.rbs +131 -0
  41. data/sig/lithic/models/claim_document_rejected_webhook_event.rbs +131 -0
  42. data/sig/lithic/models/claim_document_uploaded_webhook_event.rbs +131 -0
  43. data/sig/lithic/models/claim_updated_webhook_event.rbs +169 -0
  44. data/sig/lithic/models/event.rbs +10 -0
  45. data/sig/lithic/models/event_list_params.rbs +10 -0
  46. data/sig/lithic/models/event_subscription.rbs +10 -0
  47. data/sig/lithic/models/events/subscription_create_params.rbs +10 -0
  48. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +10 -0
  49. data/sig/lithic/models/events/subscription_update_params.rbs +10 -0
  50. data/sig/lithic/models/parsed_webhook_event.rbs +5 -0
  51. data/sig/lithic/models.rbs +10 -0
  52. data/sig/lithic/resources/webhooks.rbs +5 -0
  53. metadata +17 -2
@@ -0,0 +1,169 @@
1
+ module Lithic
2
+ module Models
3
+ type claim_created_webhook_event =
4
+ {
5
+ token: String,
6
+ account_holder_token: String?,
7
+ account_token: String?,
8
+ card_tokens: ::Array[String],
9
+ created: Time,
10
+ disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction],
11
+ event_type: :"claim.created",
12
+ outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement],
13
+ reason: Lithic::Models::ClaimCreatedWebhookEvent::reason,
14
+ status: Lithic::Models::ClaimCreatedWebhookEvent::status,
15
+ submitted: Time?,
16
+ updated: Time
17
+ }
18
+
19
+ class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel
20
+ attr_accessor token: String
21
+
22
+ attr_accessor account_holder_token: String?
23
+
24
+ attr_accessor account_token: String?
25
+
26
+ attr_accessor card_tokens: ::Array[String]
27
+
28
+ attr_accessor created: Time
29
+
30
+ attr_accessor disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction]
31
+
32
+ attr_accessor event_type: :"claim.created"
33
+
34
+ attr_accessor outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement]
35
+
36
+ attr_accessor reason: Lithic::Models::ClaimCreatedWebhookEvent::reason
37
+
38
+ attr_accessor status: Lithic::Models::ClaimCreatedWebhookEvent::status
39
+
40
+ attr_accessor submitted: Time?
41
+
42
+ attr_accessor updated: Time
43
+
44
+ def initialize: (
45
+ token: String,
46
+ account_holder_token: String?,
47
+ account_token: String?,
48
+ card_tokens: ::Array[String],
49
+ created: Time,
50
+ disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction],
51
+ outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement],
52
+ reason: Lithic::Models::ClaimCreatedWebhookEvent::reason,
53
+ status: Lithic::Models::ClaimCreatedWebhookEvent::status,
54
+ submitted: Time?,
55
+ updated: Time,
56
+ ?event_type: :"claim.created"
57
+ ) -> void
58
+
59
+ def to_hash: -> {
60
+ token: String,
61
+ account_holder_token: String?,
62
+ account_token: String?,
63
+ card_tokens: ::Array[String],
64
+ created: Time,
65
+ disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction],
66
+ event_type: :"claim.created",
67
+ outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement],
68
+ reason: Lithic::Models::ClaimCreatedWebhookEvent::reason,
69
+ status: Lithic::Models::ClaimCreatedWebhookEvent::status,
70
+ submitted: Time?,
71
+ updated: Time
72
+ }
73
+
74
+ type disputed_transaction =
75
+ { event_tokens: ::Array[String], transaction_token: String }
76
+
77
+ class DisputedTransaction < Lithic::Internal::Type::BaseModel
78
+ attr_accessor event_tokens: ::Array[String]
79
+
80
+ attr_accessor transaction_token: String
81
+
82
+ def initialize: (
83
+ event_tokens: ::Array[String],
84
+ transaction_token: String
85
+ ) -> void
86
+
87
+ def to_hash: -> {
88
+ event_tokens: ::Array[String],
89
+ transaction_token: String
90
+ }
91
+ end
92
+
93
+ type outstanding_requirement = :QUESTIONNAIRE | :DOCUMENTS
94
+
95
+ module OutstandingRequirement
96
+ extend Lithic::Internal::Type::Enum
97
+
98
+ QUESTIONNAIRE: :QUESTIONNAIRE
99
+ DOCUMENTS: :DOCUMENTS
100
+
101
+ def self?.values: -> ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement]
102
+ end
103
+
104
+ type reason =
105
+ :CARD_NOT_PRESENT
106
+ | :CARD_LOST
107
+ | :CARD_STOLEN
108
+ | :CARD_NEVER_RECEIVED
109
+ | :COUNTERFEIT
110
+ | :ACCOUNT_TAKEOVER
111
+ | :PRODUCT_NOT_RECEIVED
112
+ | :NOT_AS_DESCRIBED
113
+ | :CREDIT_NOT_PROCESSED
114
+ | :CANCELLED_RECURRING
115
+ | :PAID_BY_OTHER_MEANS
116
+ | :DUPLICATE_CHARGE
117
+ | :LATE_PRESENTMENT
118
+ | :INCORRECT_TRANSACTION_CODE
119
+ | :NO_AUTHORIZATION
120
+ | :DECLINED
121
+ | :INCORRECT_AMOUNT
122
+ | :ATM_CASH_NOT_DISPENSED
123
+ | :ATM_DEPOSIT_WRONG_AMOUNT
124
+ | :ATM_DEPOSIT_MISSING
125
+
126
+ module Reason
127
+ extend Lithic::Internal::Type::Enum
128
+
129
+ CARD_NOT_PRESENT: :CARD_NOT_PRESENT
130
+ CARD_LOST: :CARD_LOST
131
+ CARD_STOLEN: :CARD_STOLEN
132
+ CARD_NEVER_RECEIVED: :CARD_NEVER_RECEIVED
133
+ COUNTERFEIT: :COUNTERFEIT
134
+ ACCOUNT_TAKEOVER: :ACCOUNT_TAKEOVER
135
+ PRODUCT_NOT_RECEIVED: :PRODUCT_NOT_RECEIVED
136
+ NOT_AS_DESCRIBED: :NOT_AS_DESCRIBED
137
+ CREDIT_NOT_PROCESSED: :CREDIT_NOT_PROCESSED
138
+ CANCELLED_RECURRING: :CANCELLED_RECURRING
139
+ PAID_BY_OTHER_MEANS: :PAID_BY_OTHER_MEANS
140
+ DUPLICATE_CHARGE: :DUPLICATE_CHARGE
141
+ LATE_PRESENTMENT: :LATE_PRESENTMENT
142
+ INCORRECT_TRANSACTION_CODE: :INCORRECT_TRANSACTION_CODE
143
+ NO_AUTHORIZATION: :NO_AUTHORIZATION
144
+ DECLINED: :DECLINED
145
+ INCORRECT_AMOUNT: :INCORRECT_AMOUNT
146
+ ATM_CASH_NOT_DISPENSED: :ATM_CASH_NOT_DISPENSED
147
+ ATM_DEPOSIT_WRONG_AMOUNT: :ATM_DEPOSIT_WRONG_AMOUNT
148
+ ATM_DEPOSIT_MISSING: :ATM_DEPOSIT_MISSING
149
+
150
+ def self?.values: -> ::Array[Lithic::Models::ClaimCreatedWebhookEvent::reason]
151
+ end
152
+
153
+ type status =
154
+ :INITIALIZING | :AWAITING_INFO | :SUBMITTED | :RESOLVED | :ABANDONED
155
+
156
+ module Status
157
+ extend Lithic::Internal::Type::Enum
158
+
159
+ INITIALIZING: :INITIALIZING
160
+ AWAITING_INFO: :AWAITING_INFO
161
+ SUBMITTED: :SUBMITTED
162
+ RESOLVED: :RESOLVED
163
+ ABANDONED: :ABANDONED
164
+
165
+ def self?.values: -> ::Array[Lithic::Models::ClaimCreatedWebhookEvent::status]
166
+ end
167
+ end
168
+ end
169
+ end
@@ -0,0 +1,131 @@
1
+ module Lithic
2
+ module Models
3
+ type claim_document_accepted_webhook_event =
4
+ {
5
+ token: String,
6
+ created: Time,
7
+ download_url: String?,
8
+ download_url_expires_at: Time?,
9
+ event_type: :"claim_document.accepted",
10
+ failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?,
11
+ name: String,
12
+ requirement_id: String?,
13
+ status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status,
14
+ updated: Time,
15
+ upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?,
16
+ upload_url: String?,
17
+ upload_url_expires_at: Time?
18
+ }
19
+
20
+ class ClaimDocumentAcceptedWebhookEvent < Lithic::Internal::Type::BaseModel
21
+ attr_accessor token: String
22
+
23
+ attr_accessor created: Time
24
+
25
+ attr_accessor download_url: String?
26
+
27
+ attr_accessor download_url_expires_at: Time?
28
+
29
+ attr_accessor event_type: :"claim_document.accepted"
30
+
31
+ attr_accessor failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?
32
+
33
+ attr_accessor name: String
34
+
35
+ attr_accessor requirement_id: String?
36
+
37
+ attr_accessor status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status
38
+
39
+ attr_accessor updated: Time
40
+
41
+ attr_accessor upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?
42
+
43
+ attr_accessor upload_url: String?
44
+
45
+ attr_accessor upload_url_expires_at: Time?
46
+
47
+ def initialize: (
48
+ token: String,
49
+ created: Time,
50
+ download_url: String?,
51
+ download_url_expires_at: Time?,
52
+ failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?,
53
+ name: String,
54
+ requirement_id: String?,
55
+ status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status,
56
+ updated: Time,
57
+ upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?,
58
+ upload_url: String?,
59
+ upload_url_expires_at: Time?,
60
+ ?event_type: :"claim_document.accepted"
61
+ ) -> void
62
+
63
+ def to_hash: -> {
64
+ token: String,
65
+ created: Time,
66
+ download_url: String?,
67
+ download_url_expires_at: Time?,
68
+ event_type: :"claim_document.accepted",
69
+ failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?,
70
+ name: String,
71
+ requirement_id: String?,
72
+ status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status,
73
+ updated: Time,
74
+ upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?,
75
+ upload_url: String?,
76
+ upload_url_expires_at: Time?
77
+ }
78
+
79
+ type failure_reason =
80
+ :INVALID_MIME_TYPE
81
+ | :FILE_TOO_LARGE
82
+ | :FILE_EMPTY
83
+ | :CORRUPT_FILE
84
+ | :OTHER
85
+
86
+ module FailureReason
87
+ extend Lithic::Internal::Type::Enum
88
+
89
+ INVALID_MIME_TYPE: :INVALID_MIME_TYPE
90
+ FILE_TOO_LARGE: :FILE_TOO_LARGE
91
+ FILE_EMPTY: :FILE_EMPTY
92
+ CORRUPT_FILE: :CORRUPT_FILE
93
+ OTHER: :OTHER
94
+
95
+ def self?.values: -> ::Array[Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason]
96
+ end
97
+
98
+ type status = :PENDING | :VALIDATING | :ACCEPTED | :REJECTED
99
+
100
+ module Status
101
+ extend Lithic::Internal::Type::Enum
102
+
103
+ PENDING: :PENDING
104
+ VALIDATING: :VALIDATING
105
+ ACCEPTED: :ACCEPTED
106
+ REJECTED: :REJECTED
107
+
108
+ def self?.values: -> ::Array[Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status]
109
+ end
110
+
111
+ type upload_constraints =
112
+ { accepted_mime_types: ::Array[String], max_size_bytes: Integer? }
113
+
114
+ class UploadConstraints < Lithic::Internal::Type::BaseModel
115
+ attr_accessor accepted_mime_types: ::Array[String]
116
+
117
+ attr_accessor max_size_bytes: Integer?
118
+
119
+ def initialize: (
120
+ accepted_mime_types: ::Array[String],
121
+ max_size_bytes: Integer?
122
+ ) -> void
123
+
124
+ def to_hash: -> {
125
+ accepted_mime_types: ::Array[String],
126
+ max_size_bytes: Integer?
127
+ }
128
+ end
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,131 @@
1
+ module Lithic
2
+ module Models
3
+ type claim_document_rejected_webhook_event =
4
+ {
5
+ token: String,
6
+ created: Time,
7
+ download_url: String?,
8
+ download_url_expires_at: Time?,
9
+ event_type: :"claim_document.rejected",
10
+ failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?,
11
+ name: String,
12
+ requirement_id: String?,
13
+ status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status,
14
+ updated: Time,
15
+ upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?,
16
+ upload_url: String?,
17
+ upload_url_expires_at: Time?
18
+ }
19
+
20
+ class ClaimDocumentRejectedWebhookEvent < Lithic::Internal::Type::BaseModel
21
+ attr_accessor token: String
22
+
23
+ attr_accessor created: Time
24
+
25
+ attr_accessor download_url: String?
26
+
27
+ attr_accessor download_url_expires_at: Time?
28
+
29
+ attr_accessor event_type: :"claim_document.rejected"
30
+
31
+ attr_accessor failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?
32
+
33
+ attr_accessor name: String
34
+
35
+ attr_accessor requirement_id: String?
36
+
37
+ attr_accessor status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status
38
+
39
+ attr_accessor updated: Time
40
+
41
+ attr_accessor upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?
42
+
43
+ attr_accessor upload_url: String?
44
+
45
+ attr_accessor upload_url_expires_at: Time?
46
+
47
+ def initialize: (
48
+ token: String,
49
+ created: Time,
50
+ download_url: String?,
51
+ download_url_expires_at: Time?,
52
+ failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?,
53
+ name: String,
54
+ requirement_id: String?,
55
+ status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status,
56
+ updated: Time,
57
+ upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?,
58
+ upload_url: String?,
59
+ upload_url_expires_at: Time?,
60
+ ?event_type: :"claim_document.rejected"
61
+ ) -> void
62
+
63
+ def to_hash: -> {
64
+ token: String,
65
+ created: Time,
66
+ download_url: String?,
67
+ download_url_expires_at: Time?,
68
+ event_type: :"claim_document.rejected",
69
+ failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?,
70
+ name: String,
71
+ requirement_id: String?,
72
+ status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status,
73
+ updated: Time,
74
+ upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?,
75
+ upload_url: String?,
76
+ upload_url_expires_at: Time?
77
+ }
78
+
79
+ type failure_reason =
80
+ :INVALID_MIME_TYPE
81
+ | :FILE_TOO_LARGE
82
+ | :FILE_EMPTY
83
+ | :CORRUPT_FILE
84
+ | :OTHER
85
+
86
+ module FailureReason
87
+ extend Lithic::Internal::Type::Enum
88
+
89
+ INVALID_MIME_TYPE: :INVALID_MIME_TYPE
90
+ FILE_TOO_LARGE: :FILE_TOO_LARGE
91
+ FILE_EMPTY: :FILE_EMPTY
92
+ CORRUPT_FILE: :CORRUPT_FILE
93
+ OTHER: :OTHER
94
+
95
+ def self?.values: -> ::Array[Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason]
96
+ end
97
+
98
+ type status = :PENDING | :VALIDATING | :ACCEPTED | :REJECTED
99
+
100
+ module Status
101
+ extend Lithic::Internal::Type::Enum
102
+
103
+ PENDING: :PENDING
104
+ VALIDATING: :VALIDATING
105
+ ACCEPTED: :ACCEPTED
106
+ REJECTED: :REJECTED
107
+
108
+ def self?.values: -> ::Array[Lithic::Models::ClaimDocumentRejectedWebhookEvent::status]
109
+ end
110
+
111
+ type upload_constraints =
112
+ { accepted_mime_types: ::Array[String], max_size_bytes: Integer? }
113
+
114
+ class UploadConstraints < Lithic::Internal::Type::BaseModel
115
+ attr_accessor accepted_mime_types: ::Array[String]
116
+
117
+ attr_accessor max_size_bytes: Integer?
118
+
119
+ def initialize: (
120
+ accepted_mime_types: ::Array[String],
121
+ max_size_bytes: Integer?
122
+ ) -> void
123
+
124
+ def to_hash: -> {
125
+ accepted_mime_types: ::Array[String],
126
+ max_size_bytes: Integer?
127
+ }
128
+ end
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,131 @@
1
+ module Lithic
2
+ module Models
3
+ type claim_document_uploaded_webhook_event =
4
+ {
5
+ token: String,
6
+ created: Time,
7
+ download_url: String?,
8
+ download_url_expires_at: Time?,
9
+ event_type: :"claim_document.uploaded",
10
+ failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?,
11
+ name: String,
12
+ requirement_id: String?,
13
+ status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status,
14
+ updated: Time,
15
+ upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?,
16
+ upload_url: String?,
17
+ upload_url_expires_at: Time?
18
+ }
19
+
20
+ class ClaimDocumentUploadedWebhookEvent < Lithic::Internal::Type::BaseModel
21
+ attr_accessor token: String
22
+
23
+ attr_accessor created: Time
24
+
25
+ attr_accessor download_url: String?
26
+
27
+ attr_accessor download_url_expires_at: Time?
28
+
29
+ attr_accessor event_type: :"claim_document.uploaded"
30
+
31
+ attr_accessor failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?
32
+
33
+ attr_accessor name: String
34
+
35
+ attr_accessor requirement_id: String?
36
+
37
+ attr_accessor status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status
38
+
39
+ attr_accessor updated: Time
40
+
41
+ attr_accessor upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?
42
+
43
+ attr_accessor upload_url: String?
44
+
45
+ attr_accessor upload_url_expires_at: Time?
46
+
47
+ def initialize: (
48
+ token: String,
49
+ created: Time,
50
+ download_url: String?,
51
+ download_url_expires_at: Time?,
52
+ failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?,
53
+ name: String,
54
+ requirement_id: String?,
55
+ status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status,
56
+ updated: Time,
57
+ upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?,
58
+ upload_url: String?,
59
+ upload_url_expires_at: Time?,
60
+ ?event_type: :"claim_document.uploaded"
61
+ ) -> void
62
+
63
+ def to_hash: -> {
64
+ token: String,
65
+ created: Time,
66
+ download_url: String?,
67
+ download_url_expires_at: Time?,
68
+ event_type: :"claim_document.uploaded",
69
+ failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?,
70
+ name: String,
71
+ requirement_id: String?,
72
+ status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status,
73
+ updated: Time,
74
+ upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?,
75
+ upload_url: String?,
76
+ upload_url_expires_at: Time?
77
+ }
78
+
79
+ type failure_reason =
80
+ :INVALID_MIME_TYPE
81
+ | :FILE_TOO_LARGE
82
+ | :FILE_EMPTY
83
+ | :CORRUPT_FILE
84
+ | :OTHER
85
+
86
+ module FailureReason
87
+ extend Lithic::Internal::Type::Enum
88
+
89
+ INVALID_MIME_TYPE: :INVALID_MIME_TYPE
90
+ FILE_TOO_LARGE: :FILE_TOO_LARGE
91
+ FILE_EMPTY: :FILE_EMPTY
92
+ CORRUPT_FILE: :CORRUPT_FILE
93
+ OTHER: :OTHER
94
+
95
+ def self?.values: -> ::Array[Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason]
96
+ end
97
+
98
+ type status = :PENDING | :VALIDATING | :ACCEPTED | :REJECTED
99
+
100
+ module Status
101
+ extend Lithic::Internal::Type::Enum
102
+
103
+ PENDING: :PENDING
104
+ VALIDATING: :VALIDATING
105
+ ACCEPTED: :ACCEPTED
106
+ REJECTED: :REJECTED
107
+
108
+ def self?.values: -> ::Array[Lithic::Models::ClaimDocumentUploadedWebhookEvent::status]
109
+ end
110
+
111
+ type upload_constraints =
112
+ { accepted_mime_types: ::Array[String], max_size_bytes: Integer? }
113
+
114
+ class UploadConstraints < Lithic::Internal::Type::BaseModel
115
+ attr_accessor accepted_mime_types: ::Array[String]
116
+
117
+ attr_accessor max_size_bytes: Integer?
118
+
119
+ def initialize: (
120
+ accepted_mime_types: ::Array[String],
121
+ max_size_bytes: Integer?
122
+ ) -> void
123
+
124
+ def to_hash: -> {
125
+ accepted_mime_types: ::Array[String],
126
+ max_size_bytes: Integer?
127
+ }
128
+ end
129
+ end
130
+ end
131
+ end