lithic 0.21.0 → 0.22.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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -10
  4. data/lib/lithic/internal/type/union.rb +21 -7
  5. data/lib/lithic/models/account_holder_create_params.rb +4 -2
  6. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +120 -66
  7. data/lib/lithic/models/account_holder_update_params.rb +6 -3
  8. data/lib/lithic/models/account_holder_update_response.rb +156 -86
  9. data/lib/lithic/models/account_holder_updated_webhook_event.rb +120 -66
  10. data/lib/lithic/models/account_holders/account_holder_entity.rb +35 -19
  11. data/lib/lithic/models/account_holders/entity_create_params.rb +39 -21
  12. data/lib/lithic/models/address.rb +33 -19
  13. data/lib/lithic/models/address_update.rb +27 -11
  14. data/lib/lithic/models/auth_rules/auth_rule.rb +55 -27
  15. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +189 -6
  16. data/lib/lithic/models/auth_rules/auth_rule_entities.rb +47 -0
  17. data/lib/lithic/models/auth_rules/auth_rule_entities_response.rb +31 -0
  18. data/lib/lithic/models/auth_rules/auth_rule_entity.rb +150 -0
  19. data/lib/lithic/models/auth_rules/auth_rule_version.rb +3 -6
  20. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +33 -6
  21. data/lib/lithic/models/auth_rules/conditional_attribute.rb +101 -5
  22. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +3 -439
  23. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +7 -0
  24. data/lib/lithic/models/auth_rules/merchant_lock_parameters.rb +11 -1
  25. data/lib/lithic/models/auth_rules/v2_create_params.rb +203 -45
  26. data/lib/lithic/models/auth_rules/v2_draft_params.rb +3 -6
  27. data/lib/lithic/models/auth_rules/v2_list_params.rb +5 -3
  28. data/lib/lithic/models/auth_rules/v2_update_entities_params.rb +39 -0
  29. data/lib/lithic/models/auth_rules/v2_update_params.rb +133 -12
  30. data/lib/lithic/models/card_authorization.rb +11 -1
  31. data/lib/lithic/models/card_create_params.rb +11 -1
  32. data/lib/lithic/models/card_update_params.rb +12 -1
  33. data/lib/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rb +279 -0
  34. data/lib/lithic/models/financial_accounts/installment_plans/statement_list_params.rb +106 -0
  35. data/lib/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rb +42 -0
  36. data/lib/lithic/models/financial_accounts/loan_tape.rb +62 -1
  37. data/lib/lithic/models/kyb.rb +4 -2
  38. data/lib/lithic/models/kyb_business_entity.rb +35 -19
  39. data/lib/lithic/models/kyc.rb +2 -1
  40. data/lib/lithic/models/non_pci_card.rb +11 -1
  41. data/lib/lithic/models/parsed_webhook_event.rb +120 -66
  42. data/lib/lithic/models/payment.rb +2 -1
  43. data/lib/lithic/models/transaction.rb +2 -1
  44. data/lib/lithic/models/transaction_simulate_authorization_params.rb +28 -4
  45. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +11 -1
  46. data/lib/lithic/models/transaction_simulate_return_params.rb +24 -1
  47. data/lib/lithic/resources/auth_rules/v2/backtests.rb +8 -8
  48. data/lib/lithic/resources/auth_rules/v2.rb +44 -8
  49. data/lib/lithic/resources/cards.rb +6 -2
  50. data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +107 -0
  51. data/lib/lithic/resources/financial_accounts/installment_plans.rb +4 -0
  52. data/lib/lithic/resources/transactions.rb +17 -4
  53. data/lib/lithic/resources/webhooks.rb +18 -0
  54. data/lib/lithic/version.rb +1 -1
  55. data/lib/lithic.rb +8 -1
  56. data/rbi/lithic/models/account_holder_create_params.rbi +8 -4
  57. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +195 -90
  58. data/rbi/lithic/models/account_holder_update_params.rbi +12 -6
  59. data/rbi/lithic/models/account_holder_update_response.rbi +254 -117
  60. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +195 -90
  61. data/rbi/lithic/models/account_holders/account_holder_entity.rbi +59 -27
  62. data/rbi/lithic/models/account_holders/entity_create_params.rbi +65 -30
  63. data/rbi/lithic/models/address.rbi +57 -29
  64. data/rbi/lithic/models/address_update.rbi +50 -24
  65. data/rbi/lithic/models/auth_rules/auth_rule.rbi +53 -19
  66. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +442 -13
  67. data/rbi/lithic/models/auth_rules/auth_rule_entities.rbi +163 -0
  68. data/rbi/lithic/models/auth_rules/auth_rule_entities_response.rbi +72 -0
  69. data/rbi/lithic/models/auth_rules/auth_rule_entity.rbi +199 -0
  70. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +0 -2
  71. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +67 -9
  72. data/rbi/lithic/models/auth_rules/conditional_attribute.rbi +193 -5
  73. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +3 -939
  74. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +14 -0
  75. data/rbi/lithic/models/auth_rules/merchant_lock_parameters.rbi +14 -3
  76. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +325 -50
  77. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +0 -4
  78. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +6 -3
  79. data/rbi/lithic/models/auth_rules/v2_update_entities_params.rbi +68 -0
  80. data/rbi/lithic/models/auth_rules/v2_update_params.rbi +198 -5
  81. data/rbi/lithic/models/card_authorization.rbi +12 -0
  82. data/rbi/lithic/models/card_create_params.rbi +15 -0
  83. data/rbi/lithic/models/card_update_params.rbi +17 -0
  84. data/rbi/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbi +452 -0
  85. data/rbi/lithic/models/financial_accounts/installment_plans/statement_list_params.rbi +191 -0
  86. data/rbi/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbi +66 -0
  87. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +119 -0
  88. data/rbi/lithic/models/kyb.rbi +8 -4
  89. data/rbi/lithic/models/kyb_business_entity.rbi +59 -27
  90. data/rbi/lithic/models/kyc.rbi +4 -2
  91. data/rbi/lithic/models/non_pci_card.rbi +12 -0
  92. data/rbi/lithic/models/parsed_webhook_event.rbi +195 -90
  93. data/rbi/lithic/models/payment.rbi +4 -2
  94. data/rbi/lithic/models/transaction.rbi +4 -2
  95. data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +42 -4
  96. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +15 -0
  97. data/rbi/lithic/models/transaction_simulate_return_params.rbi +30 -0
  98. data/rbi/lithic/resources/account_holders/entities.rbi +2 -1
  99. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +8 -8
  100. data/rbi/lithic/resources/auth_rules/v2.rbi +43 -8
  101. data/rbi/lithic/resources/cards.rbi +11 -0
  102. data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +86 -0
  103. data/rbi/lithic/resources/financial_accounts/installment_plans.rbi +7 -0
  104. data/rbi/lithic/resources/transactions.rbi +31 -2
  105. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +39 -39
  106. data/sig/lithic/models/account_holder_update_response.rbs +52 -52
  107. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +39 -39
  108. data/sig/lithic/models/account_holders/account_holder_entity.rbs +13 -13
  109. data/sig/lithic/models/account_holders/entity_create_params.rbs +13 -13
  110. data/sig/lithic/models/address.rbs +13 -13
  111. data/sig/lithic/models/address_update.rbs +8 -12
  112. data/sig/lithic/models/auth_rules/auth_rule.rbs +8 -7
  113. data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +89 -3
  114. data/sig/lithic/models/auth_rules/auth_rule_entities.rbs +37 -0
  115. data/sig/lithic/models/auth_rules/auth_rule_entities_response.rbs +29 -0
  116. data/sig/lithic/models/auth_rules/auth_rule_entity.rbs +80 -0
  117. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -2
  118. data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +10 -0
  119. data/sig/lithic/models/auth_rules/conditional_attribute.rbs +46 -0
  120. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +4 -204
  121. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +2 -0
  122. data/sig/lithic/models/auth_rules/merchant_lock_parameters.rbs +10 -3
  123. data/sig/lithic/models/auth_rules/v2_create_params.rbs +86 -16
  124. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -2
  125. data/sig/lithic/models/auth_rules/v2_update_entities_params.rbs +46 -0
  126. data/sig/lithic/models/auth_rules/v2_update_params.rbs +47 -1
  127. data/sig/lithic/models/card_authorization.rbs +5 -0
  128. data/sig/lithic/models/card_create_params.rbs +7 -0
  129. data/sig/lithic/models/card_update_params.rbs +8 -1
  130. data/sig/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbs +191 -0
  131. data/sig/lithic/models/financial_accounts/installment_plans/statement_list_params.rbs +90 -0
  132. data/sig/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbs +40 -0
  133. data/sig/lithic/models/financial_accounts/loan_tape.rbs +47 -0
  134. data/sig/lithic/models/kyb_business_entity.rbs +13 -13
  135. data/sig/lithic/models/non_pci_card.rbs +5 -0
  136. data/sig/lithic/models/parsed_webhook_event.rbs +39 -39
  137. data/sig/lithic/models/transaction_simulate_authorization_params.rbs +14 -0
  138. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +7 -0
  139. data/sig/lithic/models/transaction_simulate_return_params.rbs +19 -1
  140. data/sig/lithic/resources/auth_rules/v2.rbs +7 -0
  141. data/sig/lithic/resources/cards.rbs +2 -0
  142. data/sig/lithic/resources/financial_accounts/installment_plans/statements.rbs +30 -0
  143. data/sig/lithic/resources/financial_accounts/installment_plans.rbs +2 -0
  144. data/sig/lithic/resources/transactions.rbs +5 -0
  145. metadata +26 -5
  146. data/lib/lithic/models/auth_rules/conditional_block_parameters.rb +0 -20
  147. data/rbi/lithic/models/auth_rules/conditional_block_parameters.rbi +0 -37
  148. data/sig/lithic/models/auth_rules/conditional_block_parameters.rbs +0 -20
