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
@@ -26,11 +26,31 @@ module Lithic
26
26
  sig { returns(String) }
27
27
  attr_accessor :pan
28
28
 
29
+ # 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
30
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
31
+ # a 422. Defaults to USD
32
+ sig { returns(T.nilable(String)) }
33
+ attr_reader :billing_currency
34
+
35
+ sig { params(billing_currency: String).void }
36
+ attr_writer :billing_currency
37
+
38
+ # 3-character alphabetic ISO 4217 currency code for the settlement amount.
39
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
40
+ # a 422. Defaults to the value of billing_currency
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :settlement_currency
43
+
44
+ sig { params(settlement_currency: String).void }
45
+ attr_writer :settlement_currency
46
+
29
47
  sig do
30
48
  params(
31
49
  amount: Integer,
32
50
  descriptor: String,
33
51
  pan: String,
52
+ billing_currency: String,
53
+ settlement_currency: String,
34
54
  request_options: Lithic::RequestOptions::OrHash
35
55
  ).returns(T.attached_class)
36
56
  end
@@ -41,6 +61,14 @@ module Lithic
41
61
  descriptor:,
42
62
  # Sixteen digit card number.
43
63
  pan:,
64
+ # 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
65
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
66
+ # a 422. Defaults to USD
67
+ billing_currency: nil,
68
+ # 3-character alphabetic ISO 4217 currency code for the settlement amount.
69
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
70
+ # a 422. Defaults to the value of billing_currency
71
+ settlement_currency: nil,
44
72
  request_options: {}
45
73
  )
46
74
  end
@@ -51,6 +79,8 @@ module Lithic
51
79
  amount: Integer,
52
80
  descriptor: String,
53
81
  pan: String,
82
+ billing_currency: String,
83
+ settlement_currency: String,
54
84
  request_options: Lithic::RequestOptions
55
85
  }
56
86
  )
@@ -28,7 +28,8 @@ module Lithic
28
28
  # Globally unique identifier for the account holder.
29
29
  account_holder_token,
30
30
  # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
31
- # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
31
+ # acceptable; APO/FPO are acceptable. Only USA addresses are supported for the KYB
32
+ # and KYC workflows.
32
33
  address:,
33
34
  # Individual's date of birth, as an RFC 3339 date.
34
35
  dob:,
@@ -22,14 +22,14 @@ module Lithic
22
22
  # `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}`
23
23
  # endpoint.
24
24
  #
25
- # Lithic currently supports backtesting for `CONDITIONAL_BLOCK` /
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
- # feasible. However, such cases are uncommon and customers should not anticipate
30
- # support for velocity backtests under most configurations. If a historical
31
- # transaction does not feature the required inputs to evaluate the rule, then it
32
- # will not be included in the final backtest report.
25
+ # Lithic currently supports backtesting for `CONDITIONAL_ACTION` rules.
26
+ # Backtesting for `VELOCITY_LIMIT` rules is generally not supported. In specific
27
+ # cases (i.e. where Lithic has pre-calculated the requested velocity metrics for
28
+ # historical transactions), a backtest may be feasible. However, such cases are
29
+ # uncommon and customers should not anticipate support for velocity backtests
30
+ # under most configurations. If a historical transaction does not feature the
31
+ # required inputs to evaluate the rule, then it will not be included in the final
32
+ # backtest report.
33
33
  sig do
