lithic 0.1.0.pre.alpha.53 → 0.1.0.pre.alpha.55

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 (157) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/transport/base_client.rb +7 -1
  5. data/lib/lithic/internal/transport/pooled_net_requester.rb +6 -2
  6. data/lib/lithic/models/account_activity_list_response.rb +1 -0
  7. data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +1 -0
  8. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +2 -2
  9. data/lib/lithic/models/account_holder_update_response.rb +4 -4
  10. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +252 -0
  11. data/lib/lithic/models/auth_rules/v2_create_params.rb +38 -284
  12. data/lib/lithic/models/auth_rules/v2_create_response.rb +8 -508
  13. data/lib/lithic/models/auth_rules/v2_draft_params.rb +4 -250
  14. data/lib/lithic/models/auth_rules/v2_draft_response.rb +8 -508
  15. data/lib/lithic/models/auth_rules/v2_list_response.rb +8 -508
  16. data/lib/lithic/models/auth_rules/v2_promote_response.rb +8 -508
  17. data/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb +4 -11
  18. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +8 -508
  19. data/lib/lithic/models/auth_rules/v2_update_response.rb +8 -508
  20. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +4 -7
  21. data/lib/lithic/models/auth_rules/velocity_limit_period.rb +154 -0
  22. data/lib/lithic/models/book_transfer_response.rb +5 -5
  23. data/lib/lithic/models/dispute.rb +510 -242
  24. data/lib/lithic/models/dispute_create_response.rb +326 -0
  25. data/lib/lithic/models/dispute_delete_response.rb +326 -0
  26. data/lib/lithic/models/dispute_list_response.rb +326 -0
  27. data/lib/lithic/models/dispute_retrieve_response.rb +326 -0
  28. data/lib/lithic/models/dispute_update_response.rb +326 -0
  29. data/lib/lithic/models/event.rb +213 -69
  30. data/lib/lithic/models/event_list_params.rb +112 -6
  31. data/lib/lithic/models/event_subscription.rb +112 -6
  32. data/lib/lithic/models/events/subscription_create_params.rb +112 -6
  33. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +12 -6
  34. data/lib/lithic/models/events/subscription_update_params.rb +112 -6
  35. data/lib/lithic/models/financial_account.rb +1 -65
  36. data/lib/lithic/models/financial_accounts/financial_account_credit_config.rb +1 -64
  37. data/lib/lithic/models/financial_accounts/loan_tape.rb +99 -3
  38. data/lib/lithic/models/financial_accounts/statement.rb +66 -2
  39. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +1 -0
  40. data/lib/lithic/models/financial_transaction.rb +1 -0
  41. data/lib/lithic/models/payment.rb +29 -18
  42. data/lib/lithic/models/payment_simulate_action_params.rb +17 -1
  43. data/lib/lithic/models/tokenization.rb +189 -23
  44. data/lib/lithic/models/transaction.rb +12 -116
  45. data/lib/lithic/models/transactions/events/enhanced_data.rb +9 -9
  46. data/lib/lithic/models/transfer.rb +1 -0
  47. data/lib/lithic/resources/auth_rules/v2/backtests.rb +3 -5
  48. data/lib/lithic/resources/auth_rules/v2.rb +13 -56
  49. data/lib/lithic/resources/disputes.rb +10 -10
  50. data/lib/lithic/resources/payments.rb +5 -1
  51. data/lib/lithic/version.rb +1 -1
  52. data/lib/lithic.rb +8 -3
  53. data/manifest.yaml +1 -0
  54. data/rbi/lithic/internal/transport/base_client.rbi +5 -0
  55. data/rbi/lithic/internal/transport/pooled_net_requester.rbi +6 -2
  56. data/rbi/lithic/internal/type/base_model.rbi +8 -4
  57. data/rbi/lithic/models/account_activity_list_response.rbi +5 -0
  58. data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +5 -0
  59. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +3 -6
  60. data/rbi/lithic/models/account_holder_update_response.rbi +6 -12
  61. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +577 -0
  62. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +85 -679
  63. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +4 -1146
  64. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -575
  65. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +4 -1146
  66. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +4 -1146
  67. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +4 -1146
  68. data/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi +9 -22
  69. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +4 -1146
  70. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +4 -1146
  71. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +17 -29
  72. data/rbi/lithic/models/auth_rules/velocity_limit_period.rbi +223 -0
  73. data/rbi/lithic/models/book_transfer_response.rbi +14 -11
  74. data/rbi/lithic/models/dispute.rbi +942 -395
  75. data/rbi/lithic/models/dispute_create_response.rbi +599 -0
  76. data/rbi/lithic/models/dispute_delete_response.rbi +599 -0
  77. data/rbi/lithic/models/dispute_list_response.rbi +582 -0
  78. data/rbi/lithic/models/dispute_retrieve_response.rbi +601 -0
  79. data/rbi/lithic/models/dispute_update_response.rbi +599 -0
  80. data/rbi/lithic/models/event.rbi +348 -111
  81. data/rbi/lithic/models/event_list_params.rbi +155 -25
  82. data/rbi/lithic/models/event_subscription.rbi +155 -25
  83. data/rbi/lithic/models/events/subscription_create_params.rbi +155 -25
  84. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +55 -25
  85. data/rbi/lithic/models/events/subscription_update_params.rbi +155 -25
  86. data/rbi/lithic/models/financial_account.rbi +3 -132
  87. data/rbi/lithic/models/financial_accounts/financial_account_credit_config.rbi +3 -136
  88. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +132 -9
  89. data/rbi/lithic/models/financial_accounts/statement.rbi +88 -6
  90. data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +5 -0
  91. data/rbi/lithic/models/financial_transaction.rbi +5 -0
  92. data/rbi/lithic/models/payment.rbi +52 -28
  93. data/rbi/lithic/models/payment_simulate_action_params.rbi +22 -0
  94. data/rbi/lithic/models/tokenization.rbi +429 -34
  95. data/rbi/lithic/models/transaction.rbi +22 -246
  96. data/rbi/lithic/models/transactions/events/enhanced_data.rbi +12 -12
  97. data/rbi/lithic/models/transfer.rbi +5 -0
  98. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +0 -3
  99. data/rbi/lithic/resources/auth_rules/v2.rbi +24 -72
  100. data/rbi/lithic/resources/disputes.rbi +7 -5
  101. data/rbi/lithic/resources/payments.rbi +6 -0
  102. data/sig/lithic/internal/transport/base_client.rbs +2 -0
  103. data/sig/lithic/internal/transport/pooled_net_requester.rbs +4 -1
  104. data/sig/lithic/models/account_activity_list_response.rbs +2 -0
  105. data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +2 -0
  106. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +4 -6
  107. data/sig/lithic/models/account_holder_update_response.rbs +8 -12
  108. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +163 -0
  109. data/sig/lithic/models/auth_rules/v2_create_params.rbs +22 -188
  110. data/sig/lithic/models/auth_rules/v2_create_response.rbs +2 -318
  111. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -159
  112. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +2 -318
  113. data/sig/lithic/models/auth_rules/v2_list_response.rbs +2 -318
  114. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +2 -318
  115. data/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs +4 -4
  116. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +2 -318
  117. data/sig/lithic/models/auth_rules/v2_update_response.rbs +2 -318
  118. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +4 -4
  119. data/sig/lithic/models/auth_rules/velocity_limit_period.rbs +91 -0
  120. data/sig/lithic/models/book_transfer_response.rbs +7 -7
  121. data/sig/lithic/models/dispute.rbs +417 -157
  122. data/sig/lithic/models/dispute_create_response.rbs +210 -0
  123. data/sig/lithic/models/dispute_delete_response.rbs +210 -0
  124. data/sig/lithic/models/dispute_list_response.rbs +210 -0
  125. data/sig/lithic/models/dispute_retrieve_response.rbs +210 -0
  126. data/sig/lithic/models/dispute_update_response.rbs +210 -0
  127. data/sig/lithic/models/event.rbs +25 -13
  128. data/sig/lithic/models/event_list_params.rbs +25 -13
  129. data/sig/lithic/models/event_subscription.rbs +25 -13
  130. data/sig/lithic/models/events/subscription_create_params.rbs +25 -13
  131. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +25 -13
  132. data/sig/lithic/models/events/subscription_update_params.rbs +25 -13
  133. data/sig/lithic/models/financial_account.rbs +3 -45
  134. data/sig/lithic/models/financial_accounts/financial_account_credit_config.rbs +3 -49
  135. data/sig/lithic/models/financial_accounts/loan_tape.rbs +87 -9
  136. data/sig/lithic/models/financial_accounts/statement.rbs +58 -6
  137. data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +2 -0
  138. data/sig/lithic/models/financial_transaction.rbs +2 -0
  139. data/sig/lithic/models/payment.rbs +16 -12
  140. data/sig/lithic/models/payment_simulate_action_params.rbs +14 -0
  141. data/sig/lithic/models/tokenization.rbs +160 -13
  142. data/sig/lithic/models/transaction.rbs +13 -94
  143. data/sig/lithic/models/transactions/events/enhanced_data.rbs +15 -15
  144. data/sig/lithic/models/transfer.rbs +2 -0
  145. data/sig/lithic/resources/auth_rules/v2.rbs +2 -12
  146. data/sig/lithic/resources/disputes.rbs +5 -5
  147. data/sig/lithic/resources/payments.rbs +2 -0
  148. metadata +23 -11
  149. data/lib/lithic/models/auth_rules/v2_apply_params.rb +0 -56
  150. data/lib/lithic/models/auth_rules/v2_apply_response.rb +0 -766
  151. data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +0 -248
  152. data/rbi/lithic/models/auth_rules/v2_apply_params.rbi +0 -86
  153. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +0 -1638
  154. data/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +0 -557
  155. data/sig/lithic/models/auth_rules/v2_apply_params.rbs +0 -54
  156. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +0 -509
  157. data/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +0 -223