@@ -14,32 +14,123 @@ module Lithic
14
14
  required :auth_rule_token, String
15
15
 
16
16
  # @!attribute body
17
+ # Replaces the rule's existing entities with the provided `include` and `exclude`
18
+ # lists. A missing list is treated as empty, so `include` must always be provided.
17
19
  #
18
- # @return [Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule]
20
+ # @return [Lithic::Models::AuthRules::V2UpdateParams::Body::Rule, Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule]
19
21
  required :body, union: -> { Lithic::AuthRules::V2UpdateParams::Body }
20
22
 
21
23
  # @!method initialize(auth_rule_token:, body:, request_options: {})
24
+ # Some parameter documentations has been truncated, see
25
+ # {Lithic::Models::AuthRules::V2UpdateParams} for more details.
26
+ #
22
27
  # @param auth_rule_token [String]
23
- # @param body [Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule]
28
+ #
29
+ # @param body [Lithic::Models::AuthRules::V2UpdateParams::Body::Rule, Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule] Replaces the rule's existing entities with the provided `include` and `exclude`
30
+ #
24
31
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
25
32
 
33
+ # Replaces the rule's existing entities with the provided `include` and `exclude`
34
+ # lists. A missing list is treated as empty, so `include` must always be provided.
26
35
  module Body