34
34
  params(
35
35
  auth_rule_token: String,
@@ -12,6 +12,7 @@ module Lithic
12
12
  params(
13
13
  body:
14
14
  T.any(
15
+ Lithic::AuthRules::V2CreateParams::Body::Rule::OrHash,
15
16
  Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::OrHash,
16
17
  Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::OrHash,
17
18
  Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::OrHash
@@ -19,7 +20,11 @@ module Lithic
19
20
  request_options: Lithic::RequestOptions::OrHash
20
21
  ).returns(Lithic::AuthRules::AuthRule)
21
22
  end
22
- def create(body:, request_options: {})
23
+ def create(
24
+ # Deprecated: Use `entities` instead. Cannot be combined with `entities`.
25
+ body:,
26
+ request_options: {}
27
+ )
23
28
  end
24
29
 
25
30
  # Fetches a V2 Auth rule by its token
@@ -34,14 +39,15 @@ module Lithic
34
39
 
35
40
  # Updates a V2 Auth rule's properties
36
41
  #
37
- # If `account_tokens`, `card_tokens`, `program_level`, `excluded_card_tokens`,
38
- # `excluded_account_tokens`, or `excluded_business_account_tokens` is provided,
39
- # this will replace existing associations with the provided list of entities.
42
+ # If `entities` is provided, this will replace the rule's existing entities with
43
+ # the provided `include` and `exclude` lists. To change entities incrementally,
44
+ # use `PATCH /v2/auth_rules/{auth_rule_token}/entities` instead.
40
45
  sig do
41
46
  params(
42
47
  auth_rule_token: String,
43
48
  body:
44
49
  T.any(
50
+ Lithic::AuthRules::V2UpdateParams::Body::Rule::OrHash,
45
51
  Lithic::AuthRules::V2UpdateParams::Body::AccountLevelRule::OrHash,
46
52
  Lithic::AuthRules::V2UpdateParams::Body::CardLevelRule::OrHash,
47
53
  Lithic::AuthRules::V2UpdateParams::Body::ProgramLevelRule::OrHash
@@ -49,7 +55,13 @@ module Lithic
49
55
  request_options: Lithic::RequestOptions::OrHash
50
56
  ).returns(Lithic::AuthRules::AuthRule)
51
57
  end
52
- def update(auth_rule_token, body:, request_options: {})
58
+ def update(
59
+ auth_rule_token,
60
+ # Replaces the rule's existing entities with the provided `include` and `exclude`
61
+ # lists. A missing list is treated as empty, so `include` must always be provided.
62
+ body:,
63
+ request_options: {}
64
+ )
53
65
  end
54
66
 
55
67
  # Lists V2 Auth rules
@@ -86,7 +98,8 @@ module Lithic
86
98
  event_streams: nil,
87
99
  # Page size (for pagination).
88
100
  page_size: nil,
89
- # Only return Auth Rules that are bound to the provided scope.
101
+ # Only return Auth Rules that are bound to the provided scope. When no token is
102
+ # provided, `CARD` also returns Auth Rules that include a `CARD_TAG` entity.
90
103
  scope: nil,
91
104
  # A cursor representing an item's token after which a page of results should
92
105
  # begin. Used to retrieve the next page of results after this item.
@@ -115,7 +128,6 @@ module Lithic
115
128
  parameters:
116
129
  T.nilable(
117
130
  T.any(
118
- Lithic::AuthRules::ConditionalBlockParameters::OrHash,
119
131
  Lithic::AuthRules::VelocityLimitParams::OrHash,
120
132
  Lithic::AuthRules::MerchantLockParameters::OrHash,
121
133
  Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
@@ -218,7 +230,7 @@ module Lithic
218
230
  # - VelocityLimit Rules calculates the current Velocity Feature data. This
219
231
  # requires a `card_token` or `account_token` matching what the rule is Scoped
220
232
  # to.
221
- # - ConditionalBlock Rules calculates the CARD*TRANSACTION_COUNT*\* attributes on
233
+ # - ConditionalAction Rules calculates the CARD*TRANSACTION_COUNT*\* attributes on
222
234
  # the rule. This requires a `card_token`
223
235
  sig do
224
236
  params(
@@ -267,6 +279,29 @@ module Lithic
267
279
  )
268
280
  end
269
281
 
282
+ # Adds entities to and removes entities from a V2 Auth rule's `include` and
283
+ # `exclude` lists
284
+ #
285
+ # To replace all of the rule's entities at once, provide `entities` to
286
+ # `PATCH /v2/auth_rules/{auth_rule_token}` instead.
287
+ sig do
288
+ params(
289
+ auth_rule_token: String,
290
+ add: Lithic::AuthRules::AuthRuleEntities::OrHash,
291
+ remove: Lithic::AuthRules::AuthRuleEntities::OrHash,
292
+ request_options: Lithic::RequestOptions::OrHash
293
+ ).returns(Lithic::AuthRules::AuthRule)
294
+ end
295
+ def update_entities(
296
+ auth_rule_token,
297
+ # Entities to add to the rule's `include` and `exclude` lists
298
+ add: nil,
299
+ # Entities to remove from the rule's `include` and `exclude` lists
300
+ remove: nil,
301
+ request_options: {}
302
+ )
303
+ end
304
+
270
305
  # @api private
271
306
  sig { params(client: Lithic::Client).returns(T.attached_class) }
272
307
  def self.new(client:)
@@ -34,6 +34,7 @@ module Lithic
34
34
  spend_limit: Integer,
35
35
  spend_limit_duration: Lithic::SpendLimitDuration::OrSymbol,
36
36
  state: Lithic::CardCreateParams::State::OrSymbol,
37
+ tags: T::Hash[Symbol, String],
37
38
  idempotency_key: String,
38
39
  request_options: Lithic::RequestOptions::OrHash
39
40
  ).returns(Lithic::Card)
@@ -184,6 +185,10 @@ module Lithic
184
185
  # - `PAUSED` - Card will decline authorizations, but can be resumed at a later
185
186
  # time.
186
187
  state: nil,
188
+ # Body param: Key-value pairs to tag the card with. A replacement card does not
189
+ # inherit tags from the card it replaces. A card can have at most 50 tags, with
190
+ # keys up to 40 characters and values up to 500 characters
191
+ tags: nil,
187
192
  # Header param: Idempotency key for the request
188
193
  idempotency_key: nil,
189
194
  request_options: {}
@@ -218,6 +223,7 @@ module Lithic
218
223
  spend_limit_duration: Lithic::SpendLimitDuration::OrSymbol,
219
224
  state: Lithic::CardUpdateParams::State::OrSymbol,
220
225
  substatus: Lithic::CardUpdateParams::Substatus::OrSymbol,
226
+ tags: T::Hash[Symbol, T.nilable(String)],
221
227
  request_options: Lithic::RequestOptions::OrHash
222
228
  ).returns(Lithic::Card)
223
229
  end
@@ -298,6 +304,11 @@ module Lithic
298
304
  # - `OTHER` - The reason for the status does not fall into any of the above
299
305
  # categories. A comment should be provided to specify the reason.
300
306
  substatus: nil,
307
+ # Key-value pairs to merge into the card's tags. Supplied keys are added or
308
+ # overwritten, a key with a `null` value is removed, and omitted keys remain
309
+ # unchanged. A card can have at most 50 tags, with keys up to 40 characters and
310
+ # values up to 500 characters
311
+ tags: nil,
301
312
  request_options: {}
302
313
  )
303
314
  end
@@ -0,0 +1,86 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Resources
5
+ class FinancialAccounts
6
+ class InstallmentPlans
7
+ class Statements
8
+ # Get a specific statement snapshot for a given installment plan.
9
+ sig do
10
+ params(
11
+ statement_token: String,
12
+ financial_account_token: String,
13
+ installment_plan_token: String,
14
+ request_options: Lithic::RequestOptions::OrHash
15
+ ).returns(
16
+ Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement
17
+ )
18
+ end
19
+ def retrieve(
20
+ # Globally unique identifier for statement.
21
+ statement_token,
22
+ # Globally unique identifier for financial account.
23
+ financial_account_token:,
24
+ # Globally unique identifier for installment plan.
25
+ installment_plan_token:,
26
+ request_options: {}
27
+ )
28
+ end
29
+
30
+ # List the statement snapshots for a given installment plan.
31
+ sig do
32
+ params(
33
+ installment_plan_token: String,
34
+ financial_account_token: String,
35
+ begin_: Date,
36
+ end_: Date,
37
+ ending_before: String,
38
+ page_size: Integer,
39
+ starting_after: String,
40
+ state:
41
+ T.nilable(
42
+ Lithic::FinancialAccounts::InstallmentPlans::StatementListParams::State::OrSymbol
43
+ ),
44
+ request_options: Lithic::RequestOptions::OrHash
45
+ ).returns(
46
+ Lithic::Internal::CursorPage[
47
+ Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement
48
+ ]
49
+ )
50
+ end
51
+ def list(
52
+ # Path param: Globally unique identifier for installment plan.
53
+ installment_plan_token,
54
+ # Path param: Globally unique identifier for financial account.
55
+ financial_account_token:,
56
+ # Query param: Date string in RFC 3339 format. Only entries created after the
57
+ # specified date will be included.
58
+ begin_: nil,
59
+ # Query param: Date string in RFC 3339 format. Only entries created before the
60
+ # specified date will be included.
61
+ end_: nil,
62
+ # Query param: A cursor representing an item's token before which a page of
63
+ # results should end. Used to retrieve the previous page of results before this
64
+ # item.
65
+ ending_before: nil,
66
+ # Query param: Page size (for pagination).
67
+ page_size: nil,
68
+ # Query param: A cursor representing an item's token after which a page of results
69
+ # should begin. Used to retrieve the next page of results after this item.
70
+ starting_after: nil,
71
+ # Query param: Only snapshots in which the plan was in this state will be
72
+ # included.
73
+ state: nil,
74
+ request_options: {}
75
+ )
76
+ end
77
+
78
+ # @api private
79
+ sig { params(client: Lithic::Client).returns(T.attached_class) }
80
+ def self.new(client:)
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -4,6 +4,13 @@ module Lithic
4
4
  module Resources
5
5
  class FinancialAccounts
6
6
  class InstallmentPlans
7
+ sig do
8
+ returns(
9
+ Lithic::Resources::FinancialAccounts::InstallmentPlans::Statements
10
+ )
11
+ end
12
+ attr_reader :statements
13
+
7
14
  # Get a specific installment plan for a given financial account.
8
15
  sig do
9
16
  params(
@@ -113,6 +113,7 @@ module Lithic
113
113
  amount: Integer,
114
114
  descriptor: String,
115
115
  pan: String,
116
+ billing_currency: String,
116
117
  mcc: String,
117
118
  merchant_acceptor_city: String,
118
119
  merchant_acceptor_country: String,
@@ -122,6 +123,7 @@ module Lithic
122
123
  merchant_currency: String,
123
124
  partial_approval_capable: T::Boolean,
124
125
  pin: String,
126
+ settlement_currency: String,
125
127
  status:
126
128
  Lithic::TransactionSimulateAuthorizationParams::Status::OrSymbol,
127
129
  request_options: Lithic::RequestOptions::OrHash
@@ -138,6 +140,10 @@ module Lithic
138
140
  descriptor:,
139
141
  # Sixteen digit card number.
140
142
  pan:,
143
+ # 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
144
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
145
+ # a 422. Defaults to USD
146
+ billing_currency: nil,
141
147
  # Merchant category code for the transaction to be simulated. A four-digit number
142
148
  # listed in ISO 18245. Supported merchant category codes can be found
143
149
  # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
@@ -153,8 +159,10 @@ module Lithic
153
159
  # Amount of the transaction to be simulated in currency specified in
154
160
  # merchant_currency, including any acquirer fees.
155
161
  merchant_amount: nil,
156
- # 3-character alphabetic ISO 4217 currency code. Note: Simulator only accepts USD,
157
- # GBP, EUR and defaults to GBP if another ISO 4217 code is provided
162
+ # 3-character alphabetic ISO 4217 currency code for the merchant amount. Only used
163
+ # when merchant_amount is set, and defaults to GBP in that case. Without
164
+ # merchant_amount, the merchant amount uses the billing currency. Permitted values
165
+ # are USD, GBP, EUR and CAD, and any other ISO 4217 code returns a 422
158
166
  merchant_currency: nil,
159
167
  # Set to true if the terminal is capable of partial approval otherwise false.
160
168
  # Partial approval is when part of a transaction is approved and another payment
@@ -162,6 +170,12 @@ module Lithic
162
170
  partial_approval_capable: nil,
163
171
  # Simulate entering a PIN. If omitted, PIN check will not be performed.
164
172
  pin: nil,
173
+ # 3-character alphabetic ISO 4217 currency code for the settlement amount.
174
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
175
+ # a 422. Defaults to the value of billing_currency. Only single message
176
+ # (financial) authorizations carry a settlement amount, and the value is ignored
177
+ # for dual message authorizations
178
+ settlement_currency: nil,
165
179
  # Type of event to simulate.
166
180
  #
167
181
  # - `AUTHORIZATION` is a dual message purchase authorization, meaning a subsequent
@@ -244,6 +258,7 @@ module Lithic
244
258
  amount: Integer,
245
259
  descriptor: String,
246
260
  pan: String,
261
+ billing_currency: String,
247
262
  mcc: String,
248
263
  merchant_acceptor_city: String,
249
264
  merchant_acceptor_country: String,
@@ -263,6 +278,10 @@ module Lithic
263
278
  descriptor:,
264
279
  # Sixteen digit card number.
265
280
  pan:,
281
+ # 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
282
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
283
+ # a 422. Defaults to USD
284
+ billing_currency: nil,
266
285
  # Merchant category code for the transaction to be simulated. A four-digit number
267
286
  # listed in ISO 18245. Supported merchant category codes can be found
268
287
  # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
@@ -287,6 +306,8 @@ module Lithic
287
306
  amount: Integer,
288
307
  descriptor: String,
289
308
  pan: String,
309
+ billing_currency: String,
310
+ settlement_currency: String,
290
311
  request_options: Lithic::RequestOptions::OrHash
291
312
  ).returns(Lithic::Models::TransactionSimulateReturnResponse)
292
313
  end
@@ -297,6 +318,14 @@ module Lithic
297
318
  descriptor:,
298
319
  # Sixteen digit card number.
299
320
  pan:,
321
+ # 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
322
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
323
+ # a 422. Defaults to USD
324
+ billing_currency: nil,
325
+ # 3-character alphabetic ISO 4217 currency code for the settlement amount.
326
+ # Permitted values are USD, GBP, EUR and CAD, and any other ISO 4217 code returns
327
+ # a 422. Defaults to the value of billing_currency
328
+ settlement_currency: nil,
300
329
  request_options: {}
301
330
  )
302
331
  end
@@ -223,9 +223,9 @@ module Lithic
223
223
  :address1 => String,
224
224
  city: String,
225
225
  country: String,
226
- postal_code: String,
227
- state: String,
228
- :address2 => String
226
+ :address2 => String,
227
+ postal_code: String?,
228
+ state: String?
229
229
  }
