lithic 0.1.0.pre.alpha.38 → 0.1.0.pre.alpha.40

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 (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/models/account.rb +88 -1
  6. data/lib/lithic/models/account_update_params.rb +86 -1
  7. data/lib/lithic/models/aggregate_balance.rb +1 -0
  8. data/lib/lithic/models/aggregate_balance_list_params.rb +1 -0
  9. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +4 -10
  10. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +3 -25
  11. data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +238 -16
  12. data/lib/lithic/models/balance.rb +1 -0
  13. data/lib/lithic/models/balance_list_params.rb +1 -0
  14. data/lib/lithic/models/card_create_params.rb +90 -1
  15. data/lib/lithic/models/card_program.rb +10 -1
  16. data/lib/lithic/models/card_update_params.rb +98 -1
  17. data/lib/lithic/models/cards/balance_list_response.rb +1 -0
  18. data/lib/lithic/models/event.rb +2 -0
  19. data/lib/lithic/models/event_list_params.rb +2 -0
  20. data/lib/lithic/models/event_subscription.rb +2 -0
  21. data/lib/lithic/models/events/subscription_create_params.rb +2 -0
  22. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +2 -0
  23. data/lib/lithic/models/events/subscription_update_params.rb +2 -0
  24. data/lib/lithic/models/external_resource.rb +34 -0
  25. data/lib/lithic/models/external_resource_type.rb +18 -0
  26. data/lib/lithic/models/financial_account_list_params.rb +1 -0
  27. data/lib/lithic/models/financial_accounts/balance_list_response.rb +1 -0
  28. data/lib/lithic/models/management_operation_create_params.rb +30 -1
  29. data/lib/lithic/models/management_operation_transaction.rb +22 -1
  30. data/lib/lithic/models/network_program.rb +41 -0
  31. data/lib/lithic/models/network_program_list_params.rb +43 -0
  32. data/lib/lithic/models/network_program_retrieve_params.rb +14 -0
  33. data/lib/lithic/models/non_pci_card.rb +88 -1
  34. data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
  35. data/lib/lithic/models/reports/settlement/network_total_list_response.rb +16 -6
  36. data/lib/lithic/models/reports/settlement/network_total_retrieve_response.rb +16 -6
  37. data/lib/lithic/models/transaction.rb +31 -20
  38. data/lib/lithic/models.rb +10 -0
  39. data/lib/lithic/resources/accounts.rb +5 -1
  40. data/lib/lithic/resources/cards.rb +12 -2
  41. data/lib/lithic/resources/management_operations.rb +13 -1
  42. data/lib/lithic/resources/network_programs.rb +64 -0
  43. data/lib/lithic/version.rb +1 -1
  44. data/lib/lithic.rb +6 -0
  45. data/rbi/lithic/client.rbi +3 -0
  46. data/rbi/lithic/models/account.rbi +131 -0
  47. data/rbi/lithic/models/account_update_params.rbi +159 -0
  48. data/rbi/lithic/models/aggregate_balance.rbi +5 -0
  49. data/rbi/lithic/models/aggregate_balance_list_params.rbi +5 -0
  50. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +6 -15
  51. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +18 -25
  52. data/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +527 -31
  53. data/rbi/lithic/models/balance.rbi +2 -0
  54. data/rbi/lithic/models/balance_list_params.rbi +5 -0
  55. data/rbi/lithic/models/card_create_params.rbi +190 -0
  56. data/rbi/lithic/models/card_program.rbi +13 -0
  57. data/rbi/lithic/models/card_update_params.rbi +168 -0
  58. data/rbi/lithic/models/cards/balance_list_response.rbi +5 -0
  59. data/rbi/lithic/models/event.rbi +10 -0
  60. data/rbi/lithic/models/event_list_params.rbi +10 -0
  61. data/rbi/lithic/models/event_subscription.rbi +10 -0
  62. data/rbi/lithic/models/events/subscription_create_params.rbi +10 -0
  63. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +10 -0
  64. data/rbi/lithic/models/events/subscription_update_params.rbi +10 -0
  65. data/rbi/lithic/models/external_resource.rbi +57 -0
  66. data/rbi/lithic/models/external_resource_type.rbi +26 -0
  67. data/rbi/lithic/models/financial_account_list_params.rbi +5 -0
  68. data/rbi/lithic/models/financial_accounts/balance_list_response.rbi +5 -0
  69. data/rbi/lithic/models/management_operation_create_params.rbi +59 -0
  70. data/rbi/lithic/models/management_operation_transaction.rbi +15 -0
  71. data/rbi/lithic/models/network_program.rbi +61 -0
  72. data/rbi/lithic/models/network_program_list_params.rbi +72 -0
  73. data/rbi/lithic/models/network_program_retrieve_params.rbi +27 -0
  74. data/rbi/lithic/models/non_pci_card.rbi +133 -3
  75. data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
  76. data/rbi/lithic/models/reports/settlement/network_total_list_response.rbi +21 -6
  77. data/rbi/lithic/models/reports/settlement/network_total_retrieve_response.rbi +21 -6
  78. data/rbi/lithic/models/transaction.rbi +23 -31
  79. data/rbi/lithic/models.rbi +10 -0
  80. data/rbi/lithic/resources/accounts.rbi +32 -0
  81. data/rbi/lithic/resources/cards.rbi +70 -0
  82. data/rbi/lithic/resources/management_operations.rbi +4 -0
  83. data/rbi/lithic/resources/network_programs.rbi +48 -0
  84. data/sig/lithic/client.rbs +2 -0
  85. data/sig/lithic/models/account.rbs +41 -0
  86. data/sig/lithic/models/account_update_params.rbs +41 -0
  87. data/sig/lithic/models/aggregate_balance.rbs +2 -1
  88. data/sig/lithic/models/aggregate_balance_list_params.rbs +2 -1
  89. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +4 -14
  90. data/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +212 -7
  91. data/sig/lithic/models/balance.rbs +2 -1
  92. data/sig/lithic/models/balance_list_params.rbs +2 -1
  93. data/sig/lithic/models/card_create_params.rbs +47 -0
  94. data/sig/lithic/models/card_program.rbs +7 -0
  95. data/sig/lithic/models/card_update_params.rbs +55 -1
  96. data/sig/lithic/models/cards/balance_list_response.rbs +2 -1
  97. data/sig/lithic/models/event.rbs +4 -0
  98. data/sig/lithic/models/event_list_params.rbs +4 -0
  99. data/sig/lithic/models/event_subscription.rbs +4 -0
  100. data/sig/lithic/models/events/subscription_create_params.rbs +4 -0
  101. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +4 -0
  102. data/sig/lithic/models/events/subscription_update_params.rbs +4 -0
  103. data/sig/lithic/models/external_resource.rbs +32 -0
  104. data/sig/lithic/models/external_resource_type.rbs +16 -0
  105. data/sig/lithic/models/financial_account_list_params.rbs +2 -1
  106. data/sig/lithic/models/financial_accounts/balance_list_response.rbs +2 -1
  107. data/sig/lithic/models/management_operation_create_params.rbs +20 -0
  108. data/sig/lithic/models/management_operation_transaction.rbs +5 -0
  109. data/sig/lithic/models/network_program.rbs +35 -0
  110. data/sig/lithic/models/network_program_list_params.rbs +38 -0
  111. data/sig/lithic/models/network_program_retrieve_params.rbs +15 -0
  112. data/sig/lithic/models/non_pci_card.rbs +55 -3
  113. data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
  114. data/sig/lithic/models/reports/settlement/network_total_list_response.rbs +7 -1
  115. data/sig/lithic/models/reports/settlement/network_total_retrieve_response.rbs +7 -1
  116. data/sig/lithic/models/transaction.rbs +2 -6
  117. data/sig/lithic/models.rbs +10 -0
  118. data/sig/lithic/resources/accounts.rbs +2 -0
  119. data/sig/lithic/resources/cards.rbs +5 -0
  120. data/sig/lithic/resources/management_operations.rbs +1 -0
  121. data/sig/lithic/resources/network_programs.rbs +19 -0
  122. metadata +20 -2
@@ -372,20 +372,25 @@ module Lithic
372
372
  # @see Lithic::Models::Transaction#cardholder_authentication
373
373
  class CardholderAuthentication < Lithic::Internal::Type::BaseModel
374
374
  # @!attribute three_ds_version
375
+ # @deprecated
376
+ #
375
377
  # The 3DS version used for the authentication
376
378
  #
377
379
  # @return [String, nil]
378
380
  required :three_ds_version, String, api_name: :"3ds_version", nil?: true
379
381
 
380
382
  # @!attribute acquirer_exemption
381
- # Whether an acquirer exemption applied to the transaction.
383
+ # @deprecated
384
+ #
385
+ # Whether an acquirer exemption applied to the transaction. Not currently
386
+ # populated and will be removed in the future.
382
387
  #
383
388
  # @return [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AcquirerExemption]
384
389
  required :acquirer_exemption,
385
390
  enum: -> { Lithic::Transaction::CardholderAuthentication::AcquirerExemption }
386
391
 
387
392
  # @!attribute authentication_result
388
- # Indicates what the outcome of the 3DS authentication process is.
393
+ # Indicates the outcome of the 3DS authentication process.
389
394
  #
390
395
  # @return [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AuthenticationResult]
391
396
  required :authentication_result,
@@ -401,12 +406,10 @@ module Lithic
401
406
  # Indicates whether chargeback liability shift applies to the transaction.
402
407
  # Possible enum values:
403
408
  #
404
- # * `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D Secure flow, chargeback liability shift applies.
405
- #
406
- # * `ACQUIRER_EXEMPTION`: The acquirer utilised an exemption to bypass Strong Customer Authentication (`transStatus = N`, or `transStatus = I`). Liability remains with the acquirer and in this case the `acquirer_exemption` field is expected to be not `NONE`.
407
- #
408
- # * `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the merchant is liable.
409
- #
409
+ # - `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D
410
+ # Secure flow, chargeback liability shift applies.
411
+ # - `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the
412
+ # merchant is liable.
410
413
  # - `TOKEN_AUTHENTICATED`: The transaction was a tokenized payment with validated
411
414
  # cryptography, possibly recurring. Chargeback liability shift to the issuer
412
415
  # applies.
@@ -424,6 +427,8 @@ module Lithic
424
427
  required :three_ds_authentication_token, String, nil?: true
425
428
 
426
429
  # @!attribute verification_attempted
430
+ # @deprecated
431
+ #
427
432
  # Indicates whether a 3DS challenge flow was used, and if so, what the
428
433
  # verification method was. (deprecated, use `authentication_result`)
429
434
  #
@@ -432,6 +437,8 @@ module Lithic
432
437
  enum: -> { Lithic::Transaction::CardholderAuthentication::VerificationAttempted }
433
438
 
434
439
  # @!attribute verification_result
440
+ # @deprecated
441
+ #
435
442
  # Indicates whether a transaction is considered 3DS authenticated. (deprecated,
436
443
  # use `authentication_result`)
437
444
  #
@@ -452,9 +459,9 @@ module Lithic
452
459
  #
453
460
  # @param three_ds_version [String, nil] The 3DS version used for the authentication
454
461
  #
455
- # @param acquirer_exemption [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AcquirerExemption] Whether an acquirer exemption applied to the transaction.
462
+ # @param acquirer_exemption [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AcquirerExemption] Whether an acquirer exemption applied to the transaction. Not currently populate
456
463
  #
457
- # @param authentication_result [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AuthenticationResult] Indicates what the outcome of the 3DS authentication process is.
464
+ # @param authentication_result [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AuthenticationResult] Indicates the outcome of the 3DS authentication process.
458
465
  #
459
466
  # @param decision_made_by [Symbol, Lithic::Models::Transaction::CardholderAuthentication::DecisionMadeBy] Indicates which party made the 3DS authentication decision.
460
467
  #
@@ -468,7 +475,10 @@ module Lithic
468
475
  #
469
476
  # @param authentication_method [Symbol, Lithic::Models::Transaction::CardholderAuthentication::AuthenticationMethod] Indicates the method used to authenticate the cardholder.
470
477
 
471
- # Whether an acquirer exemption applied to the transaction.
478
+ # @deprecated
479
+ #
480
+ # Whether an acquirer exemption applied to the transaction. Not currently
481
+ # populated and will be removed in the future.
472
482
  #
473
483
  # @see Lithic::Models::Transaction::CardholderAuthentication#acquirer_exemption
474
484
  module AcquirerExemption
@@ -487,7 +497,7 @@ module Lithic
487
497
  # @return [Array<Symbol>]
488
498
  end
489
499
 
490
- # Indicates what the outcome of the 3DS authentication process is.
500
+ # Indicates the outcome of the 3DS authentication process.
491
501
  #
492
502
  # @see Lithic::Models::Transaction::CardholderAuthentication#authentication_result
493
503
  module AuthenticationResult
@@ -522,12 +532,10 @@ module Lithic
522
532
  # Indicates whether chargeback liability shift applies to the transaction.
523
533
  # Possible enum values:
524
534
  #
525
- # * `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D Secure flow, chargeback liability shift applies.
526
- #
527
- # * `ACQUIRER_EXEMPTION`: The acquirer utilised an exemption to bypass Strong Customer Authentication (`transStatus = N`, or `transStatus = I`). Liability remains with the acquirer and in this case the `acquirer_exemption` field is expected to be not `NONE`.
528
- #
529
- # * `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the merchant is liable.
530
- #
535
+ # - `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D
536
+ # Secure flow, chargeback liability shift applies.
537
+ # - `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the
538
+ # merchant is liable.
531
539
  # - `TOKEN_AUTHENTICATED`: The transaction was a tokenized payment with validated
532
540
  # cryptography, possibly recurring. Chargeback liability shift to the issuer
533
541
  # applies.
@@ -537,14 +545,15 @@ module Lithic
537
545
  extend Lithic::Internal::Type::Enum
538
546
 
539
547
  LIABILITY_SHIFT_3DS_AUTHENTICATED = :"3DS_AUTHENTICATED"
540
- ACQUIRER_EXEMPTION = :ACQUIRER_EXEMPTION
541
- NONE = :NONE
542
548
  TOKEN_AUTHENTICATED = :TOKEN_AUTHENTICATED
549
+ NONE = :NONE
543
550
 
544
551
  # @!method self.values
545
552
  # @return [Array<Symbol>]
546
553
  end
547
554
 
555
+ # @deprecated
556
+ #
548
557
  # Indicates whether a 3DS challenge flow was used, and if so, what the
549
558
  # verification method was. (deprecated, use `authentication_result`)
550
559
  #
@@ -559,6 +568,8 @@ module Lithic
559
568
  # @return [Array<Symbol>]
560
569
  end
561
570
 
571
+ # @deprecated
572
+ #
562
573
  # Indicates whether a transaction is considered 3DS authenticated. (deprecated,
563
574
  # use `authentication_result`)
564
575
  #
data/lib/lithic/models.rb CHANGED
@@ -224,6 +224,10 @@ module Lithic
224
224
 
225
225
  ExternalPaymentSettleParams = Lithic::Models::ExternalPaymentSettleParams
226
226
 
227
+ ExternalResource = Lithic::Models::ExternalResource
228
+
229
+ ExternalResourceType = Lithic::Models::ExternalResourceType
230
+
227
231
  FinancialAccount = Lithic::Models::FinancialAccount
228
232
 
229
233
  FinancialAccountCreateParams = Lithic::Models::FinancialAccountCreateParams
@@ -272,6 +276,12 @@ module Lithic
272
276
 
273
277
  MessageAttempt = Lithic::Models::MessageAttempt
274
278
 
279
+ NetworkProgram = Lithic::Models::NetworkProgram
280
+
281
+ NetworkProgramListParams = Lithic::Models::NetworkProgramListParams
282
+
283
+ NetworkProgramRetrieveParams = Lithic::Models::NetworkProgramRetrieveParams
284
+
275
285
  NonPCICard = Lithic::Models::NonPCICard
276
286
 
277
287
  OwnerType = Lithic::Models::OwnerType
@@ -30,10 +30,12 @@ module Lithic
30
30
  # accounts that are part of the program managed by this API key. Accounts that are
31
31
  # in the `PAUSED` state will not be able to transact or create new cards.
32
32
  #
33
- # @overload update(account_token, daily_spend_limit: nil, lifetime_spend_limit: nil, monthly_spend_limit: nil, state: nil, verification_address: nil, request_options: {})
33
+ # @overload update(account_token, comment: nil, daily_spend_limit: nil, lifetime_spend_limit: nil, monthly_spend_limit: nil, state: nil, substatus: nil, verification_address: nil, request_options: {})
34
34
  #
35
35
  # @param account_token [String] Globally unique identifier for account.
36
36
  #
37
+ # @param comment [String] Additional context or information related to the account.
38
+ #
37
39
  # @param daily_spend_limit [Integer] Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1
38
40
  #
39
41
  # @param lifetime_spend_limit [Integer] Amount (in cents) for the account's lifetime spend limit (e.g. 100000 would be a
@@ -42,6 +44,8 @@ module Lithic
42
44
  #
43
45
  # @param state [Symbol, Lithic::Models::AccountUpdateParams::State] Account states.
44
46
  #
47
+ # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus] Account state substatus values:
48
+ #
45
49
  # @param verification_address [Lithic::Models::AccountUpdateParams::VerificationAddress] Address used during Address Verification Service (AVS) checks during transaction
46
50
  #
47
51
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -18,7 +18,7 @@ module Lithic
18
18
  # Create a new virtual or physical card. Parameters `shipping_address` and
19
19
  # `product_id` only apply to physical cards.
20
20
  #
21
- # @overload create(type:, account_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_for: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
21
+ # @overload create(type:, account_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, request_options: {})
22
22
  #
23
23
  # @param type [Symbol, Lithic::Models::CardCreateParams::Type] Card types:
24
24
  #
@@ -42,8 +42,12 @@ module Lithic
42
42
  #
43
43
  # @param replacement_account_token [String] Restricted field limited to select use cases. Lithic will reach out directly if
44
44
  #
45
+ # @param replacement_comment [String] Additional context or information related to the card that this card will replac
46
+ #
45
47
  # @param replacement_for [String] Globally unique identifier for the card that this card will replace. If the card
46
48
  #
49
+ # @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Card state substatus values for the card that this card will replace:
50
+ #
47
51
  # @param shipping_address [Lithic::Models::ShippingAddress]
48
52
  #
49
53
  # @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Shipping method for the card. Only applies to cards of type PHYSICAL.
@@ -92,14 +96,18 @@ module Lithic
92
96
  # _Note: setting a card to a `CLOSED` state is a final action that cannot be
93
97
  # undone._
94
98
  #
95
- # @overload update(card_token, digital_card_art_token: nil, memo: nil, pin: nil, pin_status: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
99
+ # @overload update(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: {})
96
100
  #
97
101
  # @param card_token [String]
98
102
  #
103
+ # @param comment [String] Additional context or information related to the card.
104
+ #
99
105
  # @param digital_card_art_token [String] Specifies the digital card art to be displayed in the user’s digital wallet afte
100
106
  #
101
107
  # @param memo [String] Friendly name to identify the card.
102
108
  #
109
+ # @param network_program_token [String] Globally unique identifier for the card's network program. Currently applicable
110
+ #
103
111
  # @param pin [String] Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and `V
104
112
  #
105
113
  # @param pin_status [Symbol, Lithic::Models::CardUpdateParams::PinStatus] Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
@@ -110,6 +118,8 @@ module Lithic
110
118
  #
111
119
  # @param state [Symbol, Lithic::Models::CardUpdateParams::State] Card state values:
112
120
  #
121
+ # @param substatus [Symbol, Lithic::Models::CardUpdateParams::Substatus] Card state substatus values:
122
+ #
113
123
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
114
124
  #
115
125
  # @return [Lithic::Models::Card]
@@ -5,18 +5,30 @@ module Lithic
5
5
  class ManagementOperations
6
6
  # Create management operation
7
7
  #
8
- # @overload create(amount:, category:, direction:, effective_date:, event_type:, financial_account_token:, token: nil, memo: nil, subtype: nil, user_defined_id: nil, request_options: {})
8
+ # @overload create(amount:, category:, direction:, effective_date:, event_type:, financial_account_token:, token: nil, memo: nil, on_closed_account: nil, subtype: nil, user_defined_id: nil, request_options: {})
9
9
  #
10
10
  # @param amount [Integer]
11
+ #
11
12
  # @param category [Symbol, Lithic::Models::ManagementOperationCreateParams::Category]
13
+ #
12
14
  # @param direction [Symbol, Lithic::Models::ManagementOperationCreateParams::Direction]
15
+ #
13
16
  # @param effective_date [Date]
17
+ #
14
18
  # @param event_type [Symbol, Lithic::Models::ManagementOperationCreateParams::EventType]
19
+ #
15
20
  # @param financial_account_token [String]
21
+ #
16
22
  # @param token [String]
23
+ #
17
24
  # @param memo [String]
25
+ #
26
+ # @param on_closed_account [Symbol, Lithic::Models::ManagementOperationCreateParams::OnClosedAccount] What to do if the financial account is closed when posting an operation
27
+ #
18
28
  # @param subtype [String]
29
+ #
19
30
  # @param user_defined_id [String]
31
+ #
20
32
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
21
33
  #
22
34
  # @return [Lithic::Models::ManagementOperationTransaction]
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Resources
5
+ class NetworkPrograms
6
+ # Get network program.
7
+ #
8
+ # @overload retrieve(network_program_token, request_options: {})
9
+ #
10
+ # @param network_program_token [String] Globally unique identifier for the network program.
11
+ #
12
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
13
+ #
14
+ # @return [Lithic::Models::NetworkProgram]
15
+ #
16
+ # @see Lithic::Models::NetworkProgramRetrieveParams
17
+ def retrieve(network_program_token, params = {})
18
+ @client.request(
19
+ method: :get,
20
+ path: ["v1/network_programs/%1$s", network_program_token],
21
+ model: Lithic::NetworkProgram,
22
+ options: params[:request_options]
23
+ )
24
+ end
25
+
26
+ # Some parameter documentations has been truncated, see
27
+ # {Lithic::Models::NetworkProgramListParams} for more details.
28
+ #
29
+ # List network programs.
30
+ #
31
+ # @overload list(begin_: nil, end_: nil, page_size: nil, request_options: {})
32
+ #
33
+ # @param begin_ [Time] Date string in RFC 3339 format. Only entries created after the specified time wi
34
+ #
35
+ # @param end_ [Time] Date string in RFC 3339 format. Only entries created before the specified time w
36
+ #
37
+ # @param page_size [Integer] Page size (for pagination).
38
+ #
39
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
40
+ #
41
+ # @return [Lithic::Internal::SinglePage<Lithic::Models::NetworkProgram>]
42
+ #
43
+ # @see Lithic::Models::NetworkProgramListParams
44
+ def list(params = {})
45
+ parsed, options = Lithic::NetworkProgramListParams.dump_request(params)
46
+ @client.request(
47
+ method: :get,
48
+ path: "v1/network_programs",
49
+ query: parsed.transform_keys(begin_: "begin", end_: "end"),
50
+ page: Lithic::Internal::SinglePage,
51
+ model: Lithic::NetworkProgram,
52
+ options: options
53
+ )
54
+ end
55
+
56
+ # @api private
57
+ #
58
+ # @param client [Lithic::Client]
59
+ def initialize(client:)
60
+ @client = client
61
+ end
62
+ end
63
+ end
64
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.1.0.pre.alpha.38"
4
+ VERSION = "0.1.0.pre.alpha.40"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -213,6 +213,8 @@ require_relative "lithic/models/external_payment_release_params"
213
213
  require_relative "lithic/models/external_payment_retrieve_params"
214
214
  require_relative "lithic/models/external_payment_reverse_params"
215
215
  require_relative "lithic/models/external_payment_settle_params"
216
+ require_relative "lithic/models/external_resource"
217
+ require_relative "lithic/models/external_resource_type"
216
218
  require_relative "lithic/models/financial_account"
217
219
  require_relative "lithic/models/financial_account_create_params"
218
220
  require_relative "lithic/models/financial_account_list_params"
@@ -258,6 +260,9 @@ require_relative "lithic/models/management_operation_retrieve_params"
258
260
  require_relative "lithic/models/management_operation_reverse_params"
259
261
  require_relative "lithic/models/management_operation_transaction"
260
262
  require_relative "lithic/models/message_attempt"
263
+ require_relative "lithic/models/network_program"
264
+ require_relative "lithic/models/network_program_list_params"
265
+ require_relative "lithic/models/network_program_retrieve_params"
261
266
  require_relative "lithic/models/owner_type"
262
267
  require_relative "lithic/models/payment_create_params"
263
268
  require_relative "lithic/models/payment_create_response"
@@ -379,6 +384,7 @@ require_relative "lithic/resources/fraud"
379
384
  require_relative "lithic/resources/fraud/transactions"
380
385
  require_relative "lithic/resources/funding_events"
381
386
  require_relative "lithic/resources/management_operations"
387
+ require_relative "lithic/resources/network_programs"
382
388
  require_relative "lithic/resources/payments"
383
389
  require_relative "lithic/resources/reports"
384
390
  require_relative "lithic/resources/reports/settlement"
@@ -103,6 +103,9 @@ module Lithic
103
103
  sig { returns(Lithic::Resources::Fraud) }
104
104
  attr_reader :fraud
105
105
 
106
+ sig { returns(Lithic::Resources::NetworkPrograms) }
107
+ attr_reader :network_programs
108
+
106
109
  # Status of api
107
110
  sig do
108
111
  params(request_options: Lithic::RequestOptions::OrHash).returns(
@@ -66,6 +66,46 @@ module Lithic
66
66
  sig { params(cardholder_currency: String).void }
67
67
  attr_writer :cardholder_currency
68
68
 
69
+ # Additional context or information related to the account.
70
+ sig { returns(T.nilable(String)) }
71
+ attr_reader :comment
72
+
73
+ sig { params(comment: String).void }
74
+ attr_writer :comment
75
+
76
+ # Account state substatus values:
77
+ #
78
+ # - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
79
+ # with stolen or fabricated identity information, encompassing both true
80
+ # identity theft and synthetic identities.
81
+ # - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
82
+ # unauthorized access or fraudulent transactions, necessitating further
83
+ # investigation.
84
+ # - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
85
+ # legitimate account holder. Examples include disputing valid transactions
86
+ # without cause, falsely claiming non-receipt of goods, or engaging in
87
+ # intentional bust-out schemes to exploit account services.
88
+ # - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
89
+ # of the account for personal reasons. This encompasses situations such as
90
+ # bankruptcy, other financial considerations, or the account holder's death.
91
+ # - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
92
+ # business strategy, risk management, inactivity, product changes, regulatory
93
+ # concerns, or violations of terms and conditions.
94
+ # - `NOT_ACTIVE` - The account has not had any transactions or payment activity
95
+ # within a specified period. This status applies to accounts that are paused or
96
+ # closed due to inactivity.
97
+ # - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
98
+ # review. In future implementations, this status may prevent clients from
99
+ # activating the account via APIs until the review is completed.
100
+ # - `OTHER` - The reason for the account's current status does not fall into any
101
+ # of the above categories. A comment should be provided to specify the
102
+ # particular reason.
103
+ sig { returns(T.nilable(Lithic::Account::Substatus::TaggedSymbol)) }
104
+ attr_reader :substatus
105
+
106
+ sig { params(substatus: Lithic::Account::Substatus::OrSymbol).void }
107
+ attr_writer :substatus
108
+
69
109
  sig { returns(T.nilable(Lithic::Account::VerificationAddress)) }
70
110
  attr_reader :verification_address
71
111
 
@@ -85,6 +125,8 @@ module Lithic
85
125
  account_holder: Lithic::Account::AccountHolder::OrHash,
86
126
  auth_rule_tokens: T::Array[String],
87
127
  cardholder_currency: String,
128
+ comment: String,
129
+ substatus: Lithic::Account::Substatus::OrSymbol,
88
130
  verification_address: Lithic::Account::VerificationAddress::OrHash
89
131
  ).returns(T.attached_class)
90
132
  end
@@ -121,6 +163,36 @@ module Lithic
121
163
  auth_rule_tokens: nil,
122
164
  # 3-character alphabetic ISO 4217 code for the currency of the cardholder.
123
165
  cardholder_currency: nil,
166
+ # Additional context or information related to the account.
167
+ comment: nil,
168
+ # Account state substatus values:
169
+ #
170
+ # - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
171
+ # with stolen or fabricated identity information, encompassing both true
172
+ # identity theft and synthetic identities.
173
+ # - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
174
+ # unauthorized access or fraudulent transactions, necessitating further
175
+ # investigation.
176
+ # - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
177
+ # legitimate account holder. Examples include disputing valid transactions
178
+ # without cause, falsely claiming non-receipt of goods, or engaging in
179
+ # intentional bust-out schemes to exploit account services.
180
+ # - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
181
+ # of the account for personal reasons. This encompasses situations such as
182
+ # bankruptcy, other financial considerations, or the account holder's death.
183
+ # - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
184
+ # business strategy, risk management, inactivity, product changes, regulatory
185
+ # concerns, or violations of terms and conditions.
186
+ # - `NOT_ACTIVE` - The account has not had any transactions or payment activity
187
+ # within a specified period. This status applies to accounts that are paused or
188
+ # closed due to inactivity.
189
+ # - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
190
+ # review. In future implementations, this status may prevent clients from
191
+ # activating the account via APIs until the review is completed.
192
+ # - `OTHER` - The reason for the account's current status does not fall into any
193
+ # of the above categories. A comment should be provided to specify the
194
+ # particular reason.
195
+ substatus: nil,
124
196
  verification_address: nil
125
197
  )
