lithic 0.1.0.pre.alpha.41 → 0.1.0.pre.alpha.43

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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/account_activity_list_params.rb +10 -8
  5. data/lib/lithic/models/auth_rules/v2_apply_params.rb +13 -5
  6. data/lib/lithic/models/auth_rules/v2_apply_response.rb +510 -18
  7. data/lib/lithic/models/auth_rules/v2_create_params.rb +283 -16
  8. data/lib/lithic/models/auth_rules/v2_create_response.rb +510 -18
  9. data/lib/lithic/models/auth_rules/v2_draft_params.rb +239 -3
  10. data/lib/lithic/models/auth_rules/v2_draft_response.rb +510 -18
  11. data/lib/lithic/models/auth_rules/v2_list_params.rb +10 -1
  12. data/lib/lithic/models/auth_rules/v2_list_response.rb +510 -18
  13. data/lib/lithic/models/auth_rules/v2_promote_response.rb +510 -18
  14. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +510 -18
  15. data/lib/lithic/models/auth_rules/v2_update_params.rb +1 -9
  16. data/lib/lithic/models/auth_rules/v2_update_response.rb +510 -18
  17. data/lib/lithic/models/event.rb +6 -0
  18. data/lib/lithic/models/event_list_params.rb +2 -0
  19. data/lib/lithic/models/event_subscription.rb +2 -0
  20. data/lib/lithic/models/events/subscription_create_params.rb +2 -0
  21. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +2 -0
  22. data/lib/lithic/models/events/subscription_update_params.rb +2 -0
  23. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +28 -26
  24. data/lib/lithic/models/transaction.rb +4 -0
  25. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +62 -0
  26. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_response.rb +25 -0
  27. data/lib/lithic/models.rb +3 -0
  28. data/lib/lithic/resources/account_activity.rb +2 -2
  29. data/lib/lithic/resources/auth_rules/v2/backtests.rb +3 -3
  30. data/lib/lithic/resources/auth_rules/v2.rb +19 -13
  31. data/lib/lithic/resources/transactions.rb +37 -0
  32. data/lib/lithic/version.rb +1 -1
  33. data/lib/lithic.rb +2 -0
  34. data/rbi/lithic/models/account_activity_list_params.rbi +18 -30
  35. data/rbi/lithic/models/auth_rules/v2_apply_params.rbi +19 -5
  36. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +1128 -18
  37. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +646 -21
  38. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +1128 -18
  39. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +554 -4
  40. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +1128 -18
  41. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +16 -0
  42. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +1128 -18
  43. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +1128 -18
  44. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +1128 -18
  45. data/rbi/lithic/models/auth_rules/v2_update_params.rbi +0 -11
  46. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +1128 -18
  47. data/rbi/lithic/models/event.rbi +16 -0
  48. data/rbi/lithic/models/event_list_params.rbi +10 -0
  49. data/rbi/lithic/models/event_subscription.rbi +10 -0
  50. data/rbi/lithic/models/events/subscription_create_params.rbi +10 -0
  51. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +10 -0
  52. data/rbi/lithic/models/events/subscription_update_params.rbi +10 -0
  53. data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +45 -41
  54. data/rbi/lithic/models/transaction.rbi +17 -0
  55. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +92 -0
  56. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_response.rbi +46 -0
  57. data/rbi/lithic/models.rbi +3 -0
  58. data/rbi/lithic/resources/account_activity.rbi +2 -2
  59. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +3 -3
  60. data/rbi/lithic/resources/auth_rules/v2.rbi +28 -14
  61. data/rbi/lithic/resources/transactions.rbi +33 -0
  62. data/sig/lithic/models/account_activity_list_params.rbs +16 -16
  63. data/sig/lithic/models/auth_rules/v2_apply_params.rbs +11 -2
  64. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +317 -2
  65. data/sig/lithic/models/auth_rules/v2_create_params.rbs +188 -4
  66. data/sig/lithic/models/auth_rules/v2_create_response.rbs +317 -2
  67. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +155 -0
  68. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +317 -2
  69. data/sig/lithic/models/auth_rules/v2_list_params.rbs +9 -1
  70. data/sig/lithic/models/auth_rules/v2_list_response.rbs +317 -2
  71. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +317 -2
  72. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +317 -2
  73. data/sig/lithic/models/auth_rules/v2_update_params.rbs +0 -7
  74. data/sig/lithic/models/auth_rules/v2_update_response.rbs +317 -2
  75. data/sig/lithic/models/event.rbs +4 -0
  76. data/sig/lithic/models/event_list_params.rbs +4 -0
  77. data/sig/lithic/models/event_subscription.rbs +4 -0
  78. data/sig/lithic/models/events/subscription_create_params.rbs +4 -0
  79. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +4 -0
  80. data/sig/lithic/models/events/subscription_update_params.rbs +4 -0
  81. data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +20 -20
  82. data/sig/lithic/models/transaction.rbs +10 -2
  83. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +50 -0
  84. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_response.rbs +20 -0
  85. data/sig/lithic/models.rbs +2 -0
  86. data/sig/lithic/resources/account_activity.rbs +2 -2
  87. data/sig/lithic/resources/auth_rules/v2.rbs +6 -3
  88. data/sig/lithic/resources/transactions.rbs +9 -0
  89. metadata +8 -2
