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
@@ -12,7 +12,11 @@ module Lithic
12
12
  #
13
13
  # Creates a new V2 Auth rule in draft mode
14
14
  #
15
- # @overload create(card_tokens:, program_level:, account_tokens: nil, business_account_tokens: nil, event_stream: nil, name: nil, parameters: nil, type: nil, excluded_card_tokens: nil, request_options: {})
15
+ # @overload create(parameters:, type:, card_tokens:, program_level:, account_tokens: nil, business_account_tokens: nil, event_stream: nil, name: nil, excluded_card_tokens: nil, request_options: {})
16
+ #
17
+ # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters] Parameters for the Auth Rule
18
+ #
19
+ # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Type] The type of Auth Rule. For certain rule types, this determines the event stream
16
20
  #
17
21
  # @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
18
22
  #
@@ -26,10 +30,6 @@ module Lithic
26
30
  #
27
31
  # @param name [String, nil] Auth Rule Name
28
32
  #
29
- # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateParams::Parameters::ConditionalAuthorizationActionParameters] Parameters for the Auth Rule
30
- #
31
- # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Type] The type of Auth Rule. For certain rule types, this determines the event stream
32
- #
33
33
  # @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
34
34
  #
35
35
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -52,8 +52,7 @@ module Lithic
52
52
  #
53
53
  # @overload retrieve(auth_rule_token, request_options: {})
54
54
  #
55
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
56
- #
55
+ # @param auth_rule_token [String]
57
56
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
58
57
  #
59
58
  # @return [Lithic::Models::AuthRules::V2RetrieveResponse]
@@ -79,7 +78,7 @@ module Lithic
79
78
  #
80
79
  # @overload update(auth_rule_token, account_tokens: nil, business_account_tokens: nil, name: nil, state: nil, card_tokens: nil, excluded_card_tokens: nil, program_level: nil, request_options: {})
81
80
  #
82
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
81
+ # @param auth_rule_token [String]
83
82
  #
84
83
  # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
85
84
  #
@@ -155,8 +154,7 @@ module Lithic
155
154
  #
156
155
  # @overload delete(auth_rule_token, request_options: {})
157
156
  #
158
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
159
- #
157
+ # @param auth_rule_token [String]
160
158
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
161
159
  #
162
160
  # @return [nil]
@@ -171,43 +169,6 @@ module Lithic
171
169
  )
172
170
  end
173
171
 
174
- # @deprecated
175
- #
176
- # Associates a V2 Auth rule with a card program, the provided account(s) or
177
- # card(s).
178
- #
179
- # Prefer using the `PATCH` method for this operation.
180
- #
181
- # @overload apply(auth_rule_token, card_tokens:, program_level:, account_tokens: nil, business_account_tokens: nil, excluded_card_tokens: nil, request_options: {})
182
- #
183
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
184
- #
185
- # @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
186
- #
187
- # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
188
- #
189
- # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
190
- #
191
- # @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
192
- #
193
- # @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
194
- #
195
- # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
196
- #
197
- # @return [Lithic::Models::AuthRules::V2ApplyResponse]
198
- #
199
- # @see Lithic::Models::AuthRules::V2ApplyParams
200
- def apply(auth_rule_token, params)
201
- parsed, options = Lithic::AuthRules::V2ApplyParams.dump_request(params)
202
- @client.request(
203
- method: :post,
204
- path: ["v2/auth_rules/%1$s/apply", auth_rule_token],
205
- body: parsed,
206
- model: Lithic::Models::AuthRules::V2ApplyResponse,
207
- options: options
208
- )
209
- end
210
-
211
172
  # Creates a new draft version of a rule that will be ran in shadow mode.
212
173
  #
213
174
  # This can also be utilized to reset the draft parameters, causing a draft version
@@ -215,9 +176,9 @@ module Lithic
215
176
  #
216
177
  # @overload draft(auth_rule_token, parameters: nil, request_options: {})
217
178
  #
218
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
179
+ # @param auth_rule_token [String]
219
180
  #
220
- # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2DraftParams::Parameters::ConditionalAuthorizationActionParameters, nil] Parameters for the Auth Rule
181
+ # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, nil] Parameters for the Auth Rule
221
182
  #