@@ -6,237 +6,129 @@ module Lithic
6
6
  OrHash =
7
7
  T.type_alias { T.any(Lithic::Dispute, Lithic::Internal::AnyHash) }
8
8
 
9
- # Globally unique identifier.
9
+ # Token assigned by Lithic for the dispute, in UUID format.
10
10
  sig { returns(String) }
11
11
  attr_accessor :token
12
12
 
13
- # Amount under dispute. May be different from the original transaction amount.
14
- sig { returns(Integer) }
15
- attr_accessor :amount
13
+ # Token for the account associated with the dispute, in UUID format.
14
+ sig { returns(String) }
15
+ attr_accessor :account_token
16
+
17
+ # Token for the card used in the dispute, in UUID format.
18
+ sig { returns(String) }
19
+ attr_accessor :card_token
16
20
 
17
- # Date dispute entered arbitration.
18
- sig { returns(T.nilable(Time)) }
19
- attr_accessor :arbitration_date
21
+ # Identifier assigned by the network for this dispute.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_accessor :case_id
20
24
 
21
- # Timestamp of when first Dispute was reported.
25
+ # When the dispute was created.
22
26
  sig { returns(Time) }
23
27
  attr_accessor :created
24
28
 
25
- # Date that the dispute was filed by the customer making the dispute.
26
- sig { returns(T.nilable(Time)) }
27
- attr_accessor :customer_filed_date
29
+ # Three-letter ISO 4217 currency code.
30
+ sig { returns(String) }
31
+ attr_accessor :currency
28
32
 
29
- # End customer description of the reason for the dispute.
30
- sig { returns(T.nilable(String)) }
31
- attr_accessor :customer_note
33
+ # Dispute resolution outcome
34
+ sig { returns(T.nilable(Lithic::Dispute::Disposition::OrSymbol)) }
35
+ attr_accessor :disposition
32
36
 
33
- # Unique identifiers for the dispute from the network.
34
- sig { returns(T.nilable(T::Array[String])) }
35
- attr_accessor :network_claim_ids
37
+ # Chronological list of events that have occurred in the dispute lifecycle
38
+ sig { returns(T::Array[Lithic::Dispute::Event]) }
39
+ attr_accessor :events
36
40
 
37
- # Date that the dispute was submitted to the network.
38
- sig { returns(T.nilable(Time)) }
39
- attr_accessor :network_filed_date
41
+ # Current breakdown of how liability is allocated for the disputed amount
42
+ sig { returns(Lithic::Dispute::LiabilityAllocation) }
43
+ attr_reader :liability_allocation
40
44
 
41
- # Network reason code used to file the dispute.
42
- sig { returns(T.nilable(String)) }
43
- attr_accessor :network_reason_code
45
+ sig do
46
+ params(
47
+ liability_allocation: Lithic::Dispute::LiabilityAllocation::OrHash
48
+ ).void
49
+ end
50
+ attr_writer :liability_allocation
44
51
 
45
- # Date dispute entered pre-arbitration.
46
- sig { returns(T.nilable(Time)) }
47
- attr_accessor :prearbitration_date
52
+ sig { returns(Lithic::Dispute::Merchant) }
53
+ attr_reader :merchant
54
+
55
+ sig { params(merchant: Lithic::Dispute::Merchant::OrHash).void }
56
+ attr_writer :merchant
57
+
58
+ # Card network handling the dispute.
59
+ sig { returns(Lithic::Dispute::Network::OrSymbol) }
60
+ attr_accessor :network
61
+
62
+ # Current status of the dispute.
63
+ sig { returns(T.nilable(Lithic::Dispute::Status::OrSymbol)) }
64
+ attr_accessor :status
65
+
66
+ # Contains identifiers for the transaction and specific event within being
67
+ # disputed; null if no transaction can be identified
68
+ sig { returns(T.nilable(Lithic::Dispute::TransactionSeries)) }
69
+ attr_reader :transaction_series
48
70
 
49
- # Unique identifier for the dispute from the network. If there are multiple, this
50
- # will be the first claim id set by the network
51
- sig { returns(T.nilable(String)) }
52
- attr_accessor :primary_claim_id
53
-
54
- # Dispute reason:
55
- #
56
- # - `ATM_CASH_MISDISPENSE`: ATM cash misdispense.
57
- # - `CANCELLED`: Transaction was cancelled by the customer.
58
- # - `DUPLICATED`: The transaction was a duplicate.
59
- # - `FRAUD_CARD_NOT_PRESENT`: Fraudulent transaction, card not present.
60
- # - `FRAUD_CARD_PRESENT`: Fraudulent transaction, card present.
61
- # - `FRAUD_OTHER`: Fraudulent transaction, other types such as questionable
62
- # merchant activity.
63
- # - `GOODS_SERVICES_NOT_AS_DESCRIBED`: The goods or services were not as
64
- # described.
65
- # - `GOODS_SERVICES_NOT_RECEIVED`: The goods or services were not received.
66
- # - `INCORRECT_AMOUNT`: The transaction amount was incorrect.
67
- # - `MISSING_AUTH`: The transaction was missing authorization.
68
- # - `OTHER`: Other reason.
69
- # - `PROCESSING_ERROR`: Processing error.
70
- # - `REFUND_NOT_PROCESSED`: The refund was not processed.
71
- # - `RECURRING_TRANSACTION_NOT_CANCELLED`: The recurring transaction was not
72
- # cancelled.
73
- sig { returns(Lithic::Dispute::Reason::TaggedSymbol) }
74
- attr_accessor :reason
75
-
76
- # Date the representment was received.
77
- sig { returns(T.nilable(Time)) }
78
- attr_accessor :representment_date
79
-
80
- # Date that the dispute was resolved.
81
- sig { returns(T.nilable(Time)) }
82
- attr_accessor :resolution_date
83
-
84
- # Note by Dispute team on the case resolution.
85
- sig { returns(T.nilable(String)) }
86
- attr_accessor :resolution_note
87
-
88
- # Reason for the dispute resolution:
89
- #
90
- # - `CASE_LOST`: This case was lost at final arbitration.
91
- # - `NETWORK_REJECTED`: Network rejected.
92
- # - `NO_DISPUTE_RIGHTS_3DS`: No dispute rights, 3DS.
93
- # - `NO_DISPUTE_RIGHTS_BELOW_THRESHOLD`: No dispute rights, below threshold.
94
- # - `NO_DISPUTE_RIGHTS_CONTACTLESS`: No dispute rights, contactless.
95
- # - `NO_DISPUTE_RIGHTS_HYBRID`: No dispute rights, hybrid.
96
- # - `NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS`: No dispute rights, max chargebacks.
97
- # - `NO_DISPUTE_RIGHTS_OTHER`: No dispute rights, other.
98
- # - `PAST_FILING_DATE`: Past filing date.
99
- # - `PREARBITRATION_REJECTED`: Prearbitration rejected.
100
- # - `PROCESSOR_REJECTED_OTHER`: Processor rejected, other.
101
- # - `REFUNDED`: Refunded.
102
- # - `REFUNDED_AFTER_CHARGEBACK`: Refunded after chargeback.
103
- # - `WITHDRAWN`: Withdrawn.
104
- # - `WON_ARBITRATION`: Won arbitration.
105
- # - `WON_FIRST_CHARGEBACK`: Won first chargeback.
106
- # - `WON_PREARBITRATION`: Won prearbitration.
107
71
  sig do