230
230
 
231
231
  class Address < Lithic::Internal::Type::BaseModel
@@ -235,30 +235,30 @@ module Lithic
235
235
 
236
236
  attr_accessor country: String
237
237
 
238
- attr_accessor postal_code: String
239
-
240
- attr_accessor state: String
241
-
242
238
  attr_reader address2: String?
243
239
 
244
240
  def address2=: (String) -> String
245
241
 
242
+ attr_accessor postal_code: String?
243
+
244
+ attr_accessor state: String?
245
+
246
246
  def initialize: (
247
247
  address1: String,
248
248
  city: String,
249
249
  country: String,
250
- postal_code: String,
251
- state: String,
252
- ?address2: String
250
+ ?address2: String,
251
+ ?postal_code: String?,
252
+ ?state: String?
253
253
  ) -> void
254
254
 
255
255
  def to_hash: -> {
256
256
  :address1 => String,
257
257
  city: String,
258
258
  country: String,
259
- postal_code: String,
260
- state: String,
261
- :address2 => String
259
+ :address2 => String,
260
+ postal_code: String?,
261
+ state: String?
262
262
  }
263
263
  end
264
264
  end
@@ -325,9 +325,9 @@ module Lithic
325
325
  :address1 => String,
326
326
  city: String,
327
327
  country: String,
