lithic 0.1.0.pre.alpha.55 → 0.1.0.pre.alpha.56

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 (196) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/models/account_activity_list_response.rb +60 -148
  6. data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +60 -151
  7. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +8 -51
  8. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +8 -51
  9. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +260 -0
  10. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +8 -53
  11. data/lib/lithic/models/auth_rules/conditional_operation.rb +26 -0
  12. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +254 -0
  13. data/lib/lithic/models/auth_rules/conditional_value.rb +27 -0
  14. data/lib/lithic/models/auth_rules/v2_create_params.rb +14 -5
  15. data/lib/lithic/models/auth_rules/v2_create_response.rb +21 -8
  16. data/lib/lithic/models/auth_rules/v2_draft_params.rb +7 -3
  17. data/lib/lithic/models/auth_rules/v2_draft_response.rb +21 -8
  18. data/lib/lithic/models/auth_rules/v2_list_params.rb +3 -0
  19. data/lib/lithic/models/auth_rules/v2_list_response.rb +21 -8
  20. data/lib/lithic/models/auth_rules/v2_promote_response.rb +21 -8
  21. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +21 -8
  22. data/lib/lithic/models/auth_rules/v2_update_response.rb +21 -8
  23. data/lib/lithic/models/book_transfer_response.rb +1 -0
  24. data/lib/lithic/models/category_details.rb +27 -0
  25. data/lib/lithic/models/dispute.rb +242 -510
  26. data/lib/lithic/models/dispute_v2.rb +555 -0
  27. data/lib/lithic/models/disputes_v2_list_params.rb +84 -0
  28. data/lib/lithic/models/disputes_v2_retrieve_params.rb +14 -0
  29. data/lib/lithic/models/external_bank_account_address.rb +2 -2
  30. data/lib/lithic/models/external_bank_account_create_response.rb +18 -18
  31. data/lib/lithic/models/external_bank_account_list_response.rb +18 -18
  32. data/lib/lithic/models/external_bank_account_retrieve_response.rb +18 -18
  33. data/lib/lithic/models/external_bank_account_retry_micro_deposits_response.rb +18 -18
  34. data/lib/lithic/models/external_bank_account_retry_prenote_response.rb +18 -18
  35. data/lib/lithic/models/external_bank_account_unpause_params.rb +14 -0
  36. data/lib/lithic/models/external_bank_account_unpause_response.rb +242 -0
  37. data/lib/lithic/models/external_bank_account_update_response.rb +18 -18
  38. data/lib/lithic/models/external_bank_accounts/micro_deposit_create_response.rb +18 -18
  39. data/lib/lithic/models/external_payment.rb +3 -2
  40. data/lib/lithic/models/external_payment_list_params.rb +1 -0
  41. data/lib/lithic/models/financial_account.rb +4 -3
  42. data/lib/lithic/models/financial_accounts/category_balances.rb +29 -0
  43. data/lib/lithic/models/financial_accounts/loan_tape.rb +35 -520
  44. data/lib/lithic/models/financial_accounts/statement.rb +73 -275
  45. data/lib/lithic/models/financial_event.rb +148 -0
  46. data/lib/lithic/models/financial_transaction.rb +3 -146
  47. data/lib/lithic/models/management_operation_list_params.rb +1 -0
  48. data/lib/lithic/models/management_operation_transaction.rb +5 -4
  49. data/lib/lithic/models/merchant.rb +70 -0
  50. data/lib/lithic/models/payment.rb +7 -5
  51. data/lib/lithic/models/payment_return_params.rb +62 -0
  52. data/lib/lithic/models/statement_totals.rb +100 -0
  53. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +9 -9
  54. data/lib/lithic/models/transaction.rb +3 -69
  55. data/lib/lithic/models/transactions/events/enhanced_data.rb +49 -40
  56. data/lib/lithic/models/transfer.rb +3 -146
  57. data/lib/lithic/models.rb +18 -0
  58. data/lib/lithic/resources/auth_rules/v2.rb +2 -2
  59. data/lib/lithic/resources/disputes.rb +10 -10
  60. data/lib/lithic/resources/disputes_v2.rb +74 -0
  61. data/lib/lithic/resources/external_bank_accounts.rb +19 -0
  62. data/lib/lithic/resources/payments.rb +48 -0
  63. data/lib/lithic/version.rb +1 -1
  64. data/lib/lithic.rb +16 -5
  65. data/rbi/lithic/client.rbi +3 -0
  66. data/rbi/lithic/models/account_activity_list_response.rbi +121 -544
  67. data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +121 -544
  68. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +13 -139
  69. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +13 -153
  70. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +789 -0
  71. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +13 -153
  72. data/rbi/lithic/models/auth_rules/conditional_operation.rbi +74 -0
  73. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +674 -0
  74. data/rbi/lithic/models/auth_rules/conditional_value.rbi +28 -0
  75. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +33 -7
  76. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +33 -7
  77. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +12 -4
  78. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +33 -7
  79. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +15 -0
  80. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +33 -7
  81. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +33 -7
  82. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +33 -7
  83. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +33 -7
  84. data/rbi/lithic/models/book_transfer_response.rbi +2 -0
  85. data/rbi/lithic/models/category_details.rbi +43 -0
  86. data/rbi/lithic/models/dispute.rbi +395 -942
  87. data/rbi/lithic/models/dispute_v2.rbi +965 -0
  88. data/rbi/lithic/models/disputes_v2_list_params.rbi +129 -0
  89. data/rbi/lithic/models/disputes_v2_retrieve_params.rbi +27 -0
  90. data/rbi/lithic/models/external_bank_account_address.rbi +3 -6
  91. data/rbi/lithic/models/external_bank_account_create_response.rbi +31 -51
  92. data/rbi/lithic/models/external_bank_account_list_response.rbi +31 -51
  93. data/rbi/lithic/models/external_bank_account_retrieve_response.rbi +31 -51
  94. data/rbi/lithic/models/external_bank_account_retry_micro_deposits_response.rbi +31 -51
  95. data/rbi/lithic/models/external_bank_account_retry_prenote_response.rbi +31 -51
  96. data/rbi/lithic/models/external_bank_account_unpause_params.rbi +30 -0
  97. data/rbi/lithic/models/external_bank_account_unpause_response.rbi +375 -0
  98. data/rbi/lithic/models/external_bank_account_update_response.rbi +31 -51
  99. data/rbi/lithic/models/external_bank_accounts/micro_deposit_create_response.rbi +31 -51
  100. data/rbi/lithic/models/external_payment.rbi +5 -6
  101. data/rbi/lithic/models/external_payment_list_params.rbi +5 -0
  102. data/rbi/lithic/models/financial_account.rbi +12 -4
  103. data/rbi/lithic/models/financial_accounts/category_balances.rbi +42 -0
  104. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +47 -802
  105. data/rbi/lithic/models/financial_accounts/statement.rbi +118 -430
  106. data/rbi/lithic/models/financial_event.rbi +409 -0
  107. data/rbi/lithic/models/financial_transaction.rbi +3 -509
  108. data/rbi/lithic/models/management_operation_list_params.rbi +5 -0
  109. data/rbi/lithic/models/management_operation_transaction.rbi +11 -12
  110. data/rbi/lithic/models/merchant.rbi +89 -0
  111. data/rbi/lithic/models/payment.rbi +16 -7
  112. data/rbi/lithic/models/payment_return_params.rbi +85 -0
  113. data/rbi/lithic/models/statement_totals.rbi +128 -0
  114. data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +12 -12
  115. data/rbi/lithic/models/transaction.rbi +4 -90
  116. data/rbi/lithic/models/transactions/events/enhanced_data.rbi +74 -133
  117. data/rbi/lithic/models/transfer.rbi +4 -436
  118. data/rbi/lithic/models.rbi +19 -0
  119. data/rbi/lithic/resources/auth_rules/v2.rbi +8 -3
  120. data/rbi/lithic/resources/disputes.rbi +5 -7
  121. data/rbi/lithic/resources/disputes_v2.rbi +64 -0
  122. data/rbi/lithic/resources/external_bank_accounts.rbi +10 -0
  123. data/rbi/lithic/resources/payments.rbi +46 -0
  124. data/sig/lithic/client.rbs +2 -0
  125. data/sig/lithic/models/account_activity_list_response.rbs +67 -221
  126. data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +67 -221
  127. data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +10 -61
  128. data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +10 -61
  129. data/sig/lithic/models/auth_rules/conditional_ach_action_parameters.rbs +293 -0
  130. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +10 -61
  131. data/sig/lithic/models/auth_rules/conditional_operation.rbs +34 -0
  132. data/sig/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbs +237 -0
  133. data/sig/lithic/models/auth_rules/conditional_value.rbs +15 -0
  134. data/sig/lithic/models/auth_rules/v2_create_params.rbs +11 -1
  135. data/sig/lithic/models/auth_rules/v2_create_response.rbs +13 -1
  136. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +2 -0
  137. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +13 -1
  138. data/sig/lithic/models/auth_rules/v2_list_params.rbs +9 -1
  139. data/sig/lithic/models/auth_rules/v2_list_response.rbs +13 -1
  140. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +13 -1
  141. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +13 -1
  142. data/sig/lithic/models/auth_rules/v2_update_response.rbs +13 -1
  143. data/sig/lithic/models/book_transfer_response.rbs +3 -1
  144. data/sig/lithic/models/category_details.rbs +26 -0
  145. data/sig/lithic/models/dispute.rbs +157 -417
  146. data/sig/lithic/models/dispute_v2.rbs +438 -0
  147. data/sig/lithic/models/disputes_v2_list_params.rbs +77 -0
  148. data/sig/lithic/models/disputes_v2_retrieve_params.rbs +15 -0
  149. data/sig/lithic/models/external_bank_account_address.rbs +4 -6
  150. data/sig/lithic/models/external_bank_account_create_response.rbs +36 -56
  151. data/sig/lithic/models/external_bank_account_list_response.rbs +36 -56
  152. data/sig/lithic/models/external_bank_account_retrieve_response.rbs +36 -56
  153. data/sig/lithic/models/external_bank_account_retry_micro_deposits_response.rbs +36 -56
  154. data/sig/lithic/models/external_bank_account_retry_prenote_response.rbs +36 -56
  155. data/sig/lithic/models/external_bank_account_unpause_params.rbs +15 -0
  156. data/sig/lithic/models/external_bank_account_unpause_response.rbs +162 -0
  157. data/sig/lithic/models/external_bank_account_update_response.rbs +36 -56
  158. data/sig/lithic/models/external_bank_accounts/micro_deposit_create_response.rbs +36 -56
  159. data/sig/lithic/models/external_payment.rbs +7 -7
  160. data/sig/lithic/models/external_payment_list_params.rbs +3 -1
  161. data/sig/lithic/models/financial_account.rbs +4 -4
  162. data/sig/lithic/models/financial_accounts/category_balances.rbs +24 -0
  163. data/sig/lithic/models/financial_accounts/loan_tape.rbs +48 -464
  164. data/sig/lithic/models/financial_accounts/statement.rbs +59 -244
  165. data/sig/lithic/models/financial_event.rbs +216 -0
  166. data/sig/lithic/models/financial_transaction.rbs +4 -217
  167. data/sig/lithic/models/management_operation_list_params.rbs +3 -1
  168. data/sig/lithic/models/management_operation_transaction.rbs +11 -13
  169. data/sig/lithic/models/merchant.rbs +50 -0
  170. data/sig/lithic/models/payment.rbs +9 -5
  171. data/sig/lithic/models/payment_return_params.rbs +46 -0
  172. data/sig/lithic/models/statement_totals.rbs +76 -0
  173. data/sig/lithic/models/transaction.rbs +4 -51
  174. data/sig/lithic/models/transactions/events/enhanced_data.rbs +78 -124
  175. data/sig/lithic/models/transfer.rbs +6 -219
  176. data/sig/lithic/models.rbs +18 -0
  177. data/sig/lithic/resources/disputes.rbs +5 -5
  178. data/sig/lithic/resources/disputes_v2.rbs +24 -0
  179. data/sig/lithic/resources/external_bank_accounts.rbs +5 -0
  180. data/sig/lithic/resources/payments.rbs +10 -0
  181. metadata +50 -17
  182. data/lib/lithic/models/dispute_create_response.rb +0 -326
  183. data/lib/lithic/models/dispute_delete_response.rb +0 -326
  184. data/lib/lithic/models/dispute_list_response.rb +0 -326
  185. data/lib/lithic/models/dispute_retrieve_response.rb +0 -326
  186. data/lib/lithic/models/dispute_update_response.rb +0 -326
  187. data/rbi/lithic/models/dispute_create_response.rbi +0 -599
  188. data/rbi/lithic/models/dispute_delete_response.rbi +0 -599
  189. data/rbi/lithic/models/dispute_list_response.rbi +0 -582
  190. data/rbi/lithic/models/dispute_retrieve_response.rbi +0 -601
  191. data/rbi/lithic/models/dispute_update_response.rbi +0 -599
  192. data/sig/lithic/models/dispute_create_response.rbs +0 -210
  193. data/sig/lithic/models/dispute_delete_response.rbs +0 -210
  194. data/sig/lithic/models/dispute_list_response.rbs +0 -210
  195. data/sig/lithic/models/dispute_retrieve_response.rbs +0 -210
  196. data/sig/lithic/models/dispute_update_response.rbs +0 -210