27
36
  extend Lithic::Internal::Type::Union
28
37
 
38
+ # Replaces the rule's existing entities with the provided `include` and `exclude` lists. A missing list is treated as empty, so `include` must always be provided.
39
+ variant -> { Lithic::AuthRules::V2UpdateParams::Body::Rule }
40
+
41
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
29
42
  variant -> { Lithic::AuthRules::V2UpdateParams::Body::AccountLevelRule }
30
43
 
44
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
31
45
  variant -> { Lithic::AuthRules::V2UpdateParams::Body::CardLevelRule }
32
46
 
47
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
33
48
  variant -> { Lithic::AuthRules::V2UpdateParams::Body::ProgramLevelRule }
34
49
 
50
+ class Rule < Lithic::Internal::Type::BaseModel
51
+ # @!attribute entities
52
+ # The entities an Auth Rule applies to (`include`) and does not apply to
53
+ # (`exclude`). An exclusion overrides an inclusion, so a card excluded here is
54
+ # skipped even when the program, its account or one of its tags is included.
55
+ #
56
+ # The rule's resulting entities must satisfy these constraints after any write:
57
+ #
58
+ # - `include` must contain at least one entity.
59
+ # - If `PROGRAM` is included, it must be the only included entity.
60
+ # - `PROGRAM` cannot be excluded.
61
+ # - An entity cannot appear in both `include` and `exclude`, or twice in the same
62
+ # list.
63
+ # - A rule can have at most 1,000 entities across `include` and `exclude`, not
64
+ # counting `PROGRAM`.
65
+ # - Entity types must be valid for the rule's event stream.
66
+ # - `CARD`, `ACCOUNT` and `BUSINESS_ACCOUNT` tokens must belong to your program.
67
+ #
68
+ # @return [Lithic::Models::AuthRules::AuthRuleEntities, nil]
69
+ optional :entities, -> { Lithic::AuthRules::AuthRuleEntities }
70
+
71
+ # @!attribute name
72
+ # Auth Rule Name
73
+ #
74
+ # @return [String, nil]
75
+ optional :name, String, nil?: true
76
+
77
+ # @!attribute state
78
+ # The desired state of the Auth Rule.
79
+ #
80
+ # Note that only deactivating an Auth Rule through this endpoint is supported at
81
+ # this time. If you need to (re-)activate an Auth Rule the /promote endpoint
82
+ # should be used to promote a draft to the currently active version.
83
+ #
84
+ # @return [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::Rule::State, nil]
85
+ optional :state, enum: -> { Lithic::AuthRules::V2UpdateParams::Body::Rule::State }
86
+
87
+ # @!method initialize(entities: nil, name: nil, state: nil)
88
+ # Some parameter documentations has been truncated, see
89
+ # {Lithic::Models::AuthRules::V2UpdateParams::Body::Rule} for more details.
90
+ #
91
+ # Replaces the rule's existing entities with the provided `include` and `exclude`
92
+ # lists. A missing list is treated as empty, so `include` must always be provided.
93
+ #
94
+ # @param entities [Lithic::Models::AuthRules::AuthRuleEntities] The entities an Auth Rule applies to (`include`) and does not apply to (`exclude
95
+ #
96
+ # @param name [String, nil] Auth Rule Name
97
+ #
98
+ # @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::Rule::State] The desired state of the Auth Rule.
99
+
100
+ # The desired state of the Auth Rule.
101
+ #
102
+ # Note that only deactivating an Auth Rule through this endpoint is supported at
103
+ # this time. If you need to (re-)activate an Auth Rule the /promote endpoint
104
+ # should be used to promote a draft to the currently active version.
105
+ #
106
+ # @see Lithic::Models::AuthRules::V2UpdateParams::Body::Rule#state
107
+ module State
108
+ extend Lithic::Internal::Type::Enum
109
+
110
+ INACTIVE = :INACTIVE
111
+
112
+ # @!method self.values
113
+ # @return [Array<Symbol>]
114
+ end
115
+ end
116
+
117
+ # @deprecated
35
118
  class AccountLevelRule < Lithic::Internal::Type::BaseModel
