lithic 0.23.1 → 0.24.0

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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/account_activity_list_params.rb +3 -3
  5. data/lib/lithic/models/account_holder_list_params.rb +3 -3
  6. data/lib/lithic/models/account_list_params.rb +3 -3
  7. data/lib/lithic/models/account_update_params.rb +10 -7
  8. data/lib/lithic/models/auth_rules/auth_rule.rb +6 -10
  9. data/lib/lithic/models/auth_rules/auth_rule_version.rb +3 -5
  10. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +91 -8
  11. data/lib/lithic/models/auth_rules/v2/backtest_results.rb +9 -1
  12. data/lib/lithic/models/auth_rules/v2_create_params.rb +12 -20
  13. data/lib/lithic/models/auth_rules/v2_draft_params.rb +3 -5
  14. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +3 -3
  15. data/lib/lithic/models/book_transfer_list_params.rb +3 -3
  16. data/lib/lithic/models/card_bulk_order_list_params.rb +3 -3
  17. data/lib/lithic/models/card_list_params.rb +3 -3
  18. data/lib/lithic/models/cards/financial_transaction_list_params.rb +3 -3
  19. data/lib/lithic/models/dispute_list_evidences_params.rb +3 -3
  20. data/lib/lithic/models/dispute_list_params.rb +3 -3
  21. data/lib/lithic/models/event_list_attempts_params.rb +3 -3
  22. data/lib/lithic/models/event_list_params.rb +3 -3
  23. data/lib/lithic/models/events/subscription_list_attempts_params.rb +3 -3
  24. data/lib/lithic/models/events/subscription_recover_params.rb +3 -3
  25. data/lib/lithic/models/events/subscription_replay_missing_params.rb +3 -3
  26. data/lib/lithic/models/external_payment_list_params.rb +3 -3
  27. data/lib/lithic/models/financial_accounts/financial_transaction_list_params.rb +3 -3
  28. data/lib/lithic/models/financial_accounts/installment_plan.rb +33 -3
  29. data/lib/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rb +95 -15
  30. data/lib/lithic/models/financial_accounts/installment_plans/statement_list_params.rb +3 -3
  31. data/lib/lithic/models/financial_accounts/loan_tape_list_params.rb +3 -3
  32. data/lib/lithic/models/financial_accounts/statement_list_params.rb +3 -3
  33. data/lib/lithic/models/funding_event_list_params.rb +3 -3
  34. data/lib/lithic/models/hold_list_params.rb +3 -3
  35. data/lib/lithic/models/kyb.rb +2 -0
  36. data/lib/lithic/models/management_operation_create_params.rb +7 -19
  37. data/lib/lithic/models/management_operation_list_params.rb +3 -3
  38. data/lib/lithic/models/network_program_list_params.rb +3 -3
  39. data/lib/lithic/models/payment_list_params.rb +3 -3
  40. data/lib/lithic/models/reports/settlement/network_total_list_params.rb +3 -3
  41. data/lib/lithic/models/three_ds_authentication.rb +12 -1
  42. data/lib/lithic/models/three_ds_authentication_challenge_webhook_event.rb +13 -1
  43. data/lib/lithic/models/tokenization.rb +44 -1
  44. data/lib/lithic/models/tokenization_list_params.rb +3 -2
  45. data/lib/lithic/models/transaction_list_params.rb +3 -3
  46. data/lib/lithic/models/transaction_monitoring/case_list_params.rb +3 -3
  47. data/lib/lithic/resources/account_activity.rb +1 -1
  48. data/lib/lithic/resources/account_holders.rb +1 -1
  49. data/lib/lithic/resources/accounts.rb +1 -1
  50. data/lib/lithic/resources/auth_rules/v2.rb +2 -2
  51. data/lib/lithic/resources/book_transfers.rb +1 -1
  52. data/lib/lithic/resources/card_bulk_orders.rb +1 -1
  53. data/lib/lithic/resources/cards/financial_transactions.rb +1 -1
  54. data/lib/lithic/resources/cards.rb +1 -1
  55. data/lib/lithic/resources/disputes.rb +2 -2
  56. data/lib/lithic/resources/events/subscriptions.rb +7 -7
  57. data/lib/lithic/resources/events.rb +2 -2
  58. data/lib/lithic/resources/external_payments.rb +1 -1
  59. data/lib/lithic/resources/financial_accounts/financial_transactions.rb +1 -1
  60. data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +1 -1
  61. data/lib/lithic/resources/financial_accounts/loan_tapes.rb +1 -1
  62. data/lib/lithic/resources/financial_accounts/statements.rb +1 -1
  63. data/lib/lithic/resources/funding_events.rb +1 -1
  64. data/lib/lithic/resources/holds.rb +1 -1
  65. data/lib/lithic/resources/management_operations.rb +3 -3
  66. data/lib/lithic/resources/network_programs.rb +1 -1
  67. data/lib/lithic/resources/payments.rb +1 -1
  68. data/lib/lithic/resources/reports/settlement/network_totals.rb +1 -1
  69. data/lib/lithic/resources/tokenizations.rb +1 -1
  70. data/lib/lithic/resources/transaction_monitoring/cases.rb +1 -1
  71. data/lib/lithic/resources/transactions.rb +1 -1
  72. data/lib/lithic/version.rb +1 -1
  73. data/lib/lithic.rb +0 -1
  74. data/rbi/lithic/models/account_activity_list_params.rbi +4 -4
  75. data/rbi/lithic/models/account_holder_list_params.rbi +4 -4
  76. data/rbi/lithic/models/account_list_params.rbi +4 -4
  77. data/rbi/lithic/models/account_update_params.rbi +20 -14
  78. data/rbi/lithic/models/auth_rules/auth_rule.rbi +4 -8
  79. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +2 -4
  80. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +200 -20
  81. data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +8 -0
  82. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +16 -32
  83. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +4 -8
  84. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +4 -4
  85. data/rbi/lithic/models/book_transfer_list_params.rbi +4 -4
  86. data/rbi/lithic/models/card_bulk_order_list_params.rbi +4 -4
  87. data/rbi/lithic/models/card_list_params.rbi +4 -4
  88. data/rbi/lithic/models/cards/financial_transaction_list_params.rbi +4 -4
  89. data/rbi/lithic/models/dispute_list_evidences_params.rbi +4 -4
  90. data/rbi/lithic/models/dispute_list_params.rbi +4 -4
  91. data/rbi/lithic/models/event_list_attempts_params.rbi +4 -4
  92. data/rbi/lithic/models/event_list_params.rbi +4 -4
  93. data/rbi/lithic/models/events/subscription_list_attempts_params.rbi +4 -4
  94. data/rbi/lithic/models/events/subscription_recover_params.rbi +4 -4
  95. data/rbi/lithic/models/events/subscription_replay_missing_params.rbi +4 -4
  96. data/rbi/lithic/models/external_payment_list_params.rbi +4 -4
  97. data/rbi/lithic/models/financial_accounts/financial_transaction_list_params.rbi +4 -4
  98. data/rbi/lithic/models/financial_accounts/installment_plan.rbi +40 -6
  99. data/rbi/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbi +160 -24
  100. data/rbi/lithic/models/financial_accounts/installment_plans/statement_list_params.rbi +4 -4
  101. data/rbi/lithic/models/financial_accounts/loan_tape_list_params.rbi +4 -4
  102. data/rbi/lithic/models/financial_accounts/statement_list_params.rbi +4 -4
  103. data/rbi/lithic/models/funding_event_list_params.rbi +4 -4
  104. data/rbi/lithic/models/hold_list_params.rbi +4 -4
  105. data/rbi/lithic/models/kyb.rbi +4 -0
  106. data/rbi/lithic/models/management_operation_create_params.rbi +8 -82
  107. data/rbi/lithic/models/management_operation_list_params.rbi +4 -4
  108. data/rbi/lithic/models/network_program_list_params.rbi +4 -4
  109. data/rbi/lithic/models/payment_list_params.rbi +4 -4
  110. data/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +4 -4
  111. data/rbi/lithic/models/three_ds_authentication.rbi +14 -0
  112. data/rbi/lithic/models/three_ds_authentication_challenge_webhook_event.rbi +10 -0
  113. data/rbi/lithic/models/tokenization.rbi +91 -3
  114. data/rbi/lithic/models/tokenization_list_params.rbi +7 -2
  115. data/rbi/lithic/models/transaction_list_params.rbi +4 -4
  116. data/rbi/lithic/models/transaction_monitoring/case_list_params.rbi +4 -4
  117. data/rbi/lithic/resources/account_activity.rbi +2 -2
  118. data/rbi/lithic/resources/account_holders.rbi +2 -2
  119. data/rbi/lithic/resources/accounts.rbi +12 -9
  120. data/rbi/lithic/resources/auth_rules/v2.rbi +3 -4
  121. data/rbi/lithic/resources/book_transfers.rbi +2 -2
  122. data/rbi/lithic/resources/card_bulk_orders.rbi +2 -2
  123. data/rbi/lithic/resources/cards/financial_transactions.rbi +2 -2
  124. data/rbi/lithic/resources/cards.rbi +2 -2
  125. data/rbi/lithic/resources/disputes.rbi +4 -4
  126. data/rbi/lithic/resources/events/subscriptions.rbi +10 -10
  127. data/rbi/lithic/resources/events.rbi +4 -4
  128. data/rbi/lithic/resources/external_payments.rbi +2 -2
  129. data/rbi/lithic/resources/financial_accounts/financial_transactions.rbi +2 -2
  130. data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +2 -2
  131. data/rbi/lithic/resources/financial_accounts/loan_tapes.rbi +2 -2
  132. data/rbi/lithic/resources/financial_accounts/statements.rbi +2 -2
  133. data/rbi/lithic/resources/funding_events.rbi +2 -2
  134. data/rbi/lithic/resources/holds.rbi +2 -2
  135. data/rbi/lithic/resources/management_operations.rbi +5 -3
  136. data/rbi/lithic/resources/network_programs.rbi +2 -2
  137. data/rbi/lithic/resources/payments.rbi +2 -2
  138. data/rbi/lithic/resources/reports/settlement/network_totals.rbi +2 -2
  139. data/rbi/lithic/resources/tokenizations.rbi +1 -1
  140. data/rbi/lithic/resources/transaction_monitoring/cases.rbi +2 -2
  141. data/rbi/lithic/resources/transactions.rbi +2 -2
  142. data/sig/lithic/models/auth_rules/auth_rule.rbs +0 -2
  143. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +0 -1
  144. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +64 -5
  145. data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +5 -0
  146. data/sig/lithic/models/auth_rules/v2_create_params.rbs +0 -4
  147. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +0 -1
  148. data/sig/lithic/models/financial_accounts/installment_plan.rbs +25 -6
  149. data/sig/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbs +80 -21
  150. data/sig/lithic/models/management_operation_create_params.rbs +1 -33
  151. data/sig/lithic/models/three_ds_authentication.rbs +5 -0
  152. data/sig/lithic/models/three_ds_authentication_challenge_webhook_event.rbs +5 -0
  153. data/sig/lithic/models/tokenization.rbs +47 -4
  154. data/sig/lithic/models/tokenization_list_params.rbs +3 -1
  155. metadata +1 -4
  156. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +0 -538
  157. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +0 -1161
  158. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +0 -278