@@ -0,0 +1,555 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::DisputesV2#retrieve
6
+ class DisputeV2 < Lithic::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # Token assigned by Lithic for the dispute, in UUID format.
9
+ #
10
+ # @return [String]
11
+ required :token, String
12
+
13
+ # @!attribute account_token
14
+ # Token for the account associated with the dispute, in UUID format.
15
+ #
16
+ # @return [String]
17
+ required :account_token, String
18
+
19
+ # @!attribute card_token
20
+ # Token for the card used in the dispute, in UUID format.
21
+ #
22
+ # @return [String]
23
+ required :card_token, String
24
+
25
+ # @!attribute case_id
26
+ # Identifier assigned by the network for this dispute.
27
+ #
28
+ # @return [String, nil]
29
+ required :case_id, String, nil?: true
30
+
31
+ # @!attribute created
32
+ # When the dispute was created.
33
+ #
34
+ # @return [Time]
35
+ required :created, Time
36
+
37
+ # @!attribute currency
38
+ # Three-letter ISO 4217 currency code.
39
+ #
40
+ # @return [String]
41
+ required :currency, String
42
+
43
+ # @!attribute disposition
44
+ # Dispute resolution outcome
45
+ #
46
+ # @return [Symbol, Lithic::Models::DisputeV2::Disposition, nil]
47
+ required :disposition, enum: -> { Lithic::DisputeV2::Disposition }, nil?: true
48
+
49
+ # @!attribute events
50
+ # Chronological list of events that have occurred in the dispute lifecycle
51
+ #
52
+ # @return [Array<Lithic::Models::DisputeV2::Event>]
53
+ required :events, -> { Lithic::Internal::Type::ArrayOf[Lithic::DisputeV2::Event] }
54
+
55
+ # @!attribute liability_allocation
56
+ # Current breakdown of how liability is allocated for the disputed amount
57
+ #
58
+ # @return [Lithic::Models::DisputeV2::LiabilityAllocation]
59
+ required :liability_allocation, -> { Lithic::DisputeV2::LiabilityAllocation }
60
+
61
+ # @!attribute merchant
62
+ #
63
+ # @return [Lithic::Models::Merchant]
64
+ required :merchant, -> { Lithic::Merchant }
65
+
66
+ # @!attribute network
67
+ # Card network handling the dispute.
68
+ #
69
+ # @return [Symbol, Lithic::Models::DisputeV2::Network]
70
+ required :network, enum: -> { Lithic::DisputeV2::Network }
71
+
72
+ # @!attribute status
73
+ # Current status of the dispute.
74
+ #
75
+ # @return [Symbol, Lithic::Models::DisputeV2::Status, nil]
76
+ required :status, enum: -> { Lithic::DisputeV2::Status }, nil?: true
77
+
78
+ # @!attribute transaction_series
79
+ # Contains identifiers for the transaction and specific event within being
80
+ # disputed; null if no transaction can be identified
81
+ #
82
+ # @return [Lithic::Models::DisputeV2::TransactionSeries, nil]
83
+ required :transaction_series, -> { Lithic::DisputeV2::TransactionSeries }, nil?: true
84
+
85
+ # @!attribute updated
86
+ # When the dispute was last updated.
87
+ #
88
+ # @return [Time]
89
+ required :updated, Time
90
+
91
+ # @!method initialize(token:, account_token:, card_token:, case_id:, created:, currency:, disposition:, events:, liability_allocation:, merchant:, network:, status:, transaction_series:, updated:)
92
+ # Some parameter documentations has been truncated, see
93
+ # {Lithic::Models::DisputeV2} for more details.
94
+ #
95
+ # The Dispute object tracks the progression of a dispute throughout its lifecycle.
96
+ #
97
+ # @param token [String] Token assigned by Lithic for the dispute, in UUID format.
98
+ #
99
+ # @param account_token [String] Token for the account associated with the dispute, in UUID format.
100
+ #
101
+ # @param card_token [String] Token for the card used in the dispute, in UUID format.
102
+ #
103
+ # @param case_id [String, nil] Identifier assigned by the network for this dispute.
104
+ #
105
+ # @param created [Time] When the dispute was created.
106
+ #
107
+ # @param currency [String] Three-letter ISO 4217 currency code.
108
+ #
109
+ # @param disposition [Symbol, Lithic::Models::DisputeV2::Disposition, nil] Dispute resolution outcome
110
+ #
111
+ # @param events [Array<Lithic::Models::DisputeV2::Event>] Chronological list of events that have occurred in the dispute lifecycle
112
+ #
113
+ # @param liability_allocation [Lithic::Models::DisputeV2::LiabilityAllocation] Current breakdown of how liability is allocated for the disputed amount
114
+ #
115
+ # @param merchant [Lithic::Models::Merchant]
116
+ #
117
+ # @param network [Symbol, Lithic::Models::DisputeV2::Network] Card network handling the dispute.
118
+ #
119
+ # @param status [Symbol, Lithic::Models::DisputeV2::Status, nil] Current status of the dispute.
120
+ #
121
+ # @param transaction_series [Lithic::Models::DisputeV2::TransactionSeries, nil] Contains identifiers for the transaction and specific event within being dispute
122
+ #
123
+ # @param updated [Time] When the dispute was last updated.
124
+
125
+ # Dispute resolution outcome
126
+ #
127
+ # @see Lithic::Models::DisputeV2#disposition
128
+ module Disposition
129
+ extend Lithic::Internal::Type::Enum
130
+
131
+ WON = :WON
132
+ LOST = :LOST
133
+ PARTIALLY_WON = :PARTIALLY_WON
134
+ WITHDRAWN = :WITHDRAWN
135
+ DENIED = :DENIED
136
+
137
+ # @!method self.values
138
+ # @return [Array<Symbol>]
139
+ end
140
+
141
+ class Event < Lithic::Internal::Type::BaseModel
142
+ # @!attribute token
143
+ # Unique identifier for the event, in UUID format
144
+ #
145
+ # @return [String]
146
+ required :token, String
147
+
148
+ # @!attribute created
149
+ # When the event occurred
150
+ #
151
+ # @return [Time]
152
+ required :created, Time
153
+
154
+ # @!attribute data
155
+ # Details specific to the event type
156
+ #
157
+ # @return [Lithic::Models::DisputeV2::Event::Data::Workflow, Lithic::Models::DisputeV2::Event::Data::Financial, Lithic::Models::DisputeV2::Event::Data::CardholderLiability]
158
+ required :data, union: -> { Lithic::DisputeV2::Event::Data }
159
+
160
+ # @!attribute type
161
+ # Type of event
162
+ #
163
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Type]
164
+ required :type, enum: -> { Lithic::DisputeV2::Event::Type }
165
+
166
+ # @!method initialize(token:, created:, data:, type:)
167
+ # Event that occurred in the dispute lifecycle
168
+ #
169
+ # @param token [String] Unique identifier for the event, in UUID format
170
+ #
171
+ # @param created [Time] When the event occurred
172
+ #
173
+ # @param data [Lithic::Models::DisputeV2::Event::Data::Workflow, Lithic::Models::DisputeV2::Event::Data::Financial, Lithic::Models::DisputeV2::Event::Data::CardholderLiability] Details specific to the event type
174
+ #
175
+ # @param type [Symbol, Lithic::Models::DisputeV2::Event::Type] Type of event
176
+
177
+ # Details specific to the event type
178
+ #
179
+ # @see Lithic::Models::DisputeV2::Event#data
180
+ module Data
181
+ extend Lithic::Internal::Type::Union
182
+
183
+ discriminator :type
184
+
185
+ # Details specific to workflow events
186
+ variant :WORKFLOW, -> { Lithic::DisputeV2::Event::Data::Workflow }
187
+
188
+ # Details specific to financial events
189
+ variant :FINANCIAL, -> { Lithic::DisputeV2::Event::Data::Financial }
190
+
191
+ # Details specific to cardholder liability events
192
+ variant :CARDHOLDER_LIABILITY, -> { Lithic::DisputeV2::Event::Data::CardholderLiability }
193
+
194
+ class Workflow < Lithic::Internal::Type::BaseModel
195
+ # @!attribute action
196
+ # Action taken in this stage
197
+ #
198
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Action]
199
+ required :action, enum: -> { Lithic::DisputeV2::Event::Data::Workflow::Action }
200
+
201
+ # @!attribute amount
202
+ # Amount in minor units
203
+ #
204
+ # @return [Integer, nil]
205
+ required :amount, Integer, nil?: true
206
+
207
+ # @!attribute disposition
208
+ # Dispute resolution outcome
209
+ #
210
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Disposition, nil]
211
+ required :disposition,
212
+ enum: -> {
213
+ Lithic::DisputeV2::Event::Data::Workflow::Disposition
214
+ },
215
+ nil?: true
216
+
217
+ # @!attribute reason
218
+ # Reason for the action
219
+ #
220
+ # @return [String, nil]
221
+ required :reason, String, nil?: true
222
+
223
+ # @!attribute stage
224
+ # Current stage of the dispute workflow
225
+ #
226
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Stage]
227
+ required :stage, enum: -> { Lithic::DisputeV2::Event::Data::Workflow::Stage }
228
+
229
+ # @!attribute type
230
+ # Event type discriminator
231
+ #
232
+ # @return [Symbol, :WORKFLOW]
233
+ required :type, const: :WORKFLOW
234
+
235
+ # @!method initialize(action:, amount:, disposition:, reason:, stage:, type: :WORKFLOW)
236
+ # Details specific to workflow events
237
+ #
238
+ # @param action [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Action] Action taken in this stage
239
+ #
240
+ # @param amount [Integer, nil] Amount in minor units
241
+ #
242
+ # @param disposition [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Disposition, nil] Dispute resolution outcome
243
+ #
244
+ # @param reason [String, nil] Reason for the action
245
+ #
246
+ # @param stage [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Stage] Current stage of the dispute workflow
247
+ #
248
+ # @param type [Symbol, :WORKFLOW] Event type discriminator
249
+
250
+ # Action taken in this stage
251
+ #
252
+ # @see Lithic::Models::DisputeV2::Event::Data::Workflow#action
253
+ module Action
254
+ extend Lithic::Internal::Type::Enum
255
+
256
+ OPENED = :OPENED
257
+ CLOSED = :CLOSED
258
+ REOPENED = :REOPENED
259
+
260
+ # @!method self.values
261
+ # @return [Array<Symbol>]
262
+ end
263
+
264
+ # Dispute resolution outcome
265
+ #
266
+ # @see Lithic::Models::DisputeV2::Event::Data::Workflow#disposition
267
+ module Disposition
268
+ extend Lithic::Internal::Type::Enum
269
+
270
+ WON = :WON
271
+ LOST = :LOST
272
+ PARTIALLY_WON = :PARTIALLY_WON
273
+ WITHDRAWN = :WITHDRAWN
274
+ DENIED = :DENIED
275
+
276
+ # @!method self.values
277
+ # @return [Array<Symbol>]
278
+ end
279
+
280
+ # Current stage of the dispute workflow
281
+ #
282
+ # @see Lithic::Models::DisputeV2::Event::Data::Workflow#stage
283
+ module Stage
284
+ extend Lithic::Internal::Type::Enum
285
+
286
+ CLAIM = :CLAIM
287
+
288
+ # @!method self.values
289
+ # @return [Array<Symbol>]
290
+ end
291
+ end
292
+
293
+ class Financial < Lithic::Internal::Type::BaseModel
294
+ # @!attribute amount
295
+ # Amount in minor units
296
+ #
297
+ # @return [Integer]
298
+ required :amount, Integer
299
+
300
+ # @!attribute polarity
301
+ # Direction of funds flow
302
+ #
303
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Polarity]
304
+ required :polarity, enum: -> { Lithic::DisputeV2::Event::Data::Financial::Polarity }
305
+
306
+ # @!attribute stage
307
+ # Stage at which the financial event occurred
308
+ #
309
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Stage]
310
+ required :stage, enum: -> { Lithic::DisputeV2::Event::Data::Financial::Stage }
311
+
312
+ # @!attribute type
313
+ # Event type discriminator
314
+ #
315
+ # @return [Symbol, :FINANCIAL]
316
+ required :type, const: :FINANCIAL
317
+
318
+ # @!method initialize(amount:, polarity:, stage:, type: :FINANCIAL)
319
+ # Details specific to financial events
320
+ #
321
+ # @param amount [Integer] Amount in minor units
322
+ #
323
+ # @param polarity [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Polarity] Direction of funds flow
324
+ #
325
+ # @param stage [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Stage] Stage at which the financial event occurred
326
+ #
327
+ # @param type [Symbol, :FINANCIAL] Event type discriminator
328
+
329
+ # Direction of funds flow
330
+ #
331
+ # @see Lithic::Models::DisputeV2::Event::Data::Financial#polarity
332
+ module Polarity
333
+ extend Lithic::Internal::Type::Enum
334
+
335
+ CREDIT = :CREDIT
336
+ DEBIT = :DEBIT
337
+
338
+ # @!method self.values
339
+ # @return [Array<Symbol>]
340
+ end
341
+
342
+ # Stage at which the financial event occurred
343
+ #
344
+ # @see Lithic::Models::DisputeV2::Event::Data::Financial#stage
345
+ module Stage
346
+ extend Lithic::Internal::Type::Enum
347
+
348
+ CHARGEBACK = :CHARGEBACK
349
+ REPRESENTMENT = :REPRESENTMENT
350
+ PREARBITRATION = :PREARBITRATION
351
+ ARBITRATION = :ARBITRATION
352
+ COLLABORATION = :COLLABORATION
353
+
354
+ # @!method self.values
355
+ # @return [Array<Symbol>]
356
+ end
357
+ end
358
+
359
+ class CardholderLiability < Lithic::Internal::Type::BaseModel
360
+ # @!attribute action
361
+ # Action taken regarding cardholder liability
362
+ #
363
+ # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::CardholderLiability::Action]
364
+ required :action, enum: -> { Lithic::DisputeV2::Event::Data::CardholderLiability::Action }
365
+
366
+ # @!attribute amount
367
+ # Amount in minor units
368
+ #
369
+ # @return [Integer]
370
+ required :amount, Integer
371
+
372
+ # @!attribute reason
373
+ # Reason for the action
374
+ #
375
+ # @return [String]
376
+ required :reason, String
377
+
378
+ # @!attribute type
379
+ # Event type discriminator
380
+ #
381
+ # @return [Symbol, :CARDHOLDER_LIABILITY]
382
+ required :type, const: :CARDHOLDER_LIABILITY
383
+
384
+ # @!method initialize(action:, amount:, reason:, type: :CARDHOLDER_LIABILITY)
385
+ # Details specific to cardholder liability events
386
+ #
387
+ # @param action [Symbol, Lithic::Models::DisputeV2::Event::Data::CardholderLiability::Action] Action taken regarding cardholder liability
388
+ #
389
+ # @param amount [Integer] Amount in minor units
390
+ #
391
+ # @param reason [String] Reason for the action
392
+ #
393
+ # @param type [Symbol, :CARDHOLDER_LIABILITY] Event type discriminator
394
+
395
+ # Action taken regarding cardholder liability
396
+ #
397
+ # @see Lithic::Models::DisputeV2::Event::Data::CardholderLiability#action
398
+ module Action
399
+ extend Lithic::Internal::Type::Enum
400
+
401
+ PROVISIONAL_CREDIT_GRANTED = :PROVISIONAL_CREDIT_GRANTED
402
+ PROVISIONAL_CREDIT_REVERSED = :PROVISIONAL_CREDIT_REVERSED
403
+ WRITTEN_OFF = :WRITTEN_OFF
404
+
405
+ # @!method self.values
406
+ # @return [Array<Symbol>]
407
+ end
408
+ end
409
+
410
+ # @!method self.variants
411
+ # @return [Array(Lithic::Models::DisputeV2::Event::Data::Workflow, Lithic::Models::DisputeV2::Event::Data::Financial, Lithic::Models::DisputeV2::Event::Data::CardholderLiability)]
412
+ end
413
+
414
+ # Type of event
415
+ #
416
+ # @see Lithic::Models::DisputeV2::Event#type
417
+ module Type
418
+ extend Lithic::Internal::Type::Enum
419
+
420
+ WORKFLOW = :WORKFLOW
421
+ FINANCIAL = :FINANCIAL
422
+ CARDHOLDER_LIABILITY = :CARDHOLDER_LIABILITY
423
+
424
+ # @!method self.values
425
+ # @return [Array<Symbol>]
426
+ end
427
+ end
428
+
429
+ # @see Lithic::Models::DisputeV2#liability_allocation
430
+ class LiabilityAllocation < Lithic::Internal::Type::BaseModel
431
+ # @!attribute denied_amount
432
+ # The amount that has been denied to the cardholder
433
+ #
434
+ # @return [Integer]
435
+ required :denied_amount, Integer
436
+
437
+ # @!attribute original_amount
438
+ # The initial amount disputed
439
+ #
440
+ # @return [Integer]
441
+ required :original_amount, Integer
442
+
443
+ # @!attribute recovered_amount
444
+ # The amount that has been recovered from the merchant through the dispute process
445
+ #
446
+ # @return [Integer]
447
+ required :recovered_amount, Integer
448
+
449
+ # @!attribute remaining_amount
450
+ # Any disputed amount that is still outstanding, i.e. has not been recovered,
451
+ # written off, or denied
452
+ #
453
+ # @return [Integer]
454
+ required :remaining_amount, Integer
455
+
456
+ # @!attribute written_off_amount
457
+ # The amount the issuer has chosen to write off
458
+ #
459
+ # @return [Integer]
460
+ required :written_off_amount, Integer
461
+
462
+ # @!method initialize(denied_amount:, original_amount:, recovered_amount:, remaining_amount:, written_off_amount:)
463
+ # Some parameter documentations has been truncated, see
464
+ # {Lithic::Models::DisputeV2::LiabilityAllocation} for more details.
465
+ #
466
+ # Current breakdown of how liability is allocated for the disputed amount
467
+ #
468
+ # @param denied_amount [Integer] The amount that has been denied to the cardholder
469
+ #
470
+ # @param original_amount [Integer] The initial amount disputed
471
+ #
472
+ # @param recovered_amount [Integer] The amount that has been recovered from the merchant through the dispute process
473
+ #
474
+ # @param remaining_amount [Integer] Any disputed amount that is still outstanding, i.e. has not been recovered, writ
475
+ #
476
+ # @param written_off_amount [Integer] The amount the issuer has chosen to write off
477
+ end
478
+
479
+ # Card network handling the dispute.
480
+ #
481
+ # @see Lithic::Models::DisputeV2#network
482
+ module Network
483
+ extend Lithic::Internal::Type::Enum
484
+
485
+ VISA = :VISA
486
+ MASTERCARD = :MASTERCARD
487
+
488
+ # @!method self.values
489
+ # @return [Array<Symbol>]
490
+ end
491
+
492
+ # Current status of the dispute.
493
+ #
494
+ # @see Lithic::Models::DisputeV2#status
495
+ module Status
496
+ extend Lithic::Internal::Type::Enum
497
+
498
+ OPEN = :OPEN
499
+ CLOSED = :CLOSED
500
+
501
+ # @!method self.values
502
+ # @return [Array<Symbol>]
503
+ end
504
+
505
+ # @see Lithic::Models::DisputeV2#transaction_series
506
+ class TransactionSeries < Lithic::Internal::Type::BaseModel
507
+ # @!attribute related_transaction_event_token
508
+ # Token of the specific event in the original transaction being disputed, in UUID
509
+ # format; null if no event can be identified
510
+ #
511
+ # @return [String, nil]
512
+ required :related_transaction_event_token, String, nil?: true
513
+
514
+ # @!attribute related_transaction_token
515
+ # Token of the original transaction being disputed, in UUID format
516
+ #
517
+ # @return [String]
518
+ required :related_transaction_token, String
519
+
520
+ # @!attribute type
521
+ # The type of transaction series associating the dispute and the original
522
+ # transaction. Always set to DISPUTE
523
+ #
524
+ # @return [Symbol, Lithic::Models::DisputeV2::TransactionSeries::Type]
525
+ required :type, enum: -> { Lithic::DisputeV2::TransactionSeries::Type }
526
+
527
+ # @!method initialize(related_transaction_event_token:, related_transaction_token:, type:)
528
+ # Some parameter documentations has been truncated, see
529
+ # {Lithic::Models::DisputeV2::TransactionSeries} for more details.
530
+ #
531
+ # Contains identifiers for the transaction and specific event within being
532
+ # disputed; null if no transaction can be identified
533
+ #
534
+ # @param related_transaction_event_token [String, nil] Token of the specific event in the original transaction being disputed, in UUID
535
+ #
536
+ # @param related_transaction_token [String] Token of the original transaction being disputed, in UUID format
537
+ #
538
+ # @param type [Symbol, Lithic::Models::DisputeV2::TransactionSeries::Type] The type of transaction series associating the dispute and the original transact
539
+
540
+ # The type of transaction series associating the dispute and the original
541
+ # transaction. Always set to DISPUTE
542
+ #
543
+ # @see Lithic::Models::DisputeV2::TransactionSeries#type
544
+ module Type
545
+ extend Lithic::Internal::Type::Enum
546
+
547
+ DISPUTE = :DISPUTE
548
+
549
+ # @!method self.values
550
+ # @return [Array<Symbol>]
551
+ end
552
+ end
553
+ end
554
+ end
555
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::DisputesV2#list
6
+ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!attribute account_token
11
+ # Filter by account token.
12
+ #
13
+ # @return [String, nil]
14
+ optional :account_token, String
15
+
16
+ # @!attribute begin_
17
+ # RFC 3339 timestamp for filtering by created date, inclusive.
18
+ #
19
+ # @return [Time, nil]
20
+ optional :begin_, Time
21
+
22
+ # @!attribute card_token
23
+ # Filter by card token.
24
+ #
25
+ # @return [String, nil]
26
+ optional :card_token, String
27
+
28
+ # @!attribute disputed_transaction_token
29
+ # Filter by the token of the transaction being disputed. Corresponds with
30
+ # transaction_series.related_transaction_token in the Dispute.
31
+ #
32
+ # @return [String, nil]
33
+ optional :disputed_transaction_token, String
34
+
35
+ # @!attribute end_
36
+ # RFC 3339 timestamp for filtering by created date, inclusive.
37
+ #
38
+ # @return [Time, nil]
39
+ optional :end_, Time
40
+
41
+ # @!attribute ending_before
42
+ # A cursor representing an item's token before which a page of results should end.
43
+ # Used to retrieve the previous page of results before this item.
44
+ #
45
+ # @return [String, nil]
46
+ optional :ending_before, String
47
+
48
+ # @!attribute page_size
49
+ # Number of items to return.
50
+ #
51
+ # @return [Integer, nil]
52
+ optional :page_size, Integer
53
+
54
+ # @!attribute starting_after
55
+ # A cursor representing an item's token after which a page of results should
56
+ # begin. Used to retrieve the next page of results after this item.
57
+ #
58
+ # @return [String, nil]
59
+ optional :starting_after, String
60
+
61
+ # @!method initialize(account_token: nil, begin_: nil, card_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {})
62
+ # Some parameter documentations has been truncated, see
63
+ # {Lithic::Models::DisputesV2ListParams} for more details.
64
+ #
65
+ # @param account_token [String] Filter by account token.
66
+ #
67
+ # @param begin_ [Time] RFC 3339 timestamp for filtering by created date, inclusive.
68
+ #
69
+ # @param card_token [String] Filter by card token.
70
+ #
71
+ # @param disputed_transaction_token [String] Filter by the token of the transaction being disputed. Corresponds with transact
72
+ #
73
+ # @param end_ [Time] RFC 3339 timestamp for filtering by created date, inclusive.
74
+ #
75
+ # @param ending_before [String] A cursor representing an item's token before which a page of results should end.
76
+ #
77
+ # @param page_size [Integer] Number of items to return.
78
+ #
79
+ # @param starting_after [String] A cursor representing an item's token after which a page of results should begin
80
+ #
81
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::DisputesV2#retrieve
6
+ class DisputesV2RetrieveParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -31,7 +31,7 @@ module Lithic
31
31
  # @!attribute address2
32
32
  #
33
33
  # @return [String, nil]
34
- optional :address2, String
34
+ optional :address2, String, nil?: true
35
35
 
36
36
  # @!method initialize(address1:, city:, country:, postal_code:, state:, address2: nil)
37
37
  # @param address1 [String]
@@ -39,7 +39,7 @@ module Lithic
39
39
  # @param country [String]
40
40
  # @param postal_code [String]
41
41
  # @param state [String]
42
- # @param address2 [String]
42
+ # @param address2 [String, nil]
43
43
  end
44
44
  end
45
45
  end