222
183
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
223
184
  #
@@ -240,8 +201,7 @@ module Lithic
240
201
  #
241
202
  # @overload promote(auth_rule_token, request_options: {})
242
203
  #
243
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
244
- #
204
+ # @param auth_rule_token [String]
245
205
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
246
206
  #
247
207
  # @return [Lithic::Models::AuthRules::V2PromoteResponse]
@@ -268,12 +228,9 @@ module Lithic
268
228
  #
269
229
  # @overload retrieve_features(auth_rule_token, account_token: nil, card_token: nil, request_options: {})
270
230
  #
271
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
272
- #
231
+ # @param auth_rule_token [String]
273
232
  # @param account_token [String]
274
- #
275
233
  # @param card_token [String]
276
- #
277
234
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
278
235
  #
279
236
  # @return [Lithic::Models::AuthRules::V2RetrieveFeaturesResponse]
@@ -306,7 +263,7 @@ module Lithic
306
263
  #
307
264
  # @overload retrieve_report(auth_rule_token, begin_:, end_:, request_options: {})
308
265
  #
309
- # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
266
+ # @param auth_rule_token [String]
310
267
  #
311
268
  # @param begin_ [Date] Start date for the report
312
269
  #
@@ -19,7 +19,7 @@ module Lithic
19
19
  #
20
20
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
21
21
  #
22
- # @return [Lithic::Models::Dispute]
22
+ # @return [Lithic::Models::DisputeCreateResponse]
23
23
  #
24
24
  # @see Lithic::Models::DisputeCreateParams
25
25
  def create(params)
@@ -28,7 +28,7 @@ module Lithic
28
28
  method: :post,
29
29
  path: "v1/disputes",
30
30
  body: parsed,
31
- model: Lithic::Dispute,
31
+ model: Lithic::Models::DisputeCreateResponse,
32
32
  options: options
33
33
  )
34
34
  end
@@ -40,14 +40,14 @@ module Lithic
40
40
  # @param dispute_token [String]
41
41
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
42
42
  #
43
- # @return [Lithic::Models::Dispute]
43
+ # @return [Lithic::Models::DisputeRetrieveResponse]
44
44
  #
45
45
  # @see Lithic::Models::DisputeRetrieveParams
46
46
  def retrieve(dispute_token, params = {})
47
47
  @client.request(
48
48
  method: :get,
49
49
  path: ["v1/disputes/%1$s", dispute_token],
50
- model: Lithic::Dispute,
50
+ model: Lithic::Models::DisputeRetrieveResponse,
51
51
  options: params[:request_options]
52
52
  )
53
53
  end
@@ -68,7 +68,7 @@ module Lithic
68
68
  #
69
69
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
70
70
  #
71
- # @return [Lithic::Models::Dispute]
71
+ # @return [Lithic::Models::DisputeUpdateResponse]
72
72
  #
73
73
  # @see Lithic::Models::DisputeUpdateParams
74
74
  def update(dispute_token, params = {})
@@ -77,7 +77,7 @@ module Lithic
77
77
  method: :patch,
78
78
  path: ["v1/disputes/%1$s", dispute_token],
79
79
  body: parsed,
80
- model: Lithic::Dispute,
80
+ model: Lithic::Models::DisputeUpdateResponse,
81
81
  options: options
82
82
  )
83
83
  end
@@ -105,7 +105,7 @@ module Lithic
105
105
  #
106
106
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
107
107
  #
108
- # @return [Lithic::Internal::CursorPage<Lithic::Models::Dispute>]
108
+ # @return [Lithic::Internal::CursorPage<Lithic::Models::DisputeListResponse>]
109
109
  #
110
110
  # @see Lithic::Models::DisputeListParams
111
111
  def list(params = {})
@@ -115,7 +115,7 @@ module Lithic
115
115
  path: "v1/disputes",
116
116
  query: parsed.transform_keys(begin_: "begin", end_: "end"),
117
117
  page: Lithic::Internal::CursorPage,
118
- model: Lithic::Dispute,
118
+ model: Lithic::Models::DisputeListResponse,
119
119
  options: options
120
120
  )
121
121
  end
@@ -127,14 +127,14 @@ module Lithic
127
127
  # @param dispute_token [String]