36
119
  # @!attribute account_tokens
120
+ # @deprecated
121
+ #
122
+ # Deprecated: Use `entities.include` with `ACCOUNT` entities instead.
123
+ #
37
124
  # Account tokens to which the Auth Rule applies.
38
125
  #
39
126
  # @return [Array<String>, nil]
40
127
  optional :account_tokens, Lithic::Internal::Type::ArrayOf[String]
41
128
 
42
129
  # @!attribute business_account_tokens
130
+ # @deprecated
131
+ #
132
+ # Deprecated: Use `entities.include` with `BUSINESS_ACCOUNT` entities instead.
133
+ #
43
134
  # Business Account tokens to which the Auth Rule applies.
44
135
  #
45
136
  # @return [Array<String>, nil]
@@ -66,9 +157,11 @@ module Lithic
66
157
  # {Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule} for more
67
158
  # details.
68
159
  #
69
- # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
160
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
70
161
  #
71
- # @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
162
+ # @param account_tokens [Array<String>] Deprecated: Use `entities.include` with `ACCOUNT` entities instead.
163
+ #
164
+ # @param business_account_tokens [Array<String>] Deprecated: Use `entities.include` with `BUSINESS_ACCOUNT` entities instead.
72
165
  #
73
166
  # @param name [String, nil] Auth Rule Name
74
167
  #
@@ -91,9 +184,15 @@ module Lithic
91
184
  end
92
185
  end
93
186
 
187
+ # @deprecated
94
188
  class CardLevelRule < Lithic::Internal::Type::BaseModel
95
189
  # @!attribute card_tokens
96
- # Card tokens to which the Auth Rule applies.
190
+ # @deprecated
191
+ #
192
+ # Deprecated: Use `entities.include` with `CARD` entities instead.
193
+ #
194
+ # Card tokens to which the Auth Rule applies. Cards the rule applies to through a
195
+ # `CARD_TAG` entity are not listed.
97
196
  #
98
197
  # @return [Array<String>, nil]
99
198
  optional :card_tokens, Lithic::Internal::Type::ArrayOf[String]
@@ -119,7 +218,9 @@ module Lithic
119
218
  # {Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule} for more
120
219
  # details.
121
220
  #
122
- # @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
221
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
222
+ #
223
+ # @param card_tokens [Array<String>] Deprecated: Use `entities.include` with `CARD` entities instead.
123
224
  #
124
225
  # @param name [String, nil] Auth Rule Name
125
226
  #
@@ -142,21 +243,35 @@ module Lithic
142
243
  end
143
244
  end
144
245
 
246
+ # @deprecated
145
247
  class ProgramLevelRule < Lithic::Internal::Type::BaseModel
146
248
  # @!attribute excluded_account_tokens
249
+ # @deprecated
250
+ #
251
+ # Deprecated: Use `entities.exclude` with `ACCOUNT` entities instead.
252
+ #
147
253
  # Account tokens to which the Auth Rule does not apply.
148
254
  #
149
255
  # @return [Array<String>, nil]
150
256
  optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String]
151
257
 
152
258
  # @!attribute excluded_business_account_tokens
259
+ # @deprecated
260
+ #
261
+ # Deprecated: Use `entities.exclude` with `BUSINESS_ACCOUNT` entities instead.
262
+ #
153
263
  # Business account tokens to which the Auth Rule does not apply.