108
- returns(T.nilable(Lithic::Dispute::ResolutionReason::TaggedSymbol))
72
+ params(
73
+ transaction_series:
74
+ T.nilable(Lithic::Dispute::TransactionSeries::OrHash)
75
+ ).void
109
76
  end
110
- attr_accessor :resolution_reason
111
-
112
- # Status types:
113
- #
114
- # - `NEW` - New dispute case is opened.
115
- # - `PENDING_CUSTOMER` - Lithic is waiting for customer to provide more
116
- # information.
117
- # - `SUBMITTED` - Dispute is submitted to the card network.
118
- # - `REPRESENTMENT` - Case has entered second presentment.
119
- # - `PREARBITRATION` - Case has entered prearbitration.
120
- # - `ARBITRATION` - Case has entered arbitration.
121
- # - `CASE_WON` - Case was won and credit will be issued.
122
- # - `CASE_CLOSED` - Case was lost or withdrawn.
123
- sig { returns(Lithic::Dispute::Status::TaggedSymbol) }
124
- attr_accessor :status
77
+ attr_writer :transaction_series
125
78
 
126
- # The transaction that is being disputed. A transaction can only be disputed once
127
- # but may have multiple dispute cases.
128
- sig { returns(String) }
129
- attr_accessor :transaction_token
79
+ # When the dispute was last updated.
80
+ sig { returns(Time) }
81
+ attr_accessor :updated
130
82
 
131
- # Dispute.
83
+ # The Dispute object tracks the progression of a dispute throughout its lifecycle.
132
84
  sig do
133
85
  params(
134
86
  token: String,
135
- amount: Integer,
136
- arbitration_date: T.nilable(Time),
87
+ account_token: String,
88
+ card_token: String,
89
+ case_id: T.nilable(String),
137
90
  created: Time,
138
- customer_filed_date: T.nilable(Time),
139
- customer_note: T.nilable(String),
140
- network_claim_ids: T.nilable(T::Array[String]),
141
- network_filed_date: T.nilable(Time),
142
- network_reason_code: T.nilable(String),
143
- prearbitration_date: T.nilable(Time),
144
- primary_claim_id: T.nilable(String),
145
- reason: Lithic::Dispute::Reason::OrSymbol,
146
- representment_date: T.nilable(Time),
147
- resolution_date: T.nilable(Time),
148
- resolution_note: T.nilable(String),
149
- resolution_reason:
150
- T.nilable(Lithic::Dispute::ResolutionReason::OrSymbol),
151
- status: Lithic::Dispute::Status::OrSymbol,
152
- transaction_token: String
91
+ currency: String,
92
+ disposition: T.nilable(Lithic::Dispute::Disposition::OrSymbol),
93
+ events: T::Array[Lithic::Dispute::Event::OrHash],
94
+ liability_allocation: Lithic::Dispute::LiabilityAllocation::OrHash,
95
+ merchant: Lithic::Dispute::Merchant::OrHash,
96
+ network: Lithic::Dispute::Network::OrSymbol,
97
+ status: T.nilable(Lithic::Dispute::Status::OrSymbol),
98
+ transaction_series:
99
+ T.nilable(Lithic::Dispute::TransactionSeries::OrHash),
100
+ updated: Time
153
101
  ).returns(T.attached_class)
154
102
  end
155
103
  def self.new(
156
- # Globally unique identifier.
104
+ # Token assigned by Lithic for the dispute, in UUID format.
157
105
  token:,
158
- # Amount under dispute. May be different from the original transaction amount.
159
- amount:,
160
- # Date dispute entered arbitration.
161
- arbitration_date:,
162
- # Timestamp of when first Dispute was reported.
106
+ # Token for the account associated with the dispute, in UUID format.
107
+ account_token:,
108
+ # Token for the card used in the dispute, in UUID format.
109
+ card_token:,
110
+ # Identifier assigned by the network for this dispute.
111
+ case_id:,
112
+ # When the dispute was created.
163
113
  created:,
164
- # Date that the dispute was filed by the customer making the dispute.
165
- customer_filed_date:,
166
- # End customer description of the reason for the dispute.
167
- customer_note:,
168
- # Unique identifiers for the dispute from the network.
169
- network_claim_ids:,
170
- # Date that the dispute was submitted to the network.
171
- network_filed_date:,
172
- # Network reason code used to file the dispute.
173
- network_reason_code:,
174
- # Date dispute entered pre-arbitration.
175
- prearbitration_date:,
176
- # Unique identifier for the dispute from the network. If there are multiple, this
177
- # will be the first claim id set by the network
178
- primary_claim_id:,
179
- # Dispute reason:
180
- #
181
- # - `ATM_CASH_MISDISPENSE`: ATM cash misdispense.
182
- # - `CANCELLED`: Transaction was cancelled by the customer.
183
- # - `DUPLICATED`: The transaction was a duplicate.
184
- # - `FRAUD_CARD_NOT_PRESENT`: Fraudulent transaction, card not present.
185
- # - `FRAUD_CARD_PRESENT`: Fraudulent transaction, card present.
186
- # - `FRAUD_OTHER`: Fraudulent transaction, other types such as questionable
187
- # merchant activity.
188
- # - `GOODS_SERVICES_NOT_AS_DESCRIBED`: The goods or services were not as
189
- # described.
190
- # - `GOODS_SERVICES_NOT_RECEIVED`: The goods or services were not received.
191
- # - `INCORRECT_AMOUNT`: The transaction amount was incorrect.
192
- # - `MISSING_AUTH`: The transaction was missing authorization.
193
- # - `OTHER`: Other reason.
194
- # - `PROCESSING_ERROR`: Processing error.
195
- # - `REFUND_NOT_PROCESSED`: The refund was not processed.
196
- # - `RECURRING_TRANSACTION_NOT_CANCELLED`: The recurring transaction was not
197
- # cancelled.
198
- reason:,
199
- # Date the representment was received.
200
- representment_date:,
201
- # Date that the dispute was resolved.
202
- resolution_date:,
203
- # Note by Dispute team on the case resolution.
204
- resolution_note:,
205
- # Reason for the dispute resolution:
206
- #
207
- # - `CASE_LOST`: This case was lost at final arbitration.
208
- # - `NETWORK_REJECTED`: Network rejected.
209
- # - `NO_DISPUTE_RIGHTS_3DS`: No dispute rights, 3DS.
210
- # - `NO_DISPUTE_RIGHTS_BELOW_THRESHOLD`: No dispute rights, below threshold.
211
- # - `NO_DISPUTE_RIGHTS_CONTACTLESS`: No dispute rights, contactless.
212
- # - `NO_DISPUTE_RIGHTS_HYBRID`: No dispute rights, hybrid.
213
- # - `NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS`: No dispute rights, max chargebacks.
214
- # - `NO_DISPUTE_RIGHTS_OTHER`: No dispute rights, other.
215
- # - `PAST_FILING_DATE`: Past filing date.
216
- # - `PREARBITRATION_REJECTED`: Prearbitration rejected.
217
- # - `PROCESSOR_REJECTED_OTHER`: Processor rejected, other.
218
- # - `REFUNDED`: Refunded.
219
- # - `REFUNDED_AFTER_CHARGEBACK`: Refunded after chargeback.
220
- # - `WITHDRAWN`: Withdrawn.
221
- # - `WON_ARBITRATION`: Won arbitration.
222
- # - `WON_FIRST_CHARGEBACK`: Won first chargeback.
223
- # - `WON_PREARBITRATION`: Won prearbitration.
224
- resolution_reason:,
225
- # Status types:
226
- #
227
- # - `NEW` - New dispute case is opened.
228
- # - `PENDING_CUSTOMER` - Lithic is waiting for customer to provide more
229
- # information.
230
- # - `SUBMITTED` - Dispute is submitted to the card network.
231
- # - `REPRESENTMENT` - Case has entered second presentment.
232
- # - `PREARBITRATION` - Case has entered prearbitration.
233
- # - `ARBITRATION` - Case has entered arbitration.
234
- # - `CASE_WON` - Case was won and credit will be issued.
235
- # - `CASE_CLOSED` - Case was lost or withdrawn.
114
+ # Three-letter ISO 4217 currency code.
115
+ currency:,
116
+ # Dispute resolution outcome
117
+ disposition:,
118
+ # Chronological list of events that have occurred in the dispute lifecycle
119
+ events:,
120
+ # Current breakdown of how liability is allocated for the disputed amount
121
+ liability_allocation:,
122
+ merchant:,
123
+ # Card network handling the dispute.
124
+ network:,
125
+ # Current status of the dispute.
236
126
  status:,
237
- # The transaction that is being disputed. A transaction can only be disputed once
238
- # but may have multiple dispute cases.
239
- transaction_token:
127
+ # Contains identifiers for the transaction and specific event within being
128
+ # disputed; null if no transaction can be identified
129
+ transaction_series:,
130
+ # When the dispute was last updated.
131
+ updated:
240
132
  )