@@ -32,6 +32,8 @@ module Lithic
32
32
  # - `card_transaction.updated` - Transaction Lifecycle webhook. See
33
33
  # https://docs.lithic.com/docs/transaction-webhooks.
34
34
  # - `dispute.updated` - A dispute has been updated.
35
+ # - `dispute_transaction.created` - A new dispute transaction has been created.
36
+ # - `dispute_transaction.updated` - A dispute transaction has been updated.
35
37
  # - `digital_wallet.tokenization_approval_request` - Card network's request to
36
38
  # Lithic to activate a digital wallet token.
37
39
  # - `digital_wallet.tokenization_result` - Notification of the end result of a
@@ -83,6 +85,8 @@ module Lithic
83
85
  # - `card_transaction.updated` - Transaction Lifecycle webhook. See
84
86
  # https://docs.lithic.com/docs/transaction-webhooks.
85
87
  # - `dispute.updated` - A dispute has been updated.
88
+ # - `dispute_transaction.created` - A new dispute transaction has been created.
89
+ # - `dispute_transaction.updated` - A dispute transaction has been updated.
86
90
  # - `digital_wallet.tokenization_approval_request` - Card network's request to
87
91
  # Lithic to activate a digital wallet token.
88
92
  # - `digital_wallet.tokenization_result` - Notification of the end result of a
@@ -130,6 +134,8 @@ module Lithic
130
134
  # - `card_transaction.updated` - Transaction Lifecycle webhook. See
131
135
  # https://docs.lithic.com/docs/transaction-webhooks.
132
136
  # - `dispute.updated` - A dispute has been updated.
137
+ # - `dispute_transaction.created` - A new dispute transaction has been created.
138
+ # - `dispute_transaction.updated` - A dispute transaction has been updated.
133
139
  # - `digital_wallet.tokenization_approval_request` - Card network's request to
134
140
  # Lithic to activate a digital wallet token.
135
141
  # - `digital_wallet.tokenization_result` - Notification of the end result of a
@@ -222,6 +228,16 @@ module Lithic
222
228
  :"dispute_evidence.upload_failed",
223
229
  Lithic::Event::EventType::TaggedSymbol
224
230
  )
231
+ DISPUTE_TRANSACTION_CREATED =
232
+ T.let(
233
+ :"dispute_transaction.created",
234
+ Lithic::Event::EventType::TaggedSymbol
235
+ )
236
+ DISPUTE_TRANSACTION_UPDATED =
237
+ T.let(
238
+ :"dispute_transaction.updated",
239
+ Lithic::Event::EventType::TaggedSymbol
240
+ )
225
241
  EXTERNAL_BANK_ACCOUNT_CREATED =