154
264
  #
155
265
  # @return [Array<String>, nil]
156
266
  optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String]
157
267
 
158
268
  # @!attribute excluded_card_tokens
159
- # Card tokens to which the Auth Rule does not apply.
269
+ # @deprecated
270
+ #
271
+ # Deprecated: Use `entities.exclude` with `CARD` entities instead.
272
+ #
273
+ # Card tokens to which the Auth Rule does not apply. Cards excluded through a
274
+ # `CARD_TAG` entity are not listed.
160
275
  #
161
276
  # @return [Array<String>, nil]
162
277
  optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]
@@ -168,6 +283,10 @@ module Lithic
168
283
  optional :name, String, nil?: true
169
284
 
170
285
  # @!attribute program_level
286
+ # @deprecated
287
+ #
288
+ # Deprecated: Use `entities.include` with a `PROGRAM` entity instead.
289
+ #
171
290
  # Whether the Auth Rule applies to all authorizations on the card program.
172
291
  #
173
292
  # @return [Boolean, nil]
@@ -188,15 +307,17 @@ module Lithic
188
307
  # {Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule} for more
189
308
  # details.
190
309
  #
191
- # @param excluded_account_tokens [Array<String>] Account tokens to which the Auth Rule does not apply.
310
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
311
+ #
312
+ # @param excluded_account_tokens [Array<String>] Deprecated: Use `entities.exclude` with `ACCOUNT` entities instead.
192
313
  #
193
- # @param excluded_business_account_tokens [Array<String>] Business account tokens to which the Auth Rule does not apply.
314
+ # @param excluded_business_account_tokens [Array<String>] Deprecated: Use `entities.exclude` with `BUSINESS_ACCOUNT` entities instead.
194
315
  #
195
- # @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
316
+ # @param excluded_card_tokens [Array<String>] Deprecated: Use `entities.exclude` with `CARD` entities instead.
196
317
  #
197
318
  # @param name [String, nil] Auth Rule Name
198
319
  #
199
- # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
320
+ # @param program_level [Boolean] Deprecated: Use `entities.include` with a `PROGRAM` entity instead.
200
321
  #
201
322
  # @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State] The desired state of the Auth Rule.
202
323
 
@@ -218,7 +339,7 @@ module Lithic
218
339
  end
219
340
 
220
341
  # @!method self.variants
221
- # @return [Array(Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule)]
342
+ # @return [Array(Lithic::Models::AuthRules::V2UpdateParams::Body::Rule, Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule)]
222
343
  end
223
344
  end
224
345
  end
@@ -532,12 +532,20 @@ module Lithic
532
532
  # @return [Symbol, Lithic::Models::CardAuthorization::Card::State]
533
533
  required :state, enum: -> { Lithic::CardAuthorization::Card::State }
534
534
 
535
+ # @!attribute tags
536
+ # Key-value pairs for tagging resources. Tags allow you to associate arbitrary
537
+ # metadata with a resource for your own purposes. A resource can have at most 50
538
+ # tags, with keys up to 40 characters and values up to 500 characters
539
+ #
540
+ # @return [Hash{Symbol=>String}]
541
+ required :tags, Lithic::Internal::Type::HashOf[String]
542
+
535
543
  # @!attribute type
536
544
  #
537
545
  # @return [Symbol, Lithic::Models::CardAuthorization::Card::Type]
538
546
  required :type, enum: -> { Lithic::CardAuthorization::Card::Type }
539
547
 
540
- # @!method initialize(token:, last_four:, memo:, spend_limit:, spend_limit_duration:, state:, type:)
548
+ # @!method initialize(token:, last_four:, memo:, spend_limit:, spend_limit_duration:, state:, tags:, type:)
541
549
  # Some parameter documentations has been truncated, see
542
550
  # {Lithic::Models::CardAuthorization::Card} for more details.
543
551
  #
@@ -555,6 +563,8 @@ module Lithic
555
563
  #
556
564
  # @param state [Symbol, Lithic::Models::CardAuthorization::Card::State]
557
565
  #
566
+ # @param tags [Hash{Symbol=>String}] Key-value pairs for tagging resources. Tags allow you to associate arbitrary met
567
+ #
558
568
  # @param type [Symbol, Lithic::Models::CardAuthorization::Card::Type]
559
569
 
560
570
  # Note that to support recurring monthly payments, which can occur on different
@@ -229,12 +229,20 @@ module Lithic
229
229
  # @return [Symbol, Lithic::Models::CardCreateParams::State, nil]
230
230
  optional :state, enum: -> { Lithic::CardCreateParams::State }