241
133
  end
242
134
 
@@ -244,236 +136,811 @@ module Lithic
244
136
  override.returns(
245
137
  {
246
138
  token: String,
247
- amount: Integer,
248
- arbitration_date: T.nilable(Time),
139
+ account_token: String,
140
+ card_token: String,
141
+ case_id: T.nilable(String),
249
142
  created: Time,
250
- customer_filed_date: T.nilable(Time),
251
- customer_note: T.nilable(String),
252
- network_claim_ids: T.nilable(T::Array[String]),
253
- network_filed_date: T.nilable(Time),
254
- network_reason_code: T.nilable(String),
255
- prearbitration_date: T.nilable(Time),
256
- primary_claim_id: T.nilable(String),
257
- reason: Lithic::Dispute::Reason::TaggedSymbol,
258
- representment_date: T.nilable(Time),
259
- resolution_date: T.nilable(Time),
260
- resolution_note: T.nilable(String),
261
- resolution_reason:
262
- T.nilable(Lithic::Dispute::ResolutionReason::TaggedSymbol),
263
- status: Lithic::Dispute::Status::TaggedSymbol,
264
- transaction_token: String
143
+ currency: String,
144
+ disposition: T.nilable(Lithic::Dispute::Disposition::OrSymbol),
145
+ events: T::Array[Lithic::Dispute::Event],
146
+ liability_allocation: Lithic::Dispute::LiabilityAllocation,
147
+ merchant: Lithic::Dispute::Merchant,
148
+ network: Lithic::Dispute::Network::OrSymbol,
149
+ status: T.nilable(Lithic::Dispute::Status::OrSymbol),
150
+ transaction_series: T.nilable(Lithic::Dispute::TransactionSeries),
151
+ updated: Time
265
152
  }
266
153
  )
267
154
  end
268
155
  def to_hash
269
156
  end
270
157
 
271
- # Dispute reason:
272
- #
273
- # - `ATM_CASH_MISDISPENSE`: ATM cash misdispense.
274
- # - `CANCELLED`: Transaction was cancelled by the customer.
275
- # - `DUPLICATED`: The transaction was a duplicate.
276
- # - `FRAUD_CARD_NOT_PRESENT`: Fraudulent transaction, card not present.
277
- # - `FRAUD_CARD_PRESENT`: Fraudulent transaction, card present.
278
- # - `FRAUD_OTHER`: Fraudulent transaction, other types such as questionable
279
- # merchant activity.
280
- # - `GOODS_SERVICES_NOT_AS_DESCRIBED`: The goods or services were not as
281
- # described.
282
- # - `GOODS_SERVICES_NOT_RECEIVED`: The goods or services were not received.
283
- # - `INCORRECT_AMOUNT`: The transaction amount was incorrect.
284
- # - `MISSING_AUTH`: The transaction was missing authorization.
285
- # - `OTHER`: Other reason.
286
- # - `PROCESSING_ERROR`: Processing error.
287
- # - `REFUND_NOT_PROCESSED`: The refund was not processed.
288
- # - `RECURRING_TRANSACTION_NOT_CANCELLED`: The recurring transaction was not
289
- # cancelled.
290
- module Reason
158
+ # Dispute resolution outcome
159
+ module Disposition
291
160
  extend Lithic::Internal::Type::Enum
292
161
 
293
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Dispute::Reason) }
162
+ TaggedSymbol =
163
+ T.type_alias { T.all(Symbol, Lithic::Dispute::Disposition) }
294
164
  OrSymbol = T.type_alias { T.any(Symbol, String) }
295
165
 
296
- ATM_CASH_MISDISPENSE =
297
- T.let(:ATM_CASH_MISDISPENSE, Lithic::Dispute::Reason::TaggedSymbol)
298
- CANCELLED = T.let(:CANCELLED, Lithic::Dispute::Reason::TaggedSymbol)
299
- DUPLICATED = T.let(:DUPLICATED, Lithic::Dispute::Reason::TaggedSymbol)
300
- FRAUD_CARD_NOT_PRESENT =
301
- T.let(:FRAUD_CARD_NOT_PRESENT, Lithic::Dispute::Reason::TaggedSymbol)
302
- FRAUD_CARD_PRESENT =
303
- T.let(:FRAUD_CARD_PRESENT, Lithic::Dispute::Reason::TaggedSymbol)
304
- FRAUD_OTHER = T.let(:FRAUD_OTHER, Lithic::Dispute::Reason::TaggedSymbol)
305
- GOODS_SERVICES_NOT_AS_DESCRIBED =
306
- T.let(
307
- :GOODS_SERVICES_NOT_AS_DESCRIBED,
308
- Lithic::Dispute::Reason::TaggedSymbol
309
- )
310
- GOODS_SERVICES_NOT_RECEIVED =
311
- T.let(
312
- :GOODS_SERVICES_NOT_RECEIVED,
313
- Lithic::Dispute::Reason::TaggedSymbol
314
- )
315
- INCORRECT_AMOUNT =
316
- T.let(:INCORRECT_AMOUNT, Lithic::Dispute::Reason::TaggedSymbol)
317
- MISSING_AUTH =
318
- T.let(:MISSING_AUTH, Lithic::Dispute::Reason::TaggedSymbol)
319
- OTHER = T.let(:OTHER, Lithic::Dispute::Reason::TaggedSymbol)
320
- PROCESSING_ERROR =
321
- T.let(:PROCESSING_ERROR, Lithic::Dispute::Reason::TaggedSymbol)
322
- RECURRING_TRANSACTION_NOT_CANCELLED =
323
- T.let(
324
- :RECURRING_TRANSACTION_NOT_CANCELLED,
325
- Lithic::Dispute::Reason::TaggedSymbol
326
- )
327
- REFUND_NOT_PROCESSED =
328
- T.let(:REFUND_NOT_PROCESSED, Lithic::Dispute::Reason::TaggedSymbol)
166
+ WON = T.let(:WON, Lithic::Dispute::Disposition::TaggedSymbol)
167
+ LOST = T.let(:LOST, Lithic::Dispute::Disposition::TaggedSymbol)
168
+ PARTIALLY_WON =
169
+ T.let(:PARTIALLY_WON, Lithic::Dispute::Disposition::TaggedSymbol)
170
+ WITHDRAWN =
171
+ T.let(:WITHDRAWN, Lithic::Dispute::Disposition::TaggedSymbol)
172
+ DENIED = T.let(:DENIED, Lithic::Dispute::Disposition::TaggedSymbol)
329
173
 