128
128
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
129
129
  #
130
- # @return [Lithic::Models::Dispute]
130
+ # @return [Lithic::Models::DisputeDeleteResponse]
131
131
  #
132
132
  # @see Lithic::Models::DisputeDeleteParams
133
133
  def delete(dispute_token, params = {})
134
134
  @client.request(
135
135
  method: :delete,
136
136
  path: ["v1/disputes/%1$s", dispute_token],
137
- model: Lithic::Dispute,
137
+ model: Lithic::Models::DisputeDeleteResponse,
138
138
  options: params[:request_options]
139
139
  )
140
140
  end
@@ -130,14 +130,18 @@ module Lithic
130
130
 
131
131
  # Simulate payment lifecycle event
132
132
  #
133
- # @overload simulate_action(payment_token, event_type:, decline_reason: nil, return_reason_code: nil, request_options: {})
133
+ # @overload simulate_action(payment_token, event_type:, date_of_death: nil, decline_reason: nil, return_addenda: nil, return_reason_code: nil, request_options: {})
134
134
  #
135
135
  # @param payment_token [String]
136
136
  #
137
137
  # @param event_type [Symbol, Lithic::Models::PaymentSimulateActionParams::EventType] Event Type
138
138
  #
139
+ # @param date_of_death [Date] Date of Death for ACH Return
140
+ #
139
141
  # @param decline_reason [Symbol, Lithic::Models::PaymentSimulateActionParams::DeclineReason] Decline reason
140
142
  #
143
+ # @param return_addenda [String] Return Addenda
144
+ #
141
145
  # @param return_reason_code [String] Return Reason Code
142
146
  #
143
147
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.1.0.pre.alpha.53"
4
+ VERSION = "0.1.0.pre.alpha.55"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -9,6 +9,7 @@ require "erb"
9
9
  require "etc"
10
10
  require "json"
11
11
  require "net/http"
12
+ require "openssl"
12
13
  require "pathname"
13
14
  require "rbconfig"
14
15
  require "securerandom"
@@ -90,6 +91,7 @@ require_relative "lithic/models/auth_rules/auth_rule"
90
91
  require_relative "lithic/models/auth_rules/auth_rule_condition"
91
92
  require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
92
93
  require_relative "lithic/models/auth_rules/conditional_attribute"
94
+ require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters"
93
95
  require_relative "lithic/models/auth_rules/conditional_block_parameters"
94
96
  require_relative "lithic/models/auth_rules/merchant_lock_parameters"
95
97
  require_relative "lithic/models/auth_rules/rule_stats"
@@ -97,8 +99,6 @@ require_relative "lithic/models/auth_rules/v2/backtest_create_params"
97
99
  require_relative "lithic/models/auth_rules/v2/backtest_create_response"
98
100
  require_relative "lithic/models/auth_rules/v2/backtest_results"
99
101
  require_relative "lithic/models/auth_rules/v2/backtest_retrieve_params"
100
- require_relative "lithic/models/auth_rules/v2_apply_params"
101
- require_relative "lithic/models/auth_rules/v2_apply_response"
102
102
  require_relative "lithic/models/auth_rules/v2_create_params"
103
103
  require_relative "lithic/models/auth_rules/v2_create_response"
104
104
  require_relative "lithic/models/auth_rules/v2_delete_params"
@@ -117,7 +117,7 @@ require_relative "lithic/models/auth_rules/v2_retrieve_response"
117
117
  require_relative "lithic/models/auth_rules/v2_update_params"
118
118
  require_relative "lithic/models/auth_rules/v2_update_response"
119
119
  require_relative "lithic/models/auth_rules/velocity_limit_params"
120
- require_relative "lithic/models/auth_rules/velocity_limit_params_period_window"
120
+ require_relative "lithic/models/auth_rules/velocity_limit_period"
121
121
  require_relative "lithic/models/auth_stream_enrollment_retrieve_secret_params"
122
122
  require_relative "lithic/models/auth_stream_enrollment_rotate_secret_params"
123
123
  require_relative "lithic/models/auth_stream_secret"
@@ -167,15 +167,20 @@ require_relative "lithic/models/digital_card_art_list_params"
167
167
  require_relative "lithic/models/digital_card_art_retrieve_params"