231
231
 
232
+ # @!attribute tags
233
+ # Key-value pairs to tag the card with. A replacement card does not inherit tags
234
+ # from the card it replaces. A card can have at most 50 tags, with keys up to 40
235
+ # characters and values up to 500 characters
236
+ #
237
+ # @return [Hash{Symbol=>String}, nil]
238
+ optional :tags, Lithic::Internal::Type::HashOf[String]
239
+
232
240
  # @!attribute idempotency_key
233
241
  #
234
242
  # @return [String, nil]
235
243
  optional :idempotency_key, String
236
244
 
237
- # @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {})
245
+ # @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, tags: nil, idempotency_key: nil, request_options: {})
238
246
  # Some parameter documentations has been truncated, see
239
247
  # {Lithic::Models::CardCreateParams} for more details.
240
248
  #
@@ -278,6 +286,8 @@ module Lithic
278
286
  #
279
287
  # @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values:
280
288
  #
289
+ # @param tags [Hash{Symbol=>String}] Key-value pairs to tag the card with. A replacement card does not inherit tags f
290
+ #
281
291
  # @param idempotency_key [String]
282
292
  #
283
293
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
@@ -127,7 +127,16 @@ module Lithic
127
127
  # @return [Symbol, Lithic::Models::CardUpdateParams::Substatus, nil]
128
128
  optional :substatus, enum: -> { Lithic::CardUpdateParams::Substatus }
129
129
 
130
- # @!method initialize(card_token:, comment: nil, digital_card_art_token: nil, memo: nil, network_program_token: nil, pin: nil, pin_status: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, substatus: nil, request_options: {})
130
+ # @!attribute tags
131
+ # Key-value pairs to merge into the card's tags. Supplied keys are added or
132
+ # overwritten, a key with a `null` value is removed, and omitted keys remain
133
+ # unchanged. A card can have at most 50 tags, with keys up to 40 characters and
134
+ # values up to 500 characters
135
+ #
136
+ # @return [Hash{Symbol=>String, nil}, nil]
137
+ optional :tags, Lithic::Internal::Type::HashOf[String, nil?: true]
138
+
139
+ # @!method initialize(card_token:, comment: nil, digital_card_art_token: nil, memo: nil, network_program_token: nil, pin: nil, pin_status: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, substatus: nil, tags: nil, request_options: {})
131
140
  # Some parameter documentations has been truncated, see
132
141
  # {Lithic::Models::CardUpdateParams} for more details.
133
142
  #
@@ -153,6 +162,8 @@ module Lithic
153
162
  #
154
163
  # @param substatus [Symbol, Lithic::Models::CardUpdateParams::Substatus] Card state substatus values:
155
164
  #
165
+ # @param tags [Hash{Symbol=>String, nil}] Key-value pairs to merge into the card's tags. Supplied keys are added or overwr
166
+ #
156
167
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
157
168
 
158
169
  # Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