330
174
  sig do
331
- override.returns(T::Array[Lithic::Dispute::Reason::TaggedSymbol])
175
+ override.returns(T::Array[Lithic::Dispute::Disposition::TaggedSymbol])
332
176
  end
333
177
  def self.values
334
178
  end
335
179
  end
336
180
 
337
- # Reason for the dispute resolution:
338
- #
339
- # - `CASE_LOST`: This case was lost at final arbitration.
340
- # - `NETWORK_REJECTED`: Network rejected.
341
- # - `NO_DISPUTE_RIGHTS_3DS`: No dispute rights, 3DS.
342
- # - `NO_DISPUTE_RIGHTS_BELOW_THRESHOLD`: No dispute rights, below threshold.
343
- # - `NO_DISPUTE_RIGHTS_CONTACTLESS`: No dispute rights, contactless.
344
- # - `NO_DISPUTE_RIGHTS_HYBRID`: No dispute rights, hybrid.
345
- # - `NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS`: No dispute rights, max chargebacks.
346
- # - `NO_DISPUTE_RIGHTS_OTHER`: No dispute rights, other.
347
- # - `PAST_FILING_DATE`: Past filing date.
348
- # - `PREARBITRATION_REJECTED`: Prearbitration rejected.
349
- # - `PROCESSOR_REJECTED_OTHER`: Processor rejected, other.
350
- # - `REFUNDED`: Refunded.
351
- # - `REFUNDED_AFTER_CHARGEBACK`: Refunded after chargeback.
352
- # - `WITHDRAWN`: Withdrawn.
353
- # - `WON_ARBITRATION`: Won arbitration.
354
- # - `WON_FIRST_CHARGEBACK`: Won first chargeback.
355
- # - `WON_PREARBITRATION`: Won prearbitration.
356
- module ResolutionReason
357
- extend Lithic::Internal::Type::Enum
181
+ class Event < Lithic::Internal::Type::BaseModel
182
+ OrHash =
183
+ T.type_alias do
184
+ T.any(Lithic::Dispute::Event, Lithic::Internal::AnyHash)
185
+ end
358
186
 
359
- TaggedSymbol =
360
- T.type_alias { T.all(Symbol, Lithic::Dispute::ResolutionReason) }
361
- OrSymbol = T.type_alias { T.any(Symbol, String) }
187
+ # Unique identifier for the event, in UUID format
188
+ sig { returns(String) }
189
+ attr_accessor :token
362
190
 