328
- postal_code: String,
329
- state: String,
330
- :address2 => String
328
+ :address2 => String,
329
+ postal_code: String?,
330
+ state: String?
331
331
  }
332
332
 
333
333
  class Address < Lithic::Internal::Type::BaseModel
@@ -337,30 +337,30 @@ module Lithic
337
337
 
338
338
  attr_accessor country: String
339
339
 
340
- attr_accessor postal_code: String
341
-
342
- attr_accessor state: String
343
-
344
340
  attr_reader address2: String?
345
341
 
346
342
  def address2=: (String) -> String
347
343
 
344
+ attr_accessor postal_code: String?
345
+
346
+ attr_accessor state: String?
347
+
348
348
  def initialize: (
349
349
  address1: String,
350
350
  city: String,
351
351
  country: String,
352
- postal_code: String,
353
- state: String,
354
- ?address2: String
352
+ ?address2: String,
353
+ ?postal_code: String?,
354
+ ?state: String?
355
355
  ) -> void
356
356
 
357
357
  def to_hash: -> {
358
358
  :address1 => String,
359
359
  city: String,
360
360
  country: String,
361
- postal_code: String,
362
- state: String,
363
- :address2 => String
361
+ :address2 => String,
362
+ postal_code: String?,
363
+ state: String?
364
364
  }