168
168
  require_relative "lithic/models/dispute"
169
169
  require_relative "lithic/models/dispute_create_params"
170
+ require_relative "lithic/models/dispute_create_response"
170
171
  require_relative "lithic/models/dispute_delete_evidence_params"
171
172
  require_relative "lithic/models/dispute_delete_params"
173
+ require_relative "lithic/models/dispute_delete_response"
172
174
  require_relative "lithic/models/dispute_evidence"
173
175
  require_relative "lithic/models/dispute_initiate_evidence_upload_params"
174
176
  require_relative "lithic/models/dispute_list_evidences_params"
175
177
  require_relative "lithic/models/dispute_list_params"
178
+ require_relative "lithic/models/dispute_list_response"
176
179
  require_relative "lithic/models/dispute_retrieve_evidence_params"
177
180
  require_relative "lithic/models/dispute_retrieve_params"
181
+ require_relative "lithic/models/dispute_retrieve_response"
178
182
  require_relative "lithic/models/dispute_update_params"
183
+ require_relative "lithic/models/dispute_update_response"
179
184
  require_relative "lithic/models/document"
180
185
  require_relative "lithic/models/event"
181
186
  require_relative "lithic/models/event_list_attempts_params"
data/manifest.yaml CHANGED
@@ -6,6 +6,7 @@ dependencies:
6
6
  - etc
7
7
  - json
8
8
  - net/http
9
+ - openssl
9
10
  - pathname
10
11
  - rbconfig
11
12
  - securerandom
@@ -176,6 +176,11 @@ module Lithic
176
176
  private def auth_headers
177
177
  end
178
178
 
179
+ # @api private
180
+ sig { returns(String) }
181
+ private def user_agent
182
+ end
183
+
179
184
  # @api private
180
185
  sig { returns(String) }
181
186
  private def generate_idempotency_key
@@ -26,8 +26,12 @@ module Lithic
26
26
 
27
27
  class << self
28
28
  # @api private
29
- sig { params(url: URI::Generic).returns(Net::HTTP) }
30
- def connect(url)
29
+ sig do
30
+ params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
31
+ Net::HTTP
32
+ )
33
+ end
34
+ def connect(cert_store:, url:)
31
35
  end
32
36
 
33
37
  # @api private
@@ -28,7 +28,7 @@ module Lithic
28
28
  #
29
29
  # Assumes superclass fields are totally defined before fields are accessed /
30
30
  # defined on subclasses.
31
- sig { params(child: T.self_type).void }
31
+ sig { params(child: Lithic::Internal::Type::BaseModel).void }
32
32
  def inherited(child)
33
33
  end
34
34
 
@@ -267,9 +267,13 @@ module Lithic
267
267
 
268
268
  # Create a new instance of a model.
269
269
  sig do
270
- params(data: T.any(T::Hash[Symbol, T.anything], T.self_type)).returns(
271
- T.attached_class
272
- )
270
+ params(
271
+ data:
272
+ T.any(
273
+ T::Hash[Symbol, T.anything],
274
+ Lithic::Internal::Type::BaseModel
275
+ )
276
+ ).returns(T.attached_class)
273
277
  end
274
278
  def self.new(data = {})
275
279
  end
@@ -496,6 +496,11 @@ module Lithic
496
496
  :ACH_RECEIPT_PROCESSED,
497
497
  Lithic::Models::AccountActivityListResponse::Internal::Event::Type::TaggedSymbol
498
498
  )
499
+ ACH_RECEIPT_RELEASED =
500
+ T.let(
501
+ :ACH_RECEIPT_RELEASED,
502
+ Lithic::Models::AccountActivityListResponse::Internal::Event::Type::TaggedSymbol
503
+ )
499
504
  ACH_RECEIPT_SETTLED =
500
505
  T.let(
501
506
  :ACH_RECEIPT_SETTLED,
@@ -496,6 +496,11 @@ module Lithic
496
496
  :ACH_RECEIPT_PROCESSED,
497
497
  Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Event::Type::TaggedSymbol
498
498
  )