363
- CASE_LOST =
364
- T.let(:CASE_LOST, Lithic::Dispute::ResolutionReason::TaggedSymbol)
365
- NETWORK_REJECTED =
366
- T.let(
367
- :NETWORK_REJECTED,
368
- Lithic::Dispute::ResolutionReason::TaggedSymbol
369
- )
370
- NO_DISPUTE_RIGHTS_3DS =
371
- T.let(
372
- :NO_DISPUTE_RIGHTS_3DS,
373
- Lithic::Dispute::ResolutionReason::TaggedSymbol
374
- )
375
- NO_DISPUTE_RIGHTS_BELOW_THRESHOLD =
376
- T.let(
377
- :NO_DISPUTE_RIGHTS_BELOW_THRESHOLD,
378
- Lithic::Dispute::ResolutionReason::TaggedSymbol
379
- )
380
- NO_DISPUTE_RIGHTS_CONTACTLESS =
381
- T.let(
382
- :NO_DISPUTE_RIGHTS_CONTACTLESS,
383
- Lithic::Dispute::ResolutionReason::TaggedSymbol
384
- )
385
- NO_DISPUTE_RIGHTS_HYBRID =
386
- T.let(
387
- :NO_DISPUTE_RIGHTS_HYBRID,
388
- Lithic::Dispute::ResolutionReason::TaggedSymbol
389
- )
390
- NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS =
391
- T.let(
392
- :NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS,
393
- Lithic::Dispute::ResolutionReason::TaggedSymbol
394
- )
395
- NO_DISPUTE_RIGHTS_OTHER =
396
- T.let(
397
- :NO_DISPUTE_RIGHTS_OTHER,
398
- Lithic::Dispute::ResolutionReason::TaggedSymbol
399
- )
400
- PAST_FILING_DATE =
401
- T.let(
402
- :PAST_FILING_DATE,
403
- Lithic::Dispute::ResolutionReason::TaggedSymbol
404
- )
405
- PREARBITRATION_REJECTED =
406
- T.let(
407
- :PREARBITRATION_REJECTED,
408
- Lithic::Dispute::ResolutionReason::TaggedSymbol
409
- )
410
- PROCESSOR_REJECTED_OTHER =
411
- T.let(
412
- :PROCESSOR_REJECTED_OTHER,
413
- Lithic::Dispute::ResolutionReason::TaggedSymbol
414
- )
415
- REFUNDED =
416
- T.let(:REFUNDED, Lithic::Dispute::ResolutionReason::TaggedSymbol)
417
- REFUNDED_AFTER_CHARGEBACK =
418
- T.let(
419
- :REFUNDED_AFTER_CHARGEBACK,
420
- Lithic::Dispute::ResolutionReason::TaggedSymbol
421
- )
422
- WITHDRAWN =
423
- T.let(:WITHDRAWN, Lithic::Dispute::ResolutionReason::TaggedSymbol)
424
- WON_ARBITRATION =
425
- T.let(
426
- :WON_ARBITRATION,
427
- Lithic::Dispute::ResolutionReason::TaggedSymbol
191
+ # When the event occurred
192
+ sig { returns(Time) }
193
+ attr_accessor :created
194
+
195
+ # Details specific to the event type
196
+ sig do
197
+ returns(
198
+ T.any(
199
+ Lithic::Dispute::Event::Data::WorkflowEventData,
200
+ Lithic::Dispute::Event::Data::FinancialEventData,
201
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData
202
+ )
428
203
  )
429
- WON_FIRST_CHARGEBACK =
430
- T.let(
431
- :WON_FIRST_CHARGEBACK,
432
- Lithic::Dispute::ResolutionReason::TaggedSymbol
204
+ end
205
+ attr_accessor :data
206
+
207
+ # Type of event
208
+ sig { returns(Lithic::Dispute::Event::Type::OrSymbol) }
209
+ attr_accessor :type
210
+
211
+ # Event that occurred in the dispute lifecycle
212
+ sig do
213
+ params(
214
+ token: String,
215
+ created: Time,
216
+ data:
217
+ T.any(
218
+ Lithic::Dispute::Event::Data::WorkflowEventData::OrHash,
219
+ Lithic::Dispute::Event::Data::FinancialEventData::OrHash,
220
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::OrHash
221
+ ),
222
+ type: Lithic::Dispute::Event::Type::OrSymbol
223
+ ).returns(T.attached_class)
224
+ end
225
+ def self.new(
226
+ # Unique identifier for the event, in UUID format
227
+ token:,
228
+ # When the event occurred
229
+ created:,
230
+ # Details specific to the event type
231
+ data:,
232
+ # Type of event
233
+ type:
234
+ )
235
+ end
236
+
237
+ sig do
238
+ override.returns(
239
+ {
240
+ token: String,
241
+ created: Time,
242
+ data:
243
+ T.any(
244
+ Lithic::Dispute::Event::Data::WorkflowEventData,
245
+ Lithic::Dispute::Event::Data::FinancialEventData,
246
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData
247
+ ),
248
+ type: Lithic::Dispute::Event::Type::OrSymbol
249
+ }
433
250
  )
434
- WON_PREARBITRATION =
435
- T.let(
436
- :WON_PREARBITRATION,
437
- Lithic::Dispute::ResolutionReason::TaggedSymbol
251
+ end
252
+ def to_hash
253
+ end
254
+
255
+ # Details specific to the event type
256
+ module Data
257
+ extend Lithic::Internal::Type::Union
258
+
259
+ Variants =
260
+ T.type_alias do
261
+ T.any(
262
+ Lithic::Dispute::Event::Data::WorkflowEventData,
263
+ Lithic::Dispute::Event::Data::FinancialEventData,
264
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData
265
+ )
266
+ end
267
+
268
+ class WorkflowEventData < Lithic::Internal::Type::BaseModel
269
+ OrHash =
270
+ T.type_alias do
271
+ T.any(
272
+ Lithic::Dispute::Event::Data::WorkflowEventData,
273
+ Lithic::Internal::AnyHash
274
+ )
275
+ end
276
+
277
+ # Action taken in this stage
278
+ sig do
279
+ returns(
280
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::OrSymbol
281
+ )
282
+ end
283
+ attr_accessor :action
284
+
285
+ # Amount in minor units
286
+ sig { returns(T.nilable(Integer)) }
287
+ attr_accessor :amount
288
+
289
+ # Dispute resolution outcome
290
+ sig do
291
+ returns(
292
+ T.nilable(
293
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::OrSymbol
294
+ )
295
+ )
296
+ end
297
+ attr_accessor :disposition
298
+
299
+ # Reason for the action
300
+ sig { returns(T.nilable(String)) }
301
+ attr_accessor :reason
302
+
303
+ # Current stage of the dispute workflow
304
+ sig do
305
+ returns(
306
+ Lithic::Dispute::Event::Data::WorkflowEventData::Stage::OrSymbol
307
+ )
308
+ end
309
+ attr_accessor :stage
310
+
311
+ # Details specific to workflow events
312
+ sig do
313
+ params(
314
+ action:
315
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::OrSymbol,
316
+ amount: T.nilable(Integer),
317
+ disposition:
318
+ T.nilable(
319
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::OrSymbol
320
+ ),
321
+ reason: T.nilable(String),
322
+ stage:
323
+ Lithic::Dispute::Event::Data::WorkflowEventData::Stage::OrSymbol
324
+ ).returns(T.attached_class)
325
+ end
326
+ def self.new(
327
+ # Action taken in this stage
328
+ action:,
329
+ # Amount in minor units
330
+ amount:,
331
+ # Dispute resolution outcome
332
+ disposition:,
333
+ # Reason for the action
334
+ reason:,
335
+ # Current stage of the dispute workflow
336
+ stage:
337
+ )
338
+ end
339
+
340
+ sig do
341
+ override.returns(
342
+ {
343
+ action:
344
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::OrSymbol,
345
+ amount: T.nilable(Integer),
346
+ disposition:
347
+ T.nilable(
348
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::OrSymbol
349
+ ),
350
+ reason: T.nilable(String),
351
+ stage:
352
+ Lithic::Dispute::Event::Data::WorkflowEventData::Stage::OrSymbol
353
+ }
354
+ )
355
+ end
356
+ def to_hash
357
+ end
358
+
359
+ # Action taken in this stage
360
+ module Action
361
+ extend Lithic::Internal::Type::Enum
362
+
363
+ TaggedSymbol =
364
+ T.type_alias do
365
+ T.all(
366
+ Symbol,
367
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action
368
+ )
369
+ end
370
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
371
+
372
+ OPENED =
373
+ T.let(
374
+ :OPENED,
375
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::TaggedSymbol
376
+ )
377
+ CLOSED =
378
+ T.let(
379
+ :CLOSED,
380
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::TaggedSymbol
381
+ )
382
+ REOPENED =
383
+ T.let(
384
+ :REOPENED,
385
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::TaggedSymbol
386
+ )
387
+
388
+ sig do
389
+ override.returns(
390
+ T::Array[
391
+ Lithic::Dispute::Event::Data::WorkflowEventData::Action::TaggedSymbol
392
+ ]
393
+ )
394
+ end
395
+ def self.values
396
+ end
397
+ end
398
+
399
+ # Dispute resolution outcome
400
+ module Disposition
401
+ extend Lithic::Internal::Type::Enum
402
+
403
+ TaggedSymbol =
404
+ T.type_alias do
405
+ T.all(
406
+ Symbol,
407
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition
408
+ )
409
+ end
410
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
411
+
412
+ WON =
413
+ T.let(
414
+ :WON,
415
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::TaggedSymbol
416
+ )
417
+ LOST =
418
+ T.let(
419
+ :LOST,
420
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::TaggedSymbol
421
+ )
422
+ PARTIALLY_WON =
423
+ T.let(
424
+ :PARTIALLY_WON,
425
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::TaggedSymbol
426
+ )
427
+ WITHDRAWN =
428
+ T.let(
429
+ :WITHDRAWN,
430
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::TaggedSymbol
431
+ )
432
+ DENIED =
433
+ T.let(
434
+ :DENIED,
435
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::TaggedSymbol
436
+ )
437
+
438
+ sig do
439
+ override.returns(
440
+ T::Array[
441
+ Lithic::Dispute::Event::Data::WorkflowEventData::Disposition::TaggedSymbol
442
+ ]
443
+ )
444
+ end
445
+ def self.values
446
+ end
447
+ end
448
+
449
+ # Current stage of the dispute workflow
450
+ module Stage
451
+ extend Lithic::Internal::Type::Enum
452
+
453
+ TaggedSymbol =
454
+ T.type_alias do
455
+ T.all(
456
+ Symbol,
457
+ Lithic::Dispute::Event::Data::WorkflowEventData::Stage
458
+ )
459
+ end
460
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
461
+
462
+ CLAIM =
463
+ T.let(
464
+ :CLAIM,
465
+ Lithic::Dispute::Event::Data::WorkflowEventData::Stage::TaggedSymbol
466
+ )
467
+
468
+ sig do
469
+ override.returns(
470
+ T::Array[
471
+ Lithic::Dispute::Event::Data::WorkflowEventData::Stage::TaggedSymbol
472
+ ]
473
+ )
474
+ end
475
+ def self.values
476
+ end
477
+ end
478
+ end
479
+
480
+ class FinancialEventData < Lithic::Internal::Type::BaseModel
481
+ OrHash =
482
+ T.type_alias do
483
+ T.any(
484
+ Lithic::Dispute::Event::Data::FinancialEventData,
485
+ Lithic::Internal::AnyHash
486
+ )
487
+ end
488
+
489
+ # Amount in minor units
490
+ sig { returns(Integer) }
491
+ attr_accessor :amount
492
+
493
+ # Direction of funds flow
494
+ sig do
495
+ returns(
496
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity::OrSymbol
497
+ )
498
+ end
499
+ attr_accessor :polarity
500
+
501
+ # Stage at which the financial event occurred
502
+ sig do
503
+ returns(
504
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::OrSymbol
505
+ )
506
+ end
507
+ attr_accessor :stage
508
+
509
+ # Details specific to financial events
510
+ sig do
511
+ params(
512
+ amount: Integer,
513
+ polarity:
514
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity::OrSymbol,
515
+ stage:
516
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::OrSymbol
517
+ ).returns(T.attached_class)
518
+ end
519
+ def self.new(
520
+ # Amount in minor units
521
+ amount:,
522
+ # Direction of funds flow
523
+ polarity:,
524
+ # Stage at which the financial event occurred
525
+ stage:
526
+ )
527
+ end
528
+
529
+ sig do
530
+ override.returns(
531
+ {
532
+ amount: Integer,
533
+ polarity:
534
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity::OrSymbol,
535
+ stage:
536
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::OrSymbol
537
+ }
538
+ )
539
+ end
540
+ def to_hash
541
+ end
542
+
543
+ # Direction of funds flow
544
+ module Polarity
545
+ extend Lithic::Internal::Type::Enum
546
+
547
+ TaggedSymbol =
548
+ T.type_alias do
549
+ T.all(
550
+ Symbol,
551
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity
552
+ )
553
+ end
554
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
555
+
556
+ CREDIT =
557
+ T.let(
558
+ :CREDIT,
559
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity::TaggedSymbol
560
+ )
561
+ DEBIT =
562
+ T.let(
563
+ :DEBIT,
564
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity::TaggedSymbol
565
+ )
566
+
567
+ sig do
568
+ override.returns(
569
+ T::Array[
570
+ Lithic::Dispute::Event::Data::FinancialEventData::Polarity::TaggedSymbol
571
+ ]
572
+ )
573
+ end
574
+ def self.values
575
+ end
576
+ end
577
+
578
+ # Stage at which the financial event occurred
579
+ module Stage
580
+ extend Lithic::Internal::Type::Enum
581
+
582
+ TaggedSymbol =
583
+ T.type_alias do
584
+ T.all(
585
+ Symbol,
586
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage
587
+ )
588
+ end
589
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
590
+
591
+ CHARGEBACK =
592
+ T.let(
593
+ :CHARGEBACK,
594
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::TaggedSymbol
595
+ )
596
+ REPRESENTMENT =
597
+ T.let(
598
+ :REPRESENTMENT,
599
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::TaggedSymbol
600
+ )
601
+ PREARBITRATION =
602
+ T.let(
603
+ :PREARBITRATION,
604
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::TaggedSymbol
605
+ )
606
+ ARBITRATION =
607
+ T.let(
608
+ :ARBITRATION,
609
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::TaggedSymbol
610
+ )
611
+ COLLABORATION =
612
+ T.let(
613
+ :COLLABORATION,
614
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::TaggedSymbol
615
+ )
616
+
617
+ sig do
618
+ override.returns(
619
+ T::Array[
620
+ Lithic::Dispute::Event::Data::FinancialEventData::Stage::TaggedSymbol
621
+ ]
622
+ )
623
+ end
624
+ def self.values
625
+ end
626
+ end
627
+ end
628
+
629
+ class CardholderLiabilityEventData < Lithic::Internal::Type::BaseModel
630
+ OrHash =
631
+ T.type_alias do
632
+ T.any(
633
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData,
634
+ Lithic::Internal::AnyHash
635
+ )
636
+ end
637
+
638
+ # Action taken regarding cardholder liability
639
+ sig do
640
+ returns(
641
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::OrSymbol
642
+ )
643
+ end
644
+ attr_accessor :action
645
+
646
+ # Amount in minor units
647
+ sig { returns(Integer) }
648
+ attr_accessor :amount
649
+
650
+ # Reason for the action
651
+ sig { returns(String) }
652
+ attr_accessor :reason
653
+
654
+ # Details specific to cardholder liability events
655
+ sig do
656
+ params(
657
+ action:
658
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::OrSymbol,
659
+ amount: Integer,
660
+ reason: String
661
+ ).returns(T.attached_class)
662
+ end
663
+ def self.new(
664
+ # Action taken regarding cardholder liability
665
+ action:,
666
+ # Amount in minor units
667
+ amount:,
668
+ # Reason for the action
669
+ reason:
670
+ )
671
+ end
672
+
673
+ sig do
674
+ override.returns(
675
+ {
676
+ action:
677
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::OrSymbol,
678
+ amount: Integer,
679
+ reason: String
680
+ }
681
+ )
682
+ end
683
+ def to_hash
684
+ end
685
+
686
+ # Action taken regarding cardholder liability
687
+ module Action
688
+ extend Lithic::Internal::Type::Enum
689
+
690
+ TaggedSymbol =
691
+ T.type_alias do
692
+ T.all(
693
+ Symbol,
694
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action
695
+ )
696
+ end
697
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
698
+
699
+ PROVISIONAL_CREDIT_GRANTED =
700
+ T.let(
701
+ :PROVISIONAL_CREDIT_GRANTED,
702
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::TaggedSymbol
703
+ )
704
+ PROVISIONAL_CREDIT_REVERSED =
705
+ T.let(
706
+ :PROVISIONAL_CREDIT_REVERSED,
707
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::TaggedSymbol
708
+ )
709
+ WRITTEN_OFF =
710
+ T.let(
711
+ :WRITTEN_OFF,
712
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::TaggedSymbol
713
+ )
714
+
715
+ sig do
716
+ override.returns(
717
+ T::Array[
718
+ Lithic::Dispute::Event::Data::CardholderLiabilityEventData::Action::TaggedSymbol
719
+ ]
720
+ )
721
+ end
722
+ def self.values
723
+ end
724
+ end
725
+ end
726
+
727
+ sig do
728
+ override.returns(T::Array[Lithic::Dispute::Event::Data::Variants])
729
+ end
730
+ def self.variants
731
+ end
732
+ end
733
+
734
+ # Type of event
735
+ module Type
736
+ extend Lithic::Internal::Type::Enum
737
+
738
+ TaggedSymbol =
739
+ T.type_alias { T.all(Symbol, Lithic::Dispute::Event::Type) }
740
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
741
+
742
+ WORKFLOW =
743
+ T.let(:WORKFLOW, Lithic::Dispute::Event::Type::TaggedSymbol)
744
+ FINANCIAL =
745
+ T.let(:FINANCIAL, Lithic::Dispute::Event::Type::TaggedSymbol)
746
+ CARDHOLDER_LIABILITY =
747
+ T.let(
748
+ :CARDHOLDER_LIABILITY,
749
+ Lithic::Dispute::Event::Type::TaggedSymbol
750
+ )
751
+
752
+ sig do
753
+ override.returns(
754
+ T::Array[Lithic::Dispute::Event::Type::TaggedSymbol]
755
+ )
756
+ end
757
+ def self.values
758
+ end
759
+ end
760
+ end
761
+
762
+ class LiabilityAllocation < Lithic::Internal::Type::BaseModel
763
+ OrHash =
764
+ T.type_alias do
765
+ T.any(
766
+ Lithic::Dispute::LiabilityAllocation,
767
+ Lithic::Internal::AnyHash
768
+ )
769
+ end
770
+
771
+ # The amount that has been denied to the cardholder
772
+ sig { returns(Integer) }
773
+ attr_accessor :denied_amount
774
+
775
+ # The initial amount disputed
776
+ sig { returns(Integer) }
777
+ attr_accessor :original_amount
778
+
779
+ # The amount that has been recovered from the merchant through the dispute process
780
+ sig { returns(Integer) }
781
+ attr_accessor :recovered_amount
782
+
783
+ # Any disputed amount that is still outstanding, i.e. has not been recovered,
784
+ # written off, or denied
785
+ sig { returns(Integer) }
786
+ attr_accessor :remaining_amount
787
+
788
+ # The amount the issuer has chosen to write off
789
+ sig { returns(Integer) }
790
+ attr_accessor :written_off_amount
791
+
792
+ # Current breakdown of how liability is allocated for the disputed amount
793
+ sig do
794
+ params(
795
+ denied_amount: Integer,
796
+ original_amount: Integer,
797
+ recovered_amount: Integer,
798
+ remaining_amount: Integer,
799
+ written_off_amount: Integer
800
+ ).returns(T.attached_class)
801
+ end
802
+ def self.new(
803
+ # The amount that has been denied to the cardholder
804
+ denied_amount:,
805
+ # The initial amount disputed
806
+ original_amount:,
807
+ # The amount that has been recovered from the merchant through the dispute process
808
+ recovered_amount:,
809
+ # Any disputed amount that is still outstanding, i.e. has not been recovered,
810
+ # written off, or denied
811
+ remaining_amount:,
812
+ # The amount the issuer has chosen to write off
813
+ written_off_amount:
814
+ )
815
+ end
816
+
817
+ sig do
818
+ override.returns(
819
+ {
820
+ denied_amount: Integer,
821
+ original_amount: Integer,
822
+ recovered_amount: Integer,
823
+ remaining_amount: Integer,
824
+ written_off_amount: Integer
825
+ }
438
826
  )
827
+ end
828
+ def to_hash
829
+ end
830
+ end
831
+
832
+ class Merchant < Lithic::Internal::Type::BaseModel
833
+ OrHash =
834
+ T.type_alias do
835
+ T.any(Lithic::Dispute::Merchant, Lithic::Internal::AnyHash)
836
+ end
837
+
838
+ # Unique alphanumeric identifier for the payment card acceptor (merchant).
839
+ sig { returns(String) }
840
+ attr_accessor :acceptor_id
841
+
842
+ # Unique numeric identifier of the acquiring institution.
843
+ sig { returns(String) }
844
+ attr_accessor :acquiring_institution_id
845
+
846
+ # City of card acceptor. Note that in many cases, particularly in card-not-present
847
+ # transactions, merchants may send through a phone number or URL in this field.
848
+ sig { returns(String) }
849
+ attr_accessor :city
850
+
851
+ # Country or entity of card acceptor. Possible values are: (1) all ISO 3166-1
852
+ # alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for Netherlands Antilles.
853
+ sig { returns(String) }
854
+ attr_accessor :country
855
+
856
+ # Short description of card acceptor.
857
+ sig { returns(String) }
858
+ attr_accessor :descriptor
859
+
860
+ # Merchant category code (MCC). A four-digit number listed in ISO 18245. An MCC is
861
+ # used to classify a business by the types of goods or services it provides.
862
+ sig { returns(String) }
863
+ attr_accessor :mcc
864
+
865
+ # Geographic state of card acceptor.
866
+ sig { returns(String) }
867
+ attr_accessor :state
868
+
869
+ sig do
870
+ params(
871
+ acceptor_id: String,
872
+ acquiring_institution_id: String,
873
+ city: String,
874
+ country: String,
875
+ descriptor: String,
876
+ mcc: String,
877
+ state: String
878
+ ).returns(T.attached_class)
879
+ end
880
+ def self.new(
881
+ # Unique alphanumeric identifier for the payment card acceptor (merchant).
882
+ acceptor_id:,
883
+ # Unique numeric identifier of the acquiring institution.
884
+ acquiring_institution_id:,
885
+ # City of card acceptor. Note that in many cases, particularly in card-not-present
886
+ # transactions, merchants may send through a phone number or URL in this field.
887
+ city:,
888
+ # Country or entity of card acceptor. Possible values are: (1) all ISO 3166-1
889
+ # alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for Netherlands Antilles.
890
+ country:,
891
+ # Short description of card acceptor.
892
+ descriptor:,
893
+ # Merchant category code (MCC). A four-digit number listed in ISO 18245. An MCC is
894
+ # used to classify a business by the types of goods or services it provides.
895
+ mcc:,
896
+ # Geographic state of card acceptor.
897
+ state:
898
+ )
899
+ end
439
900
 
440
901
  sig do
441
902
  override.returns(
442
- T::Array[Lithic::Dispute::ResolutionReason::TaggedSymbol]
903
+ {
904
+ acceptor_id: String,
905
+ acquiring_institution_id: String,
906
+ city: String,
907
+ country: String,
908
+ descriptor: String,
909
+ mcc: String,
910
+ state: String
911
+ }
443
912
  )
444
913
  end
914
+ def to_hash
915
+ end
916
+ end
917
+
918
+ # Card network handling the dispute.
919
+ module Network
920
+ extend Lithic::Internal::Type::Enum
921
+
922
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Dispute::Network) }
923
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
924
+
925
+ VISA = T.let(:VISA, Lithic::Dispute::Network::TaggedSymbol)
926
+ MASTERCARD = T.let(:MASTERCARD, Lithic::Dispute::Network::TaggedSymbol)
927
+
928
+ sig do
929
+ override.returns(T::Array[Lithic::Dispute::Network::TaggedSymbol])
930
+ end
445
931
  def self.values
446
932
  end
447
933
  end
448
934
 
449
- # Status types:
450
- #
451
- # - `NEW` - New dispute case is opened.
452
- # - `PENDING_CUSTOMER` - Lithic is waiting for customer to provide more
453
- # information.
454
- # - `SUBMITTED` - Dispute is submitted to the card network.
455
- # - `REPRESENTMENT` - Case has entered second presentment.
456
- # - `PREARBITRATION` - Case has entered prearbitration.
457
- # - `ARBITRATION` - Case has entered arbitration.
458
- # - `CASE_WON` - Case was won and credit will be issued.
459
- # - `CASE_CLOSED` - Case was lost or withdrawn.
935
+ # Current status of the dispute.
460
936
  module Status
461
937
  extend Lithic::Internal::Type::Enum
462
938
 
463
939
  TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Dispute::Status) }