226
242
  T.let(
227
243
  :"external_bank_account.created",
@@ -226,6 +226,16 @@ module Lithic
226
226
  :"dispute_evidence.upload_failed",
227
227
  Lithic::EventListParams::EventType::TaggedSymbol
228
228
  )
229
+ DISPUTE_TRANSACTION_CREATED =
230
+ T.let(
231
+ :"dispute_transaction.created",
232
+ Lithic::EventListParams::EventType::TaggedSymbol
233
+ )
234
+ DISPUTE_TRANSACTION_UPDATED =
235
+ T.let(
236
+ :"dispute_transaction.updated",
237
+ Lithic::EventListParams::EventType::TaggedSymbol
238
+ )
229
239
  EXTERNAL_BANK_ACCOUNT_CREATED =
230
240
  T.let(
231
241
  :"external_bank_account.created",
@@ -174,6 +174,16 @@ module Lithic
174
174
  :"dispute_evidence.upload_failed",
175
175
  Lithic::EventSubscription::EventType::TaggedSymbol
176
176
  )
177
+ DISPUTE_TRANSACTION_CREATED =
178
+ T.let(
179
+ :"dispute_transaction.created",
180
+ Lithic::EventSubscription::EventType::TaggedSymbol
181
+ )
182
+ DISPUTE_TRANSACTION_UPDATED =
183
+ T.let(
184
+ :"dispute_transaction.updated",
185
+ Lithic::EventSubscription::EventType::TaggedSymbol
186
+ )
177
187
  EXTERNAL_BANK_ACCOUNT_CREATED =
178
188
  T.let(
179
189
  :"external_bank_account.created",
@@ -203,6 +203,16 @@ module Lithic
203
203
  :"dispute_evidence.upload_failed",
204
204
  Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol
205
205
  )
206
+ DISPUTE_TRANSACTION_CREATED =
207
+ T.let(
208
+ :"dispute_transaction.created",
209
+ Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol
210
+ )
211
+ DISPUTE_TRANSACTION_UPDATED =
212
+ T.let(
213
+ :"dispute_transaction.updated",
214
+ Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol
215
+ )
206
216
  EXTERNAL_BANK_ACCOUNT_CREATED =
207
217
  T.let(
208
218
  :"external_bank_account.created",
@@ -167,6 +167,16 @@ module Lithic
167
167
  :"dispute_evidence.upload_failed",
168
168
  Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol
169
169
  )
170
+ DISPUTE_TRANSACTION_CREATED =
171
+ T.let(
172
+ :"dispute_transaction.created",
173
+ Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol
174
+ )
175
+ DISPUTE_TRANSACTION_UPDATED =
176
+ T.let(
177
+ :"dispute_transaction.updated",
178
+ Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol
179
+ )
170
180
  EXTERNAL_BANK_ACCOUNT_CREATED =
171
181
  T.let(
172
182
  :"external_bank_account.created",
@@ -203,6 +203,16 @@ module Lithic
203
203
  :"dispute_evidence.upload_failed",
204
204
  Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol
205
205
  )
206
+ DISPUTE_TRANSACTION_CREATED =
207
+ T.let(
208
+ :"dispute_transaction.created",
209
+ Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol
210
+ )
211
+ DISPUTE_TRANSACTION_UPDATED =
212
+ T.let(
213
+ :"dispute_transaction.updated",
214
+ Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol
215
+ )
206
216
  EXTERNAL_BANK_ACCOUNT_CREATED =
207
217
  T.let(
208
218
  :"external_bank_account.created",
@@ -957,26 +957,6 @@ module Lithic
957
957
  )
958
958
  end
959
959
 
960
- # Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
961
- # `acquirerMerchantId`.
962
- sig { returns(String) }
963
- attr_accessor :id
964
-
965
- # Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS
966
- # field `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code
967
- # (e.g., USA).
968
- sig { returns(String) }
969
- attr_accessor :country
970
-
971
- # Merchant category code assigned to the merchant that describes its business
972
- # activity type. Maps to EMV 3DS field `mcc`.
973
- sig { returns(String) }
974
- attr_accessor :mcc
975
-
976
- # Name of the merchant. Maps to EMV 3DS field `merchantName`.
977
- sig { returns(String) }
978
- attr_accessor :name
979
-
980
960
  # Object containing additional data indicating additional risk factors related to