126
198
  end
@@ -135,6 +207,8 @@ module Lithic
135
207
  account_holder: Lithic::Account::AccountHolder,
136
208
  auth_rule_tokens: T::Array[String],
137
209
  cardholder_currency: String,
210
+ comment: String,
211
+ substatus: Lithic::Account::Substatus::TaggedSymbol,
138
212
  verification_address: Lithic::Account::VerificationAddress
139
213
  }
140
214
  )
@@ -275,6 +349,63 @@ module Lithic
275
349
  end
276
350
  end
277
351
 
352
+ # Account state substatus values:
353
+ #
354
+ # - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
355
+ # with stolen or fabricated identity information, encompassing both true
356
+ # identity theft and synthetic identities.
357
+ # - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
358
+ # unauthorized access or fraudulent transactions, necessitating further
359
+ # investigation.
360
+ # - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
361
+ # legitimate account holder. Examples include disputing valid transactions
362
+ # without cause, falsely claiming non-receipt of goods, or engaging in
363
+ # intentional bust-out schemes to exploit account services.
364
+ # - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
365
+ # of the account for personal reasons. This encompasses situations such as
366
+ # bankruptcy, other financial considerations, or the account holder's death.
367
+ # - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
368
+ # business strategy, risk management, inactivity, product changes, regulatory
369
+ # concerns, or violations of terms and conditions.
370
+ # - `NOT_ACTIVE` - The account has not had any transactions or payment activity
371
+ # within a specified period. This status applies to accounts that are paused or
372
+ # closed due to inactivity.
373
+ # - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
374
+ # review. In future implementations, this status may prevent clients from
375
+ # activating the account via APIs until the review is completed.
376
+ # - `OTHER` - The reason for the account's current status does not fall into any
377
+ # of the above categories. A comment should be provided to specify the
378
+ # particular reason.
379
+ module Substatus
380
+ extend Lithic::Internal::Type::Enum
381
+
382
+ TaggedSymbol =
383
+ T.type_alias { T.all(Symbol, Lithic::Account::Substatus) }
384
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
385
+
386
+ FRAUD_IDENTIFIED =
387
+ T.let(:FRAUD_IDENTIFIED, Lithic::Account::Substatus::TaggedSymbol)
388
+ SUSPICIOUS_ACTIVITY =
389
+ T.let(:SUSPICIOUS_ACTIVITY, Lithic::Account::Substatus::TaggedSymbol)
390
+ RISK_VIOLATION =
391
+ T.let(:RISK_VIOLATION, Lithic::Account::Substatus::TaggedSymbol)
392
+ END_USER_REQUEST =
393
+ T.let(:END_USER_REQUEST, Lithic::Account::Substatus::TaggedSymbol)
394
+ ISSUER_REQUEST =
395
+ T.let(:ISSUER_REQUEST, Lithic::Account::Substatus::TaggedSymbol)
396
+ NOT_ACTIVE =
397
+ T.let(:NOT_ACTIVE, Lithic::Account::Substatus::TaggedSymbol)
398
+ INTERNAL_REVIEW =
399
+ T.let(:INTERNAL_REVIEW, Lithic::Account::Substatus::TaggedSymbol)
400
+ OTHER = T.let(:OTHER, Lithic::Account::Substatus::TaggedSymbol)
401
+
402
+ sig do
403
+ override.returns(T::Array[Lithic::Account::Substatus::TaggedSymbol])
404
+ end
405
+ def self.values
406
+ end
407
+ end
408
+
278
409
  class VerificationAddress < Lithic::Internal::Type::BaseModel
279
410
  OrHash =
280
411
  T.type_alias do