464
940
  OrSymbol = T.type_alias { T.any(Symbol, String) }
465
941
 
466
- ARBITRATION = T.let(:ARBITRATION, Lithic::Dispute::Status::TaggedSymbol)
467
- CASE_CLOSED = T.let(:CASE_CLOSED, Lithic::Dispute::Status::TaggedSymbol)
468
- CASE_WON = T.let(:CASE_WON, Lithic::Dispute::Status::TaggedSymbol)
469
- NEW = T.let(:NEW, Lithic::Dispute::Status::TaggedSymbol)
470
- PENDING_CUSTOMER =
471
- T.let(:PENDING_CUSTOMER, Lithic::Dispute::Status::TaggedSymbol)
472
- PREARBITRATION =
473
- T.let(:PREARBITRATION, Lithic::Dispute::Status::TaggedSymbol)
474
- REPRESENTMENT =
475
- T.let(:REPRESENTMENT, Lithic::Dispute::Status::TaggedSymbol)
476
- SUBMITTED = T.let(:SUBMITTED, Lithic::Dispute::Status::TaggedSymbol)
942
+ OPEN = T.let(:OPEN, Lithic::Dispute::Status::TaggedSymbol)
943
+ CLOSED = T.let(:CLOSED, Lithic::Dispute::Status::TaggedSymbol)
477
944
 