981
961
  # the e-commerce transaction.
982
962
  sig do
@@ -994,46 +974,70 @@ module Lithic
994
974
  end
995
975
  attr_writer :risk_indicator
996
976
 
977
+ # Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
978
+ # `acquirerMerchantId`. May not be present for non-payment authentications.
979
+ sig { returns(T.nilable(String)) }
980
+ attr_accessor :id
981
+
982
+ # Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS
983
+ # field `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code
984
+ # (e.g., USA). May not be present for non-payment authentications.
985
+ sig { returns(T.nilable(String)) }
986
+ attr_accessor :country
987
+
988
+ # Merchant category code assigned to the merchant that describes its business
989
+ # activity type. Maps to EMV 3DS field `mcc`. May not be present for non-payment
990
+ # authentications.
991
+ sig { returns(T.nilable(String)) }
992
+ attr_accessor :mcc
993
+
994
+ # Name of the merchant. Maps to EMV 3DS field `merchantName`. May not be present
995
+ # for non-payment authentications.
996
+ sig { returns(T.nilable(String)) }
997
+ attr_accessor :name
998
+
997
999
  # Object containing data about the merchant involved in the e-commerce
998
1000
  # transaction.
999
1001
  sig do
1000
1002
  params(
1001
- id: String,
1002
- country: String,
1003
- mcc: String,
1004
- name: String,
1005
1003
  risk_indicator:
1006
- Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator::OrHash
1004
+ Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator::OrHash,
1005
+ id: T.nilable(String),
1006
+ country: T.nilable(String),
1007
+ mcc: T.nilable(String),
1008
+ name: T.nilable(String)
1007
1009
  ).returns(T.attached_class)
1008
1010
  end
1009
1011
  def self.new(
1012
+ # Object containing additional data indicating additional risk factors related to
1013
+ # the e-commerce transaction.
1014
+ risk_indicator:,
1010
1015
  # Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
1011
- # `acquirerMerchantId`.
1012
- id:,
1016
+ # `acquirerMerchantId`. May not be present for non-payment authentications.
1017
+ id: nil,
1013
1018
  # Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS
1014
1019
  # field `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code
1015
- # (e.g., USA).
1016
- country:,
1020
+ # (e.g., USA). May not be present for non-payment authentications.
1021
+ country: nil,
1017
1022
  # Merchant category code assigned to the merchant that describes its business
1018
- # activity type. Maps to EMV 3DS field `mcc`.
1019
- mcc:,
1020
- # Name of the merchant. Maps to EMV 3DS field `merchantName`.
1021
- name:,
1022
- # Object containing additional data indicating additional risk factors related to
1023
- # the e-commerce transaction.
1024
- risk_indicator:
1023
+ # activity type. Maps to EMV 3DS field `mcc`. May not be present for non-payment
1024
+ # authentications.
1025
+ mcc: nil,
1026
+ # Name of the merchant. Maps to EMV 3DS field `merchantName`. May not be present
1027
+ # for non-payment authentications.
1028
+ name: nil
1025
1029
  )
1026
1030
  end
1027
1031
 
1028
1032
  sig do
1029
1033
  override.returns(
1030
1034
  {
1031
- id: String,
1032
- country: String,
1033
- mcc: String,
1034
- name: String,
1035
1035
  risk_indicator:
1036
- Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator
1036
+ Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator,
1037
+ id: T.nilable(String),
1038
+ country: T.nilable(String),
1039
+ mcc: T.nilable(String),
1040
+ name: T.nilable(String)
1037
1041
  }
1038
1042
  )
1039
1043
  end
@@ -1813,6 +1813,8 @@ module Lithic
1813
1813
  T.type_alias { T.all(Symbol, Lithic::Transaction::Result) }