@@ -0,0 +1,279 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ module FinancialAccounts
6
+ module InstallmentPlans
7
+ # @see Lithic::Resources::FinancialAccounts::InstallmentPlans::Statements#retrieve
8
+ class InstallmentPlanStatement < Lithic::Internal::Type::BaseModel
9
+ # @!attribute token
10
+ # Globally unique identifier for this snapshot, which is the token of the
11
+ # statement it is attached to. A plan is snapshotted at most once per statement,
12
+ # so the statement identifies the snapshot within the plan. Pass it as a
13
+ # pagination cursor
14
+ #
15
+ # @return [String]
16
+ required :token, String
17
+
18
+ # @!attribute fee_amount
19
+ # Enrollment fee charged when the plan was created in cents
20
+ #
21
+ # @return [Integer]
22
+ required :fee_amount, Integer
23
+
24
+ # @!attribute installment_plan_token
25
+ # Globally unique identifier for the installment plan this snapshot is of
26
+ #
27
+ # @return [String]
28
+ required :installment_plan_token, String
29
+
30
+ # @!attribute installment_plan_total
31
+ # Total owed on the plan in cents, the principal amount plus the enrollment fee
32
+ #
33
+ # @return [Integer]
34
+ required :installment_plan_total, Integer
35
+
36
+ # @!attribute installments
37
+ # Installments that make up the plan, oldest first
38
+ #
39
+ # @return [Array<Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment>]
40
+ required :installments,
41
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment] }
42
+
43
+ # @!attribute installments_outstanding
44
+ # Number of installments that still carried a balance as of this statement
45
+ #
46
+ # @return [Integer]
47
+ required :installments_outstanding, Integer
48
+
49
+ # @!attribute installments_paid
50
+ # Number of installments that had been paid off as of this statement
51
+ #
52
+ # @return [Integer]
53
+ required :installments_paid, Integer
54
+
55
+ # @!attribute num_installments
56
+ # Number of installments the plan is broken into
57
+ #
58
+ # @return [Integer]
59
+ required :num_installments, Integer
60
+
61
+ # @!attribute principal_amount
62
+ # Balance the plan was opened on in cents, excluding the enrollment fee
63
+ #
64
+ # @return [Integer]
65
+ required :principal_amount, Integer
66
+
67
+ # @!attribute source_type
68
+ #
69
+ # @return [Symbol, Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::SourceType]
70
+ required :source_type,
71
+ enum: -> { Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::SourceType }
72
+
73
+ # @!attribute start_date
74
+ # Date the plan was created
75
+ #
76
+ # @return [Date]
77
+ required :start_date, Date
78
+
79
+ # @!attribute state
80
+ # State of the installment plan. A plan is REBUILD_IN_PROGRESS while its loan
81
+ # tapes are being rebuilt, during which its payment totals are being recomputed
82
+ # and should not be treated as final
83
+ #
84
+ # @return [Symbol, Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::State]
85
+ required :state, enum: -> { Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::State }
86
+
87
+ # @!attribute total_paid
88
+ # Amount paid towards the plan as of this statement in cents
89
+ #
90
+ # @return [Integer]
91
+ required :total_paid, Integer
92
+
93
+ # @!method initialize(token:, fee_amount:, installment_plan_token:, installment_plan_total:, installments:, installments_outstanding:, installments_paid:, num_installments:, principal_amount:, source_type:, start_date:, state:, total_paid:)
94
+ # Some parameter documentations has been truncated, see
95
+ # {Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement}
96
+ # for more details.
97
+ #
98
+ # An immutable snapshot of an installment plan as of the statement it is attached
99
+ # to. Lithic cuts one per open plan when a statement is generated and never
100
+ # reissues it
101
+ #
102
+ # @param token [String] Globally unique identifier for this snapshot, which is the token of the statemen
103
+ #
104
+ # @param fee_amount [Integer] Enrollment fee charged when the plan was created in cents
105
+ #
106
+ # @param installment_plan_token [String] Globally unique identifier for the installment plan this snapshot is of
107
+ #
108
+ # @param installment_plan_total [Integer] Total owed on the plan in cents, the principal amount plus the enrollment fee
109
+ #
110
+ # @param installments [Array<Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment>] Installments that make up the plan, oldest first
111
+ #
112
+ # @param installments_outstanding [Integer] Number of installments that still carried a balance as of this statement
113
+ #
114
+ # @param installments_paid [Integer] Number of installments that had been paid off as of this statement
115
+ #
116
+ # @param num_installments [Integer] Number of installments the plan is broken into
117
+ #
118
+ # @param principal_amount [Integer] Balance the plan was opened on in cents, excluding the enrollment fee
119
+ #
120
+ # @param source_type [Symbol, Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::SourceType]
121
+ #
122
+ # @param start_date [Date] Date the plan was created
123
+ #
124
+ # @param state [Symbol, Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::State] State of the installment plan. A plan is REBUILD_IN_PROGRESS while its loan tape
125
+ #
126
+ # @param total_paid [Integer] Amount paid towards the plan as of this statement in cents
127
+
128
+ class Installment < Lithic::Internal::Type::BaseModel
129
+ # @!attribute amount_due
130
+ # Amount the installment was opened for in cents
131
+ #
132
+ # @return [Integer]
133
+ required :amount_due, Integer
134
+
135
+ # @!attribute amount_due_details
136
+ #
137
+ # @return [Lithic::Models::FinancialAccounts::CategoryBalances]
138
+ required :amount_due_details, -> { Lithic::FinancialAccounts::CategoryBalances }
139
+
140
+ # @!attribute amount_outstanding
141
+ # Amount still owed on the installment in cents
142
+ #
143
+ # @return [Integer]
144
+ required :amount_outstanding, Integer
145
+
146
+ # @!attribute amount_outstanding_details
147
+ #
148
+ # @return [Lithic::Models::FinancialAccounts::CategoryBalances]
149
+ required :amount_outstanding_details, -> { Lithic::FinancialAccounts::CategoryBalances }
150
+
151
+ # @!attribute amount_paid
152
+ # Amount paid towards the installment in cents
153
+ #
154
+ # @return [Integer]
155
+ required :amount_paid, Integer
156
+
157
+ # @!attribute amount_paid_details
158
+ #
159
+ # @return [Lithic::Models::FinancialAccounts::CategoryBalances]
160
+ required :amount_paid_details, -> { Lithic::FinancialAccounts::CategoryBalances }
161
+
162
+ # @!attribute date_assessed
163
+ # Date the installment was actually assessed onto the account, or null if it had
164
+ # not been assessed as of this statement
165
+ #
166
+ # @return [Date, nil]
167
+ required :date_assessed, Date, nil?: true
168
+
169
+ # @!attribute due_date
170
+ # Date the installment is scheduled to be assessed onto the account
171
+ #
172
+ # @return [Date]
173
+ required :due_date, Date
174
+
175
+ # @!attribute installment_num
176
+ # Position of this installment within the plan, starting at 0
177
+ #
178
+ # @return [Integer]
179
+ required :installment_num, Integer
180
+
181
+ # @!attribute payment_due_date
182
+ # Date the installment must be paid by before it is considered past due
183
+ #
184
+ # @return [Date]
185
+ required :payment_due_date, Date
186
+
187
+ # @!attribute payments
188
+ # Payments applied to this installment, oldest first
189
+ #
190
+ # @return [Array<Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment::Payment>]
191
+ required :payments,
192
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment::Payment] }
193
+
194
+ # @!method initialize(amount_due:, amount_due_details:, amount_outstanding:, amount_outstanding_details:, amount_paid:, amount_paid_details:, date_assessed:, due_date:, installment_num:, payment_due_date:, payments:)
195
+ # Some parameter documentations has been truncated, see
196
+ # {Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment}
197
+ # for more details.
198
+ #
199
+ # One installment of a plan as of the statement. Amounts are totalled across
200
+ # transaction categories rather than broken out by them, which the installment
201
+ # plan endpoint does
202
+ #
203
+ # @param amount_due [Integer] Amount the installment was opened for in cents
204
+ #
205
+ # @param amount_due_details [Lithic::Models::FinancialAccounts::CategoryBalances]
206
+ #
207
+ # @param amount_outstanding [Integer] Amount still owed on the installment in cents
208
+ #
209
+ # @param amount_outstanding_details [Lithic::Models::FinancialAccounts::CategoryBalances]
210
+ #
211
+ # @param amount_paid [Integer] Amount paid towards the installment in cents
212
+ #
213
+ # @param amount_paid_details [Lithic::Models::FinancialAccounts::CategoryBalances]
214
+ #
215
+ # @param date_assessed [Date, nil] Date the installment was actually assessed onto the account, or null if it had n
216
+ #
217
+ # @param due_date [Date] Date the installment is scheduled to be assessed onto the account
218
+ #
219
+ # @param installment_num [Integer] Position of this installment within the plan, starting at 0
220
+ #
221
+ # @param payment_due_date [Date] Date the installment must be paid by before it is considered past due
222
+ #
223
+ # @param payments [Array<Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement::Installment::Payment>] Payments applied to this installment, oldest first
224
+
225
+ class Payment < Lithic::Internal::Type::BaseModel
226
+ # @!attribute amount
227
+ # Amount applied to the installment in cents
228
+ #
229
+ # @return [Integer]
230
+ required :amount, Integer
231
+
232
+ # @!attribute date
233
+ # Date the payment was applied to the installment
234
+ #
235
+ # @return [Date]
236
+ required :date, Date
237
+
238
+ # @!method initialize(amount:, date:)
239
+ # @param amount [Integer] Amount applied to the installment in cents
240
+ #
241
+ # @param date [Date] Date the payment was applied to the installment
242
+ end
243
+ end
244
+
245
+ # @see Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement#source_type
246
+ module SourceType
247
+ extend Lithic::Internal::Type::Enum
248
+
249
+ UNPAID_BALANCE = :UNPAID_BALANCE
250
+ TRANSACTION = :TRANSACTION
251
+
252
+ # @!method self.values
253
+ # @return [Array<Symbol>]
254
+ end
255
+
256
+ # State of the installment plan. A plan is REBUILD_IN_PROGRESS while its loan
257
+ # tapes are being rebuilt, during which its payment totals are being recomputed
258
+ # and should not be treated as final
259
+ #
260
+ # @see Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement#state
261
+ module State
262
+ extend Lithic::Internal::Type::Enum
263
+
264
+ PENDING = :PENDING
265
+ ACTIVE = :ACTIVE
266
+ REBUILD_IN_PROGRESS = :REBUILD_IN_PROGRESS
267
+ FULLY_PAID = :FULLY_PAID
268
+ CANCELLED = :CANCELLED
269
+
270
+ # @!method self.values
271
+ # @return [Array<Symbol>]
272
+ end
273
+ end
274
+ end
275
+
276
+ InstallmentPlanStatement = InstallmentPlans::InstallmentPlanStatement
277
+ end
278
+ end
279
+ end