@@ -1,538 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lithic
4
- module Models
5
- module AuthRules
6
- class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::BaseModel
7
- # @!attribute action
8
- # The hold adjustment to apply if the conditions are met.
9
- #
10
- # @return [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action]
11
- required :action, -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action }
12
-
13
- # @!attribute conditions
14
- #
15
- # @return [Array<Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition>]
16
- required :conditions,
17
- -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] }
18
-
19
- # @!method initialize(action:, conditions:)
20
- # @param action [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action] The hold adjustment to apply if the conditions are met.
21
- #
22
- # @param conditions [Array<Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition>]
23
-
24
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters#action
25
- class Action < Lithic::Internal::Type::BaseModel
26
- # @!attribute mode
27
- # The mode of the hold adjustment, determining how the value is interpreted:
28
- #
29
- # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents.
30
- # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000
31
- # represents a 10% increase, 0 represents no change.
32
- # - `ADD_AMOUNT`: The value is added to the hold amount in cents.
33
- #
34
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode]
35
- required :mode, enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode }
36
-
37
- # @!attribute type
38
- # The type of adjustment to apply
39
- #
40
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type]
41
- required :type, enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type }
42
-
43
- # @!attribute value
44
- # The value used for the hold adjustment, interpreted based on the mode
45
- #
46
- # @return [Integer]
47
- required :value, Integer
48
-
49
- # @!method initialize(mode:, type:, value:)
50
- # Some parameter documentations has been truncated, see
51
- # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action}
52
- # for more details.
53
- #
54
- # The hold adjustment to apply if the conditions are met.
55
- #
56
- # @param mode [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode] The mode of the hold adjustment, determining how the value is interpreted:
57
- #
58
- # @param type [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type] The type of adjustment to apply
59
- #
60
- # @param value [Integer] The value used for the hold adjustment, interpreted based on the mode
61
-
62
- # The mode of the hold adjustment, determining how the value is interpreted:
63
- #
64
- # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents.
65
- # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000
66
- # represents a 10% increase, 0 represents no change.
67
- # - `ADD_AMOUNT`: The value is added to the hold amount in cents.
68
- #
69
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action#mode
70
- module Mode
71
- extend Lithic::Internal::Type::Enum
72
-
73
- REPLACE_WITH_AMOUNT = :REPLACE_WITH_AMOUNT
74
- ADD_PERCENTAGE = :ADD_PERCENTAGE
75
- ADD_AMOUNT = :ADD_AMOUNT
76
-
77
- # @!method self.values
78
- # @return [Array<Symbol>]
79
- end
80
-
81
- # The type of adjustment to apply
82
- #
83
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action#type
84
- module Type
85
- extend Lithic::Internal::Type::Enum
86
-
87
- HOLD_ADJUSTMENT = :HOLD_ADJUSTMENT
88
-
89
- # @!method self.values
90
- # @return [Array<Symbol>]
91
- end
92
- end
93
-
94
- class Condition < Lithic::Internal::Type::BaseModel
95
- # @!attribute attribute
96
- # The attribute to target.
97
- #
98
- # The following attributes may be targeted:
99
- #
100
- # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
101
- # business by the types of goods or services it provides.
102
- # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
103
- # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
104
- # Netherlands Antilles.
105
- # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
106
- # the transaction.
107
- # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
108
- # (merchant).
109
- # - `DESCRIPTOR`: Short description of card acceptor.
110
- # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
111
- # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
112
- # `TOKEN_AUTHENTICATED`.
113
- # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
114
- # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
115
- # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
116
- # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
117
- # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
118
- # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
119
- # fee field in the settlement/cardholder billing currency. This is the amount
120
- # the issuer should authorize against unless the issuer is paying the acquirer
121
- # fee on behalf of the cardholder. Use an integer value.
122
- # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
123
- # represents the amount of cash being withdrawn or advanced. Use an integer
124
- # value.
125
- # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
126
- # given authorization. Scores are on a range of 0-999, with 0 representing the
127
- # lowest risk and 999 representing the highest risk. For Visa transactions,
128
- # where the raw score has a range of 0-99, Lithic will normalize the score by
129
- # multiplying the raw score by 10x. Use an integer value.
130
- # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
131
- # trailing 15 minutes before the authorization. Use an integer value.
132
- # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
133
- # trailing hour up and until the authorization. Use an integer value.
134
- # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
135
- # trailing 24 hours up and until the authorization. Use an integer value.
136
- # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
137
- # the trailing 15 minutes before the authorization. Use an integer value.
138
- # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
139
- # the trailing hour up and until the authorization. Use an integer value.
140
- # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
141
- # the trailing 24 hours up and until the authorization. Use an integer value.
142
- # - `CARD_STATE`: The current state of the card associated with the transaction.
143
- # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
144
- # `PENDING_FULFILLMENT`.
145
- # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
146
- # Valid values are `TRUE`, `FALSE`.
147
- # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
148
- # `OK`, `BLOCKED`.
149
- # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
150
- # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
151
- # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
152
- # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
153
- # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
154
- # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
155
- # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
156
- # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
157
- # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
158
- # cardholder received the service, e.g. "NY". When a service location is present
159
- # in the network data, the service location state is used. Otherwise, falls back
160
- # to the card acceptor state.
161
- # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
162
- # the service, e.g. "10001". When a service location is present in the network
163
- # data, the service location postal code is used. Otherwise, falls back to the
164
- # card acceptor postal code.
165
- # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
166
- # Use an integer value.
167
- # - `IS_DOMESTIC`: Whether the merchant's country matches the card program's
168
- # issuing country. Valid values are `TRUE`, `FALSE`. For programs with no
169
- # issuing country configured, this attribute does not evaluate.
170
- # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
171
- # of the authorization. Use an integer value. For programs where Lithic does not
172
- # manage or retain account holder data, this attribute does not evaluate.
173
- # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
174
- # entity's transaction history. Null if fewer than 30 approved transactions in
175
- # the specified window. Requires `parameters.scope` and `parameters.interval`.
176
- # Use a decimal value.
177
- # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
178
- # entity over the specified window, in cents. Requires `parameters.scope` and
179
- # `parameters.interval`. Use a decimal value.
180
- # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
181
- # amounts for the entity over the specified window, in cents. Null if fewer than
182
- # 30 approved transactions in the specified window. Requires `parameters.scope`
183
- # and `parameters.interval`. Use a decimal value.
184
- # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
185
- # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
186
- # Requires `parameters.scope`.
187
- # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's
188
- # transaction history. Valid values are `TRUE`, `FALSE`. Requires
189
- # `parameters.scope`.
190
- # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity.
191
- # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
192
- # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
193
- # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
194
- # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
195
- # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
196
- # transaction for the entity, rounded to the nearest whole day. Requires
197
- # `parameters.scope`. Use an integer value.
198
- # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
199
- # the entity's transaction history. Requires `parameters.scope`. Use an integer
200
- # value.
201
- # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
202
- # card's approved transaction history (capped at the 1000 most recently seen
203
- # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
204
- # `parameters` required.
205
- # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
206
- # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
207
- # Use a decimal value.
208
- # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
209
- # between the postal code centers of the last card-present transaction and the
210
- # current transaction, divided by the elapsed time. Null if there is no prior
211
- # card-present transaction, if either postal code cannot be geocoded, or if
212
- # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
213
- # decimal value.
214
- # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
215
- # code centers of the last card-present transaction and the current transaction.
216
- # Null if there is no prior card-present transaction or if either postal code
217
- # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
218
- # Use a decimal value.
219
- #
220
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute]
221
- required :attribute,
222
- enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute }
223
-
224
- # @!attribute operation
225
- # The operation to apply to the attribute
226
- #
227
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalOperation]
228
- required :operation, enum: -> { Lithic::AuthRules::ConditionalOperation }
229
-
230
- # @!attribute value
231
- # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
232
- #
233
- # @return [String, Integer, Float, Array<String>, Time]
234
- required :value, union: -> { Lithic::AuthRules::ConditionalValue }
235
-
236
- # @!attribute parameters
237
- # Additional parameters for certain attributes. Required when `attribute` is one
238
- # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
239
- # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
240
- # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
241
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
242
- # for other attributes.
243
- #
244
- # @return [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters, nil]
245
- optional :parameters,
246
- -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters }
247
-
248
- # @!method initialize(attribute:, operation:, value:, parameters: nil)
249
- # Some parameter documentations has been truncated, see
250
- # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition}
251
- # for more details.
252
- #
253
- # @param attribute [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute] The attribute to target.
254
- #
255
- # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
256
- #
257
- # @param value [String, Integer, Float, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
258
- #
259
- # @param parameters [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters] Additional parameters for certain attributes. Required when `attribute` is one o
260
-
261
- # The attribute to target.
262
- #
263
- # The following attributes may be targeted:
264
- #
265
- # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
266
- # business by the types of goods or services it provides.
267
- # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
268
- # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
269
- # Netherlands Antilles.
270
- # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
271
- # the transaction.
272
- # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
273
- # (merchant).
274
- # - `DESCRIPTOR`: Short description of card acceptor.
275
- # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
276
- # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
277
- # `TOKEN_AUTHENTICATED`.
278
- # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
279
- # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
280
- # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
281
- # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
282
- # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
283
- # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
284
- # fee field in the settlement/cardholder billing currency. This is the amount
285
- # the issuer should authorize against unless the issuer is paying the acquirer
286
- # fee on behalf of the cardholder. Use an integer value.
287
- # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
288
- # represents the amount of cash being withdrawn or advanced. Use an integer
289
- # value.
290
- # - `RISK_SCORE`: Network-provided score assessing risk level associated with a
291
- # given authorization. Scores are on a range of 0-999, with 0 representing the
292
- # lowest risk and 999 representing the highest risk. For Visa transactions,
293
- # where the raw score has a range of 0-99, Lithic will normalize the score by
294
- # multiplying the raw score by 10x. Use an integer value.
295
- # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
296
- # trailing 15 minutes before the authorization. Use an integer value.
297
- # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
298
- # trailing hour up and until the authorization. Use an integer value.
299
- # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
300
- # trailing 24 hours up and until the authorization. Use an integer value.
301
- # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
302
- # the trailing 15 minutes before the authorization. Use an integer value.
303
- # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
304
- # the trailing hour up and until the authorization. Use an integer value.
305
- # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
306
- # the trailing 24 hours up and until the authorization. Use an integer value.
307
- # - `CARD_STATE`: The current state of the card associated with the transaction.
308
- # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
309
- # `PENDING_FULFILLMENT`.
310
- # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
311
- # Valid values are `TRUE`, `FALSE`.
312
- # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
313
- # `OK`, `BLOCKED`.
314
- # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
315
- # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
316
- # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
317
- # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
318
- # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
319
- # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
320
- # data with the cardholder KYC data if it exists. Valid values are `MATCH`,
321
- # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
322
- # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
323
- # cardholder received the service, e.g. "NY". When a service location is present
324
- # in the network data, the service location state is used. Otherwise, falls back
325
- # to the card acceptor state.
326
- # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
327
- # the service, e.g. "10001". When a service location is present in the network
328
- # data, the service location postal code is used. Otherwise, falls back to the
329
- # card acceptor postal code.
330
- # - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
331
- # Use an integer value.
332
- # - `IS_DOMESTIC`: Whether the merchant's country matches the card program's
333
- # issuing country. Valid values are `TRUE`, `FALSE`. For programs with no
334
- # issuing country configured, this attribute does not evaluate.
335
- # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
336
- # of the authorization. Use an integer value. For programs where Lithic does not
337
- # manage or retain account holder data, this attribute does not evaluate.
338
- # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
339
- # entity's transaction history. Null if fewer than 30 approved transactions in
340
- # the specified window. Requires `parameters.scope` and `parameters.interval`.
341
- # Use a decimal value.
342
- # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
343
- # entity over the specified window, in cents. Requires `parameters.scope` and
344
- # `parameters.interval`. Use a decimal value.
345
- # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
346
- # amounts for the entity over the specified window, in cents. Null if fewer than
347
- # 30 approved transactions in the specified window. Requires `parameters.scope`
348
- # and `parameters.interval`. Use a decimal value.
349
- # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
350
- # in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
351
- # Requires `parameters.scope`.
352
- # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's
353
- # transaction history. Valid values are `TRUE`, `FALSE`. Requires
354
- # `parameters.scope`.
355
- # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity.
356
- # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
357
- # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
358
- # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
359
- # supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
360
- # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
361
- # transaction for the entity, rounded to the nearest whole day. Requires
362
- # `parameters.scope`. Use an integer value.
363
- # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
364
- # the entity's transaction history. Requires `parameters.scope`. Use an integer
365
- # value.
366
- # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
367
- # card's approved transaction history (capped at the 1000 most recently seen
368
- # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
369
- # `parameters` required.
370
- # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
371
- # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
372
- # Use a decimal value.
373
- # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
374
- # between the postal code centers of the last card-present transaction and the
375
- # current transaction, divided by the elapsed time. Null if there is no prior
376
- # card-present transaction, if either postal code cannot be geocoded, or if
377
- # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
378
- # decimal value.
379
- # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
380
- # code centers of the last card-present transaction and the current transaction.
381
- # Null if there is no prior card-present transaction or if either postal code
382
- # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
383
- # Use a decimal value.
384
- #
385
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition#attribute
386
- module Attribute
387
- extend Lithic::Internal::Type::Enum
388
-
389
- MCC = :MCC
390
- COUNTRY = :COUNTRY
391
- CURRENCY = :CURRENCY
392
- MERCHANT_ID = :MERCHANT_ID
393
- DESCRIPTOR = :DESCRIPTOR
394
- LIABILITY_SHIFT = :LIABILITY_SHIFT
395
- PAN_ENTRY_MODE = :PAN_ENTRY_MODE
396
- TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
397
- CASH_AMOUNT = :CASH_AMOUNT
398
- RISK_SCORE = :RISK_SCORE
399
- CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
400
- CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H
401
- CARD_TRANSACTION_COUNT_24_H = :CARD_TRANSACTION_COUNT_24H
402
- CARD_DECLINE_COUNT_15_M = :CARD_DECLINE_COUNT_15M
403
- CARD_DECLINE_COUNT_1_H = :CARD_DECLINE_COUNT_1H
404
- CARD_DECLINE_COUNT_24_H = :CARD_DECLINE_COUNT_24H
405
- CARD_STATE = :CARD_STATE
406
- PIN_ENTERED = :PIN_ENTERED
407
- PIN_STATUS = :PIN_STATUS
408
- WALLET_TYPE = :WALLET_TYPE
409
- TRANSACTION_INITIATOR = :TRANSACTION_INITIATOR
410
- ADDRESS_MATCH = :ADDRESS_MATCH
411
- SERVICE_LOCATION_STATE = :SERVICE_LOCATION_STATE
412
- SERVICE_LOCATION_POSTAL_CODE = :SERVICE_LOCATION_POSTAL_CODE
413
- CARD_AGE = :CARD_AGE
414
- IS_DOMESTIC = :IS_DOMESTIC
415
- ACCOUNT_AGE = :ACCOUNT_AGE
416
- AMOUNT_Z_SCORE = :AMOUNT_Z_SCORE
417
- AVG_TRANSACTION_AMOUNT = :AVG_TRANSACTION_AMOUNT
418
- STDEV_TRANSACTION_AMOUNT = :STDEV_TRANSACTION_AMOUNT
419
- IS_NEW_COUNTRY = :IS_NEW_COUNTRY
420
- IS_NEW_MCC = :IS_NEW_MCC
421
- IS_FIRST_TRANSACTION = :IS_FIRST_TRANSACTION
422
- CONSECUTIVE_DECLINES = :CONSECUTIVE_DECLINES
423
- TIME_SINCE_LAST_TRANSACTION = :TIME_SINCE_LAST_TRANSACTION
424
- DISTINCT_COUNTRY_COUNT = :DISTINCT_COUNTRY_COUNT
425
- IS_NEW_MERCHANT = :IS_NEW_MERCHANT
426
- THREE_DS_SUCCESS_RATE = :THREE_DS_SUCCESS_RATE
427
- TRAVEL_SPEED = :TRAVEL_SPEED
428
- DISTANCE_FROM_LAST_TRANSACTION = :DISTANCE_FROM_LAST_TRANSACTION
429
-
430
- # @!method self.values
431
- # @return [Array<Symbol>]
432
- end
433
-
434
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition#parameters
435
- class Parameters < Lithic::Internal::Type::BaseModel
436
- # @!attribute interval
437
- # The time window for statistical attributes (`AMOUNT_Z_SCORE`,
438
- # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
439
- # all-time history or a specific window (`7D`, `30D`, `90D`).
440
- #
441
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval, nil]
442
- optional :interval,
443
- enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval }
444
-
445
- # @!attribute scope
446
- # The entity scope to evaluate the attribute against.
447
- #
448
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope, nil]
449
- optional :scope,
450
- enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope }
451
-
452
- # @!attribute unit
453
- # The unit for impossible travel attributes. Required when `attribute` is
454
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
455
- #
456
- # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
457
- #
458
- # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
459
- #
460
- # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit, nil]
461
- optional :unit,
462
- enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit }
463
-
464
- # @!method initialize(interval: nil, scope: nil, unit: nil)
465
- # Some parameter documentations has been truncated, see
466
- # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters}
467
- # for more details.
468
- #
469
- # Additional parameters for certain attributes. Required when `attribute` is one
470
- # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
471
- # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
472
- # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
473
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
474
- # for other attributes.
475
- #
476
- # @param interval [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval] The time window for statistical attributes (`AMOUNT_Z_SCORE`, `AVG_TRANSACTION_A
477
- #
478
- # @param scope [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope] The entity scope to evaluate the attribute against.
479
- #
480
- # @param unit [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit] The unit for impossible travel attributes. Required when `attribute` is
481
- # `TRAVEL\_
482
-
483
- # The time window for statistical attributes (`AMOUNT_Z_SCORE`,
484
- # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
485
- # all-time history or a specific window (`7D`, `30D`, `90D`).
486
- #
487
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters#interval
488
- module Interval
489
- extend Lithic::Internal::Type::Enum
490
-
491
- LIFETIME = :LIFETIME
492
- INTERVAL_7_D = :"7D"
493
- INTERVAL_30_D = :"30D"
494
- INTERVAL_90_D = :"90D"
495
-
496
- # @!method self.values
497
- # @return [Array<Symbol>]
498
- end
499
-
500
- # The entity scope to evaluate the attribute against.
501
- #
502
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters#scope
503
- module Scope
504
- extend Lithic::Internal::Type::Enum
505
-
506
- CARD = :CARD
507
- ACCOUNT = :ACCOUNT
508
- BUSINESS_ACCOUNT = :BUSINESS_ACCOUNT
509
-
510
- # @!method self.values
511
- # @return [Array<Symbol>]
512
- end
513
-
514
- # The unit for impossible travel attributes. Required when `attribute` is
515
- # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
516
- #
517
- # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
518
- #
519
- # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
520
- #
521
- # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters#unit
522
- module Unit
523
- extend Lithic::Internal::Type::Enum
524
-
525
- MPH = :MPH
526
- KPH = :KPH
527
- MILES = :MILES
528
- KILOMETERS = :KILOMETERS
529
-
530
- # @!method self.values
531
- # @return [Array<Symbol>]
532
- end
533
- end
534
- end
535
- end
536
- end
537
- end
538
- end