1814
1814
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1815
1815
 
1816
+ ACCOUNT_PAUSED =
1817
+ T.let(:ACCOUNT_PAUSED, Lithic::Transaction::Result::TaggedSymbol)
1816
1818
  ACCOUNT_STATE_TRANSACTION_FAIL =
1817
1819
  T.let(
1818
1820
  :ACCOUNT_STATE_TRANSACTION_FAIL,
@@ -2424,6 +2426,11 @@ module Lithic
2424
2426
  :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED,
2425
2427
  Lithic::Transaction::Event::DetailedResult::TaggedSymbol
2426
2428
  )
2429
+ ACCOUNT_PAUSED =
2430
+ T.let(
2431
+ :ACCOUNT_PAUSED,
2432
+ Lithic::Transaction::Event::DetailedResult::TaggedSymbol
2433
+ )
2427
2434
  ACCOUNT_UNDER_REVIEW =
2428
2435
  T.let(
2429
2436
  :ACCOUNT_UNDER_REVIEW,
@@ -3069,6 +3076,11 @@ module Lithic
3069
3076
  T.type_alias { T.all(Symbol, Lithic::Transaction::Event::Result) }
3070
3077
  OrSymbol = T.type_alias { T.any(Symbol, String) }
3071
3078
 
3079
+ ACCOUNT_PAUSED =
3080
+ T.let(
3081
+ :ACCOUNT_PAUSED,
3082
+ Lithic::Transaction::Event::Result::TaggedSymbol
3083
+ )
3072
3084
  ACCOUNT_STATE_TRANSACTION_FAIL =
3073
3085
  T.let(
3074
3086
  :ACCOUNT_STATE_TRANSACTION_FAIL,
@@ -3292,6 +3304,11 @@ module Lithic
3292
3304
  :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED,
3293
3305
  Lithic::Transaction::Event::RuleResult::Result::TaggedSymbol
3294
3306
  )
3307
+ ACCOUNT_PAUSED =
3308
+ T.let(
3309
+ :ACCOUNT_PAUSED,
3310
+ Lithic::Transaction::Event::RuleResult::Result::TaggedSymbol
3311
+ )
3295
3312
  ACCOUNT_UNDER_REVIEW =
3296
3313
  T.let(
3297
3314
  :ACCOUNT_UNDER_REVIEW,
@@ -0,0 +1,92 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class TransactionSimulateCreditAuthorizationAdviceParams < Lithic::Internal::Type::BaseModel
6
+ extend Lithic::Internal::Type::RequestParameters::Converter
7
+ include Lithic::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Lithic::TransactionSimulateCreditAuthorizationAdviceParams,
13
+ Lithic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Amount (in cents). Any value entered will be converted into a negative amount in
18
+ # the simulated transaction. For example, entering 100 in this field will appear
19
+ # as a -100 amount in the transaction.
20
+ sig { returns(Integer) }
21
+ attr_accessor :amount
22
+
23
+ # Merchant descriptor.
24
+ sig { returns(String) }
25
+ attr_accessor :descriptor
26
+
27
+ # Sixteen digit card number.
28
+ sig { returns(String) }
29
+ attr_accessor :pan
30
+
31
+ # Merchant category code for the transaction to be simulated. A four-digit number
32
+ # listed in ISO 18245. Supported merchant category codes can be found
33
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
34
+ sig { returns(T.nilable(String)) }
35
+ attr_reader :mcc
36
+
37
+ sig { params(mcc: String).void }
38
+ attr_writer :mcc
39
+
40
+ # Unique identifier to identify the payment card acceptor.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :merchant_acceptor_id
43
+
44
+ sig { params(merchant_acceptor_id: String).void }
45
+ attr_writer :merchant_acceptor_id
46
+
47
+ sig do
48
+ params(
49
+ amount: Integer,
50
+ descriptor: String,
51
+ pan: String,
52
+ mcc: String,
53
+ merchant_acceptor_id: String,
54
+ request_options: Lithic::RequestOptions::OrHash
55
+ ).returns(T.attached_class)
56
+ end
57
+ def self.new(
58
+ # Amount (in cents). Any value entered will be converted into a negative amount in
59
+ # the simulated transaction. For example, entering 100 in this field will appear
60
+ # as a -100 amount in the transaction.
61
+ amount:,
62
+ # Merchant descriptor.
63
+ descriptor:,
64
+ # Sixteen digit card number.
65
+ pan:,
66
+ # Merchant category code for the transaction to be simulated. A four-digit number
67
+ # listed in ISO 18245. Supported merchant category codes can be found
68
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
69
+ mcc: nil,
70
+ # Unique identifier to identify the payment card acceptor.
71
+ merchant_acceptor_id: nil,
72
+ request_options: {}
73
+ )
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ amount: Integer,
80
+ descriptor: String,
81
+ pan: String,
82
+ mcc: String,
83
+ merchant_acceptor_id: String,
84
+ request_options: Lithic::RequestOptions
85
+ }
86
+ )
87
+ end
88
+ def to_hash
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,46 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class TransactionSimulateCreditAuthorizationAdviceResponse < Lithic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse,
10
+ Lithic::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # A unique token to reference this transaction.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :token
17
+
18
+ sig { params(token: String).void }
19
+ attr_writer :token
20
+
21
+ # Debugging request ID to share with Lithic Support team.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :debugging_request_id
24
+
25
+ sig { params(debugging_request_id: String).void }
26
+ attr_writer :debugging_request_id
27
+
28
+ sig do
29
+ params(token: String, debugging_request_id: String).returns(
30
+ T.attached_class
31
+ )
32
+ end
33
+ def self.new(
34
+ # A unique token to reference this transaction.
35
+ token: nil,
36
+ # Debugging request ID to share with Lithic Support team.
37
+ debugging_request_id: nil
38
+ )
39
+ end
40
+
41
+ sig { override.returns({ token: String, debugging_request_id: String }) }
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end
@@ -367,6 +367,9 @@ module Lithic
367
367
  TransactionSimulateClearingParams =