478
945
  sig do
479
946
  override.returns(T::Array[Lithic::Dispute::Status::TaggedSymbol])
@@ -481,6 +948,86 @@ module Lithic
481
948
  def self.values
482
949
  end
483
950
  end
951
+
952
+ class TransactionSeries < Lithic::Internal::Type::BaseModel
953
+ OrHash =
954
+ T.type_alias do
955
+ T.any(Lithic::Dispute::TransactionSeries, Lithic::Internal::AnyHash)
956
+ end
957
+
958
+ # Token of the specific event in the original transaction being disputed, in UUID
959
+ # format; null if no event can be identified
960
+ sig { returns(T.nilable(String)) }
961
+ attr_accessor :related_transaction_event_token
962
+
963
+ # Token of the original transaction being disputed, in UUID format
964
+ sig { returns(String) }
965
+ attr_accessor :related_transaction_token
966
+
967
+ # The type of transaction series associating the dispute and the original
968
+ # transaction. Always set to DISPUTE
969
+ sig { returns(Lithic::Dispute::TransactionSeries::Type::OrSymbol) }
970
+ attr_accessor :type
971
+
972
+ # Contains identifiers for the transaction and specific event within being
973
+ # disputed; null if no transaction can be identified
974
+ sig do
975
+ params(
976
+ related_transaction_event_token: T.nilable(String),
977
+ related_transaction_token: String,
978
+ type: Lithic::Dispute::TransactionSeries::Type::OrSymbol
979
+ ).returns(T.attached_class)
980
+ end
981
+ def self.new(
982
+ # Token of the specific event in the original transaction being disputed, in UUID
983
+ # format; null if no event can be identified
984
+ related_transaction_event_token:,
985
+ # Token of the original transaction being disputed, in UUID format
986
+ related_transaction_token:,
987
+ # The type of transaction series associating the dispute and the original
988
+ # transaction. Always set to DISPUTE
989
+ type:
990
+ )
991
+ end
992
+
993
+ sig do
994
+ override.returns(
995
+ {
996
+ related_transaction_event_token: T.nilable(String),
997
+ related_transaction_token: String,
998
+ type: Lithic::Dispute::TransactionSeries::Type::OrSymbol
999
+ }
1000
+ )
1001
+ end
1002
+ def to_hash
1003
+ end
1004
+
1005
+ # The type of transaction series associating the dispute and the original
1006
+ # transaction. Always set to DISPUTE
1007
+ module Type
1008
+ extend Lithic::Internal::Type::Enum
1009
+
1010
+ TaggedSymbol =
1011
+ T.type_alias do
1012
+ T.all(Symbol, Lithic::Dispute::TransactionSeries::Type)
1013
+ end
1014
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1015
+
1016
+ DISPUTE =
1017
+ T.let(
1018
+ :DISPUTE,
1019
+ Lithic::Dispute::TransactionSeries::Type::TaggedSymbol
1020
+ )
1021
+
1022
+ sig do
1023
+ override.returns(
1024
+ T::Array[Lithic::Dispute::TransactionSeries::Type::TaggedSymbol]
1025
+ )
1026
+ end
1027
+ def self.values
1028
+ end
1029
+ end
1030
+ end
484
1031
  end
485
1032
  end
486
1033
  end