499
+ ACH_RECEIPT_RELEASED =
500
+ T.let(
501
+ :ACH_RECEIPT_RELEASED,
502
+ Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Event::Type::TaggedSymbol
503
+ )
499
504
  ACH_RECEIPT_SETTLED =
500
505
  T.let(
501
506
  :ACH_RECEIPT_SETTLED,
@@ -67,10 +67,7 @@ module Lithic
67
67
  # users of businesses. Pass the account_token of the enrolled business associated
68
68
  # with the AUTHORIZED_USER in this field.
69
69
  sig { returns(T.nilable(String)) }
70
- attr_reader :business_account_token
71
-
72
- sig { params(business_account_token: String).void }
73
- attr_writer :business_account_token
70
+ attr_accessor :business_account_token
74
71
 
75
72
  # Only present when user_type == "BUSINESS". Information about the business for
76
73
  # which the account is being opened and KYB is being run.
@@ -302,7 +299,7 @@ module Lithic
302
299
  T::Array[
303
300
  Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::BeneficialOwnerIndividual::OrHash
304
301
  ],
305
- business_account_token: String,
302
+ business_account_token: T.nilable(String),
306
303
  business_entity: Lithic::KYBBusinessEntity::OrHash,
307
304
  control_person:
308
305
  Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson::OrHash,
@@ -420,7 +417,7 @@ module Lithic
420
417
  T::Array[
421
418
  Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::BeneficialOwnerIndividual
422
419
  ],
423
- business_account_token: String,
420
+ business_account_token: T.nilable(String),
424
421
  business_entity: Lithic::KYBBusinessEntity,
425
422
  control_person:
426
423
  Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson,
@@ -79,10 +79,7 @@ module Lithic
79
79
  # users of businesses. Pass the account_token of the enrolled business associated
80
80
  # with the AUTHORIZED_USER in this field.
81
81
  sig { returns(T.nilable(String)) }
82
- attr_reader :business_account_token
83
-
84
- sig { params(business_account_token: String).void }
85
- attr_writer :business_account_token
82
+ attr_accessor :business_account_token
86
83
 
87
84
  # Only present when user_type == "BUSINESS". Information about the business for
88
85
  # which the account is being opened and KYB is being run.
@@ -314,7 +311,7 @@ module Lithic
314
311
  T::Array[
315
312
  Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::BeneficialOwnerIndividual::OrHash
316
313
  ],
317
- business_account_token: String,
314
+ business_account_token: T.nilable(String),
318
315
  business_entity: Lithic::KYBBusinessEntity::OrHash,
319
316
  control_person:
320
317
  Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ControlPerson::OrHash,
@@ -432,7 +429,7 @@ module Lithic
432
429
  T::Array[
433
430
  Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::BeneficialOwnerIndividual
434
431
  ],
435
- business_account_token: String,
432
+ business_account_token: T.nilable(String),
436
433
  business_entity: Lithic::KYBBusinessEntity,
437
434
  control_person:
438
435
  Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ControlPerson,
@@ -1664,10 +1661,7 @@ module Lithic
1664
1661
 
1665
1662
  # The token for the business account that the account holder is associated with
1666
1663
  sig { returns(T.nilable(String)) }
1667
- attr_reader :business_account_token
1668
-
1669
- sig { params(business_account_token: String).void }
1670
- attr_writer :business_account_token
1664
+ attr_accessor :business_account_token
1671
1665
 
1672
1666
  # The email for the account holder
1673
1667
  sig { returns(T.nilable(String)) }
@@ -1709,7 +1703,7 @@ module Lithic
1709
1703
  token: String,
1710
1704
  address:
1711
1705
  Lithic::Models::AccountHolderUpdateResponse::PatchResponse::Address::OrHash,
1712
- business_account_token: String,
1706
+ business_account_token: T.nilable(String),
1713
1707
  email: String,
1714
1708
  first_name: String,
1715
1709
  last_name: String,
@@ -1743,7 +1737,7 @@ module Lithic
1743
1737
  token: String,
1744
1738
  address:
1745
1739
  Lithic::Models::AccountHolderUpdateResponse::PatchResponse::Address,
1746
- business_account_token: String,
1740
+ business_account_token: T.nilable(String),
1747
1741
  email: String,
1748
1742
  first_name: String,
1749
1743
  last_name: String,