365
365
  end
366
366
  end
@@ -438,9 +438,9 @@ module Lithic
438
438
  :address1 => String,
439
439
  city: String,
440
440
  country: String,
441
- postal_code: String,
442
- state: String,
443
- :address2 => String
441
+ :address2 => String,
442
+ postal_code: String?,
443
+ state: String?
444
444
  }
445
445
 
446
446
  class Address < Lithic::Internal::Type::BaseModel
@@ -450,30 +450,30 @@ module Lithic
450
450
 
451
451
  attr_accessor country: String
452
452
 
453
- attr_accessor postal_code: String
454
-
455
- attr_accessor state: String
456
-
457
453
  attr_reader address2: String?
458
454
 
459
455
  def address2=: (String) -> String
460
456
 
457
+ attr_accessor postal_code: String?
458
+
459
+ attr_accessor state: String?
460
+
461
461
  def initialize: (
462
462
  address1: String,
463
463
  city: String,
464
464
  country: String,
465
- postal_code: String,
466
- state: String,
467
- ?address2: String
465
+ ?address2: String,
466
+ ?postal_code: String?,
467
+ ?state: String?
468
468
  ) -> void
469
469
 
470
470
  def to_hash: -> {
471
471
  :address1 => String,
472
472
  city: String,
473
473
  country: String,
474
- postal_code: String,
475
- state: String,
476
- :address2 => String
474
+ :address2 => String,
475
+ postal_code: String?,
476
+ state: String?
477
477
  }
478
478
  end
479
479
  end