368
368
  Lithic::Models::TransactionSimulateClearingParams
369
369
 
370
+ TransactionSimulateCreditAuthorizationAdviceParams =
371
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
372
+
370
373
  TransactionSimulateCreditAuthorizationParams =
371
374
  Lithic::Models::TransactionSimulateCreditAuthorizationParams
372
375
 
@@ -14,9 +14,9 @@ module Lithic
14
14
  ending_before: String,
15
15
  financial_account_token: String,
16
16
  page_size: Integer,
17
- result: T::Array[Lithic::AccountActivityListParams::Result::OrSymbol],
17
+ result: Lithic::AccountActivityListParams::Result::OrSymbol,
18
18
  starting_after: String,
19
- status: T::Array[Lithic::AccountActivityListParams::Status::OrSymbol],
19
+ status: Lithic::AccountActivityListParams::Status::OrSymbol,
20
20
  request_options: Lithic::RequestOptions::OrHash
21
21
  ).returns(
22
22
  Lithic::Internal::CursorPage[
@@ -23,9 +23,9 @@ module Lithic
23
23
  # endpoint.
24
24
  #
25
25
  # Lithic currently supports backtesting for `CONDITIONAL_BLOCK` /
26
- # `CONDITIONAL_3DS_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is
27
- # generally not supported. In specific cases (i.e. where Lithic has pre-calculated
28
- # the requested velocity metrics for historical transactions), a backtest may be
26
+ # `CONDITIONAL_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is generally
27
+ # not supported. In specific cases (i.e. where Lithic has pre-calculated the
28
+ # requested velocity metrics for historical transactions), a backtest may be
29
29
  # feasible. However, such cases are uncommon and customers should not anticipate
30
30
  # support for velocity backtests under most configurations. If a historical
31
31
  # transaction does not feature the required inputs to evaluate the rule, then it
@@ -10,16 +10,20 @@ module Lithic
10
10
  # Creates a new V2 Auth rule in draft mode
11
11
  sig do
12
12
  params(
13
- account_tokens: T::Array[String],
14
13
  card_tokens: T::Array[String],
15
14
  program_level: T::Boolean,
15
+ account_tokens: T::Array[String],
16
+ business_account_tokens: T::Array[String],
17
+ event_stream:
18
+ Lithic::AuthRules::V2CreateParams::EventStream::OrSymbol,
16
19
  name: T.nilable(String),
17
20
  parameters:
18
21
  T.any(
19
22
  Lithic::AuthRules::ConditionalBlockParameters::OrHash,
20
23
  Lithic::AuthRules::VelocityLimitParams::OrHash,
21
24
  Lithic::AuthRules::MerchantLockParameters::OrHash,
22
- Lithic::AuthRules::Conditional3DSActionParameters::OrHash
25
+ Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
26
+ Lithic::AuthRules::V2CreateParams::Parameters::ConditionalAuthorizationActionParameters::OrHash
23
27
  ),
24
28
  type: Lithic::AuthRules::V2CreateParams::Type::OrSymbol,
25
29
  excluded_card_tokens: T::Array[String],
@@ -27,23 +31,29 @@ module Lithic
27
31
  ).returns(Lithic::Models::AuthRules::V2CreateResponse)
28
32
  end
29
33
  def create(
30
- # Account tokens to which the Auth Rule applies.
31
- account_tokens:,
32
34
  # Card tokens to which the Auth Rule applies.
33
35
  card_tokens:,
34
36
  # Whether the Auth Rule applies to all authorizations on the card program.
35
37
  program_level:,
38
+ # Account tokens to which the Auth Rule applies.
39
+ account_tokens: nil,
40
+ # Business Account tokens to which the Auth Rule applies.
41
+ business_account_tokens: nil,
42
+ # The event stream during which the rule will be evaluated.
43
+ event_stream: nil,
36
44
  # Auth Rule Name
37
45
  name: nil,
38
46
  # Parameters for the Auth Rule
39
47
  parameters: nil,
40
- # The type of Auth Rule. Effectively determines the event stream during which it
41
- # will be evaluated.
48
+ # The type of Auth Rule. For certain rule types, this determines the event stream
49
+ # during which it will be evaluated. For rules that can be applied to one of
50
+ # several event streams, the effective one is defined by the separate
51
+ # `event_stream` field.
42
52
  #
43
53
  # - `CONDITIONAL_BLOCK`: AUTHORIZATION event stream.
44
54
  # - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
45
55
  # - `MERCHANT_LOCK`: AUTHORIZATION event stream.
46
- # - `CONDITIONAL_3DS_ACTION`: THREE_DS_AUTHENTICATION event stream.
56
+ # - `CONDITIONAL_ACTION`: AUTHORIZATION or THREE_DS_AUTHENTICATION event stream.
47
57
  type: nil,
48
58
  # Card tokens to which the Auth Rule does not apply.
49
59
  excluded_card_tokens: nil,
@@ -73,7 +83,6 @@ module Lithic
73
83
  sig do
74
84
  params(
75
85
  auth_rule_token: String,
76
- account_tokens: T::Array[String],
77
86
  name: T.nilable(String),
78
87
  state: Lithic::AuthRules::V2UpdateParams::State::OrSymbol,
79
88
  card_tokens: T::Array[String],
@@ -85,8 +94,6 @@ module Lithic
85
94
  def update(
86
95
  # Globally unique identifier for the Auth Rule.
87
96
  auth_rule_token,
88
- # Account tokens to which the Auth Rule applies.
89
- account_tokens: nil,
90
97
  # Auth Rule Name
91
98
  name: nil,
92
99
  # The desired state of the Auth Rule.
@@ -109,6 +116,7 @@ module Lithic
109
116
  sig do
110
117
  params(
111
118
  account_token: String,
119
+ business_account_token: String,
112
120
  card_token: String,
113
121
  ending_before: String,
114
122
  event_stream:
@@ -126,6 +134,8 @@ module Lithic
126
134
  def list(
127
135
  # Only return Auth Rules that are bound to the provided account token.
128
136
  account_token: nil,
137
+ # Only return Auth Rules that are bound to the provided business account token.
138
+ business_account_token: nil,
129
139
  # Only return Auth Rules that are bound to the provided card token.
130
140
  card_token: nil,
131
141
  # A cursor representing an item's token before which a page of results should end.
@@ -165,9 +175,10 @@ module Lithic
165
175
  sig do
166
176
  params(
167
177
  auth_rule_token: String,
168
- account_tokens: T::Array[String],
169
178
  card_tokens: T::Array[String],
170
179
  program_level: T::Boolean,
180
+ account_tokens: T::Array[String],
181
+ business_account_tokens: T::Array[String],
171
182
  excluded_card_tokens: T::Array[String],
172
183
  request_options: Lithic::RequestOptions::OrHash
173
184
  ).returns(Lithic::Models::AuthRules::V2ApplyResponse)
@@ -175,12 +186,14 @@ module Lithic
175
186
  def apply(
176
187
  # Globally unique identifier for the Auth Rule.
177
188
  auth_rule_token,
178
- # Account tokens to which the Auth Rule applies.
179
- account_tokens:,
180
189
  # Card tokens to which the Auth Rule applies.
181
190
  card_tokens:,
182
191
  # Whether the Auth Rule applies to all authorizations on the card program.
183
192
  program_level:,
193
+ # Account tokens to which the Auth Rule applies.
194
+ account_tokens: nil,
195
+ # Business Account tokens to which the Auth Rule applies.
196
+ business_account_tokens: nil,
184
197
  # Card tokens to which the Auth Rule does not apply.
185
198
  excluded_card_tokens: nil,
186
199
  request_options: {}
@@ -200,7 +213,8 @@ module Lithic
200
213
  Lithic::AuthRules::ConditionalBlockParameters::OrHash,
201
214
  Lithic::AuthRules::VelocityLimitParams::OrHash,
202
215
  Lithic::AuthRules::MerchantLockParameters::OrHash,
203
- Lithic::AuthRules::Conditional3DSActionParameters::OrHash
216
+ Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
217
+ Lithic::AuthRules::V2DraftParams::Parameters::ConditionalAuthorizationActionParameters::OrHash
204
218
  )
205
219
  ),
206
220
  request_options: Lithic::RequestOptions::OrHash
@@ -241,6 +241,39 @@ module Lithic
241
241
  )
242
242
  end
243
243
 
244
+ # Simulates a credit authorization advice from the card network. This message
245
+ # indicates that the network approved a credit authorization on your behalf.
246
+ sig do
247
+ params(
248
+ amount: Integer,
249
+ descriptor: String,
250
+ pan: String,
251
+ mcc: String,
252
+ merchant_acceptor_id: String,
253
+ request_options: Lithic::RequestOptions::OrHash
254
+ ).returns(
255
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse
256
+ )
257
+ end
258
+ def simulate_credit_authorization_advice(
259
+ # Amount (in cents). Any value entered will be converted into a negative amount in
260
+ # the simulated transaction. For example, entering 100 in this field will appear
261
+ # as a -100 amount in the transaction.
262
+ amount:,
263
+ # Merchant descriptor.
264
+ descriptor:,
265
+ # Sixteen digit card number.
266
+ pan:,
267
+ # Merchant category code for the transaction to be simulated. A four-digit number
268
+ # listed in ISO 18245. Supported merchant category codes can be found
269
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
270
+ mcc: nil,
271
+ # Unique identifier to identify the payment card acceptor.
272
+ merchant_acceptor_id: nil,
273
+ request_options: {}
274
+ )
275
+ end
276
+
244
277
  # Returns, or refunds, an amount back to a card. Returns simulated via this
245
278
  # endpoint clear immediately, without prior authorization, and result in a
246
279
  # `SETTLED` transaction status.