Skip to content

Commit f181c07

Browse files
feat(api): Register dispute intake webhook events
1 parent 4779b36 commit f181c07

44 files changed

Lines changed: 3776 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 214
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-185b3d93b4e6ed5ae02c32f0bc9133b0ac99dcd1263a12b7aa9ba64e71a5461e.yml
3-
openapi_spec_hash: 2418116f58a464afdd5611865e860d30
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-48e8284d7f1f51f36402cf5f22a23b27071af86110e2aeddb8da06f8c790fd3d.yml
3+
openapi_spec_hash: a64ba9e94686bce4f0a8c5b1b3c704da
44
config_hash: 5bb913c05ebeb301ec925b16e75bb251

lib/lithic.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@
219219
require_relative "lithic/models/card_web_provision_response"
220220
require_relative "lithic/models/carrier"
221221
require_relative "lithic/models/category_details"
222+
require_relative "lithic/models/claim_created_webhook_event"
223+
require_relative "lithic/models/claim_document_accepted_webhook_event"
224+
require_relative "lithic/models/claim_document_rejected_webhook_event"
225+
require_relative "lithic/models/claim_document_uploaded_webhook_event"
226+
require_relative "lithic/models/claim_updated_webhook_event"
222227
require_relative "lithic/models/client_api_status_params"
223228
require_relative "lithic/models/credit_products/extended_credit"
224229
require_relative "lithic/models/credit_products/extended_credit_retrieve_params"

lib/lithic/models.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,16 @@ module Lithic
214214

215215
CategoryDetails = Lithic::Models::CategoryDetails
216216

217+
ClaimCreatedWebhookEvent = Lithic::Models::ClaimCreatedWebhookEvent
218+
219+
ClaimDocumentAcceptedWebhookEvent = Lithic::Models::ClaimDocumentAcceptedWebhookEvent
220+
221+
ClaimDocumentRejectedWebhookEvent = Lithic::Models::ClaimDocumentRejectedWebhookEvent
222+
223+
ClaimDocumentUploadedWebhookEvent = Lithic::Models::ClaimDocumentUploadedWebhookEvent
224+
225+
ClaimUpdatedWebhookEvent = Lithic::Models::ClaimUpdatedWebhookEvent
226+
217227
ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams
218228

219229
CreditProducts = Lithic::Models::CreditProducts
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 commit comments

Comments
 (0)