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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/models/account_activity_list_params.rb +10 -8
  5. data/lib/lithic/models/auth_rules/v2_apply_params.rb +13 -5
  6. data/lib/lithic/models/auth_rules/v2_apply_response.rb +510 -18
  7. data/lib/lithic/models/auth_rules/v2_create_params.rb +283 -16
  8. data/lib/lithic/models/auth_rules/v2_create_response.rb +510 -18
  9. data/lib/lithic/models/auth_rules/v2_draft_params.rb +239 -3
  10. data/lib/lithic/models/auth_rules/v2_draft_response.rb +510 -18
  11. data/lib/lithic/models/auth_rules/v2_list_params.rb +10 -1
  12. data/lib/lithic/models/auth_rules/v2_list_response.rb +510 -18
  13. data/lib/lithic/models/auth_rules/v2_promote_response.rb +510 -18
  14. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +510 -18
  15. data/lib/lithic/models/auth_rules/v2_update_params.rb +1 -9
  16. data/lib/lithic/models/auth_rules/v2_update_response.rb +510 -18
  17. data/lib/lithic/models/event.rb +6 -0
  18. data/lib/lithic/models/event_list_params.rb +2 -0
  19. data/lib/lithic/models/event_subscription.rb +2 -0
  20. data/lib/lithic/models/events/subscription_create_params.rb +2 -0
  21. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +2 -0
  22. data/lib/lithic/models/events/subscription_update_params.rb +2 -0
  23. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +28 -26
  24. data/lib/lithic/models/transaction.rb +4 -0
  25. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +62 -0
  26. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_response.rb +25 -0
  27. data/lib/lithic/models.rb +3 -0
  28. data/lib/lithic/resources/account_activity.rb +2 -2
  29. data/lib/lithic/resources/auth_rules/v2/backtests.rb +3 -3
  30. data/lib/lithic/resources/auth_rules/v2.rb +19 -13
  31. data/lib/lithic/resources/transactions.rb +37 -0
  32. data/lib/lithic/version.rb +1 -1
  33. data/lib/lithic.rb +2 -0
  34. data/rbi/lithic/models/account_activity_list_params.rbi +18 -30
  35. data/rbi/lithic/models/auth_rules/v2_apply_params.rbi +19 -5
  36. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +1128 -18
  37. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +646 -21
  38. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +1128 -18
  39. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +554 -4
  40. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +1128 -18
  41. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +16 -0
  42. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +1128 -18
  43. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +1128 -18
  44. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +1128 -18
  45. data/rbi/lithic/models/auth_rules/v2_update_params.rbi +0 -11
  46. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +1128 -18
  47. data/rbi/lithic/models/event.rbi +16 -0
  48. data/rbi/lithic/models/event_list_params.rbi +10 -0
  49. data/rbi/lithic/models/event_subscription.rbi +10 -0
  50. data/rbi/lithic/models/events/subscription_create_params.rbi +10 -0
  51. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +10 -0
  52. data/rbi/lithic/models/events/subscription_update_params.rbi +10 -0
  53. data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +45 -41
  54. data/rbi/lithic/models/transaction.rbi +17 -0
  55. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +92 -0
  56. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_response.rbi +46 -0
  57. data/rbi/lithic/models.rbi +3 -0
  58. data/rbi/lithic/resources/account_activity.rbi +2 -2
  59. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +3 -3
  60. data/rbi/lithic/resources/auth_rules/v2.rbi +28 -14
  61. data/rbi/lithic/resources/transactions.rbi +33 -0
  62. data/sig/lithic/models/account_activity_list_params.rbs +16 -16
  63. data/sig/lithic/models/auth_rules/v2_apply_params.rbs +11 -2
  64. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +317 -2
  65. data/sig/lithic/models/auth_rules/v2_create_params.rbs +188 -4
  66. data/sig/lithic/models/auth_rules/v2_create_response.rbs +317 -2
  67. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +155 -0
  68. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +317 -2
  69. data/sig/lithic/models/auth_rules/v2_list_params.rbs +9 -1
  70. data/sig/lithic/models/auth_rules/v2_list_response.rbs +317 -2
  71. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +317 -2
  72. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +317 -2
  73. data/sig/lithic/models/auth_rules/v2_update_params.rbs +0 -7
  74. data/sig/lithic/models/auth_rules/v2_update_response.rbs +317 -2
  75. data/sig/lithic/models/event.rbs +4 -0
  76. data/sig/lithic/models/event_list_params.rbs +4 -0
  77. data/sig/lithic/models/event_subscription.rbs +4 -0
  78. data/sig/lithic/models/events/subscription_create_params.rbs +4 -0
  79. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +4 -0
  80. data/sig/lithic/models/events/subscription_update_params.rbs +4 -0
  81. data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +20 -20
  82. data/sig/lithic/models/transaction.rbs +10 -2
  83. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +50 -0
  84. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_response.rbs +20 -0
  85. data/sig/lithic/models.rbs +2 -0
  86. data/sig/lithic/resources/account_activity.rbs +2 -2
  87. data/sig/lithic/resources/auth_rules/v2.rbs +6 -3
  88. data/sig/lithic/resources/transactions.rbs +9 -0
  89. metadata +8 -2
@@ -36,6 +36,8 @@ module Lithic
36
36
  # - `card_transaction.updated` - Transaction Lifecycle webhook. See
37
37
  # https://docs.lithic.com/docs/transaction-webhooks.
38
38
  # - `dispute.updated` - A dispute has been updated.
39
+ # - `dispute_transaction.created` - A new dispute transaction has been created.
40
+ # - `dispute_transaction.updated` - A dispute transaction has been updated.
39
41
  # - `digital_wallet.tokenization_approval_request` - Card network's request to
40
42
  # Lithic to activate a digital wallet token.
41
43
  # - `digital_wallet.tokenization_result` - Notification of the end result of a
@@ -88,6 +90,8 @@ module Lithic
88
90
  # - `card_transaction.updated` - Transaction Lifecycle webhook. See
89
91
  # https://docs.lithic.com/docs/transaction-webhooks.
90
92
  # - `dispute.updated` - A dispute has been updated.
93
+ # - `dispute_transaction.created` - A new dispute transaction has been created.
94
+ # - `dispute_transaction.updated` - A dispute transaction has been updated.
91
95
  # - `digital_wallet.tokenization_approval_request` - Card network's request to
92
96
  # Lithic to activate a digital wallet token.
93
97
  # - `digital_wallet.tokenization_result` - Notification of the end result of a
@@ -126,6 +130,8 @@ module Lithic
126
130
  DIGITAL_WALLET_TOKENIZATION_UPDATED = :"digital_wallet.tokenization_updated"
127
131
  DISPUTE_UPDATED = :"dispute.updated"
128
132
  DISPUTE_EVIDENCE_UPLOAD_FAILED = :"dispute_evidence.upload_failed"
133
+ DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
134
+ DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
129
135
  EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
130
136
  EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
131
137
  EXTERNAL_PAYMENT_CREATED = :"external_payment.created"
@@ -97,6 +97,8 @@ module Lithic
97
97
  DIGITAL_WALLET_TOKENIZATION_UPDATED = :"digital_wallet.tokenization_updated"
98
98
  DISPUTE_UPDATED = :"dispute.updated"
99
99
  DISPUTE_EVIDENCE_UPLOAD_FAILED = :"dispute_evidence.upload_failed"
100
+ DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
101
+ DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
100
102
  EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
101
103
  EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
102
104
  EXTERNAL_PAYMENT_CREATED = :"external_payment.created"
@@ -70,6 +70,8 @@ module Lithic
70
70
  DIGITAL_WALLET_TOKENIZATION_UPDATED = :"digital_wallet.tokenization_updated"
71
71
  DISPUTE_UPDATED = :"dispute.updated"
72
72
  DISPUTE_EVIDENCE_UPLOAD_FAILED = :"dispute_evidence.upload_failed"
73
+ DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
74
+ DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
73
75
  EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
74
76
  EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
75
77
  EXTERNAL_PAYMENT_CREATED = :"external_payment.created"
@@ -72,6 +72,8 @@ module Lithic
72
72
  DIGITAL_WALLET_TOKENIZATION_UPDATED = :"digital_wallet.tokenization_updated"
73
73
  DISPUTE_UPDATED = :"dispute.updated"
74
74
  DISPUTE_EVIDENCE_UPLOAD_FAILED = :"dispute_evidence.upload_failed"
75
+ DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
76
+ DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
75
77
  EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
76
78
  EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
77
79
  EXTERNAL_PAYMENT_CREATED = :"external_payment.created"
@@ -44,6 +44,8 @@ module Lithic
44
44
  DIGITAL_WALLET_TOKENIZATION_UPDATED = :"digital_wallet.tokenization_updated"
45
45
  DISPUTE_UPDATED = :"dispute.updated"
46
46
  DISPUTE_EVIDENCE_UPLOAD_FAILED = :"dispute_evidence.upload_failed"
47
+ DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
48
+ DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
47
49
  EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
48
50
  EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
49
51
  EXTERNAL_PAYMENT_CREATED = :"external_payment.created"
@@ -72,6 +72,8 @@ module Lithic
72
72
  DIGITAL_WALLET_TOKENIZATION_UPDATED = :"digital_wallet.tokenization_updated"
73
73
  DISPUTE_UPDATED = :"dispute.updated"
74
74
  DISPUTE_EVIDENCE_UPLOAD_FAILED = :"dispute_evidence.upload_failed"
75
+ DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
76
+ DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
75
77
  EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
76
78
  EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
77
79
  EXTERNAL_PAYMENT_CREATED = :"external_payment.created"
@@ -488,43 +488,45 @@ module Lithic
488
488
 
489
489
  # @see Lithic::Models::ThreeDS::AuthenticationRetrieveResponse#merchant
490
490
  class Merchant < Lithic::Internal::Type::BaseModel
491
+ # @!attribute risk_indicator
492
+ # Object containing additional data indicating additional risk factors related to
493
+ # the e-commerce transaction.
494
+ #
495
+ # @return [Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator]
496
+ required :risk_indicator,
497
+ -> { Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator }
498
+
491
499
  # @!attribute id
492
500
  # Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
493
- # `acquirerMerchantId`.
501
+ # `acquirerMerchantId`. May not be present for non-payment authentications.
494
502
  #
495
- # @return [String]
496
- required :id, String
503
+ # @return [String, nil]
504
+ optional :id, String, nil?: true
497
505
 
498
506
  # @!attribute country
499
507
  # Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS
500
508
  # field `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code
501
- # (e.g., USA).
509
+ # (e.g., USA). May not be present for non-payment authentications.
502
510
  #
503
- # @return [String]
504
- required :country, String
511
+ # @return [String, nil]
512
+ optional :country, String, nil?: true
505
513
 
506
514
  # @!attribute mcc
507
515
  # Merchant category code assigned to the merchant that describes its business
508
- # activity type. Maps to EMV 3DS field `mcc`.
516
+ # activity type. Maps to EMV 3DS field `mcc`. May not be present for non-payment
517
+ # authentications.
509
518
  #
510
- # @return [String]
511
- required :mcc, String
519
+ # @return [String, nil]
520
+ optional :mcc, String, nil?: true
512
521
 
513
522
  # @!attribute name
514
- # Name of the merchant. Maps to EMV 3DS field `merchantName`.
523
+ # Name of the merchant. Maps to EMV 3DS field `merchantName`. May not be present
524
+ # for non-payment authentications.
515
525
  #
516
- # @return [String]
517
- required :name, String
518
-
519
- # @!attribute risk_indicator
520
- # Object containing additional data indicating additional risk factors related to
521
- # the e-commerce transaction.
522
- #
523
- # @return [Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator]
524
- required :risk_indicator,
525
- -> { Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator }
526
+ # @return [String, nil]
527
+ optional :name, String, nil?: true
526
528
 
527
- # @!method initialize(id:, country:, mcc:, name:, risk_indicator:)
529
+ # @!method initialize(risk_indicator:, id: nil, country: nil, mcc: nil, name: nil)
528
530
  # Some parameter documentations has been truncated, see
529
531
  # {Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant} for more
530
532
  # details.
@@ -532,15 +534,15 @@ module Lithic
532
534
  # Object containing data about the merchant involved in the e-commerce
533
535
  # transaction.
534
536
  #
535
- # @param id [String] Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field `acquirer
537
+ # @param risk_indicator [Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator] Object containing additional data indicating additional risk factors related to
536
538
  #
537
- # @param country [String] Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS fiel
539
+ # @param id [String, nil] Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field `acquirer
538
540
  #
539
- # @param mcc [String] Merchant category code assigned to the merchant that describes its business acti
541
+ # @param country [String, nil] Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS fiel
540
542
  #
541
- # @param name [String] Name of the merchant. Maps to EMV 3DS field `merchantName`.
543
+ # @param mcc [String, nil] Merchant category code assigned to the merchant that describes its business acti
542
544
  #
543
- # @param risk_indicator [Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant::RiskIndicator] Object containing additional data indicating additional risk factors related to
545
+ # @param name [String, nil] Name of the merchant. Maps to EMV 3DS field `merchantName`. May not be present f
544
546
 
545
547
  # @see Lithic::Models::ThreeDS::AuthenticationRetrieveResponse::Merchant#risk_indicator
546
548
  class RiskIndicator < Lithic::Internal::Type::BaseModel
@@ -947,6 +947,7 @@ module Lithic
947
947
  module Result
948
948
  extend Lithic::Internal::Type::Enum
949
949
 
950
+ ACCOUNT_PAUSED = :ACCOUNT_PAUSED
950
951
  ACCOUNT_STATE_TRANSACTION_FAIL = :ACCOUNT_STATE_TRANSACTION_FAIL
951
952
  APPROVED = :APPROVED
952
953
  BANK_CONNECTION_ERROR = :BANK_CONNECTION_ERROR
@@ -1250,6 +1251,7 @@ module Lithic
1250
1251
  ACCOUNT_INACTIVE = :ACCOUNT_INACTIVE
1251
1252
  ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED = :ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED
1252
1253
  ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED = :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED
1254
+ ACCOUNT_PAUSED = :ACCOUNT_PAUSED
1253
1255
  ACCOUNT_UNDER_REVIEW = :ACCOUNT_UNDER_REVIEW
1254
1256
  ADDRESS_INCORRECT = :ADDRESS_INCORRECT
1255
1257
  APPROVED = :APPROVED
@@ -1494,6 +1496,7 @@ module Lithic
1494
1496
  module Result
1495
1497
  extend Lithic::Internal::Type::Enum
1496
1498
 
1499
+ ACCOUNT_PAUSED = :ACCOUNT_PAUSED
1497
1500
  ACCOUNT_STATE_TRANSACTION_FAIL = :ACCOUNT_STATE_TRANSACTION_FAIL
1498
1501
  APPROVED = :APPROVED
1499
1502
  BANK_CONNECTION_ERROR = :BANK_CONNECTION_ERROR
@@ -1573,6 +1576,7 @@ module Lithic
1573
1576
  ACCOUNT_INACTIVE = :ACCOUNT_INACTIVE
1574
1577
  ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED = :ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED
1575
1578
  ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED = :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED
1579
+ ACCOUNT_PAUSED = :ACCOUNT_PAUSED
1576
1580
  ACCOUNT_UNDER_REVIEW = :ACCOUNT_UNDER_REVIEW
1577
1581
  ADDRESS_INCORRECT = :ADDRESS_INCORRECT
1578
1582
  APPROVED = :APPROVED
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::Transactions#simulate_credit_authorization_advice
6
+ class TransactionSimulateCreditAuthorizationAdviceParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!attribute amount
11
+ # Amount (in cents). Any value entered will be converted into a negative amount in
12
+ # the simulated transaction. For example, entering 100 in this field will appear
13
+ # as a -100 amount in the transaction.
14
+ #
15
+ # @return [Integer]
16
+ required :amount, Integer
17
+
18
+ # @!attribute descriptor
19
+ # Merchant descriptor.
20
+ #
21
+ # @return [String]
22
+ required :descriptor, String
23
+
24
+ # @!attribute pan
25
+ # Sixteen digit card number.
26
+ #
27
+ # @return [String]
28
+ required :pan, String
29
+
30
+ # @!attribute mcc
31
+ # Merchant category code for the transaction to be simulated. A four-digit number
32
+ # listed in ISO 18245. Supported merchant category codes can be found
33
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
34
+ #
35
+ # @return [String, nil]
36
+ optional :mcc, String
37
+
38
+ # @!attribute merchant_acceptor_id
39
+ # Unique identifier to identify the payment card acceptor.
40
+ #
41
+ # @return [String, nil]
42
+ optional :merchant_acceptor_id, String
43
+
44
+ # @!method initialize(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, request_options: {})
45
+ # Some parameter documentations has been truncated, see
46
+ # {Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams} for more
47
+ # details.
48
+ #
49
+ # @param amount [Integer] Amount (in cents). Any value entered will be converted into a negative amount in
50
+ #
51
+ # @param descriptor [String] Merchant descriptor.
52
+ #
53
+ # @param pan [String] Sixteen digit card number.
54
+ #
55
+ # @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
56
+ #
57
+ # @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
58
+ #
59
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::Transactions#simulate_credit_authorization_advice
6
+ class TransactionSimulateCreditAuthorizationAdviceResponse < Lithic::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # A unique token to reference this transaction.
9
+ #
10
+ # @return [String, nil]
11
+ optional :token, String
12
+
13
+ # @!attribute debugging_request_id
14
+ # Debugging request ID to share with Lithic Support team.
15
+ #
16
+ # @return [String, nil]
17
+ optional :debugging_request_id, String
18
+
19
+ # @!method initialize(token: nil, debugging_request_id: nil)
20
+ # @param token [String] A unique token to reference this transaction.
21
+ #
22
+ # @param debugging_request_id [String] Debugging request ID to share with Lithic Support team.
23
+ end
24
+ end
25
+ end
data/lib/lithic/models.rb CHANGED
@@ -375,6 +375,9 @@ module Lithic
375
375
 
376
376
  TransactionSimulateClearingParams = Lithic::Models::TransactionSimulateClearingParams
377
377
 
378
+ TransactionSimulateCreditAuthorizationAdviceParams =
379
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
380
+
378
381
  TransactionSimulateCreditAuthorizationParams =
379
382
  Lithic::Models::TransactionSimulateCreditAuthorizationParams
380
383
 
@@ -26,11 +26,11 @@ module Lithic
26
26
  #
27
27
  # @param page_size [Integer] Page size (for pagination).
28
28
  #
29
- # @param result [Array<Symbol, Lithic::Models::AccountActivityListParams::Result>] Filter by transaction result
29
+ # @param result [Symbol, Lithic::Models::AccountActivityListParams::Result] Filter by transaction result
30
30
  #
31
31
  # @param starting_after [String] A cursor representing an item's token after which a page of results should begin
32
32
  #
33
- # @param status [Array<Symbol, Lithic::Models::AccountActivityListParams::Status>] Filter by transaction status
33
+ # @param status [Symbol, Lithic::Models::AccountActivityListParams::Status] Filter by transaction status
34
34
  #
35
35
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
36
36
  #
@@ -23,9 +23,9 @@ module Lithic
23
23
  # endpoint.
24
24
  #
25
25
  # Lithic currently supports backtesting for `CONDITIONAL_BLOCK` /
26
- # `CONDITIONAL_3DS_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is
27
- # generally not supported. In specific cases (i.e. where Lithic has pre-calculated
28
- # the requested velocity metrics for historical transactions), a backtest may be
26
+ # `CONDITIONAL_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is generally
27
+ # not supported. In specific cases (i.e. where Lithic has pre-calculated the
28
+ # requested velocity metrics for historical transactions), a backtest may be
29
29
  # feasible. However, such cases are uncommon and customers should not anticipate
30
30
  # support for velocity backtests under most configurations. If a historical
31
31
  # transaction does not feature the required inputs to evaluate the rule, then it
@@ -12,19 +12,23 @@ module Lithic
12
12
  #
13
13
  # Creates a new V2 Auth rule in draft mode
14
14
  #
15
- # @overload create(account_tokens:, card_tokens:, program_level:, name: nil, parameters: nil, type: nil, excluded_card_tokens: nil, request_options: {})
16
- #
17
- # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
15
+ # @overload create(card_tokens:, program_level:, account_tokens: nil, business_account_tokens: nil, event_stream: nil, name: nil, parameters: nil, type: nil, excluded_card_tokens: nil, request_options: {})
18
16
  #
19
17
  # @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
20
18
  #
21
19
  # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
22
20
  #
21
+ # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
22
+ #
23
+ # @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
24
+ #
25
+ # @param event_stream [Symbol, Lithic::Models::AuthRules::V2CreateParams::EventStream] The event stream during which the rule will be evaluated.
26
+ #
23
27
  # @param name [String, nil] Auth Rule Name
24
28
  #
25
- # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters] Parameters for the Auth Rule
29
+ # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2CreateParams::Parameters::ConditionalAuthorizationActionParameters] Parameters for the Auth Rule
26
30
  #
27
- # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Type] The type of Auth Rule. Effectively determines the event stream during which it w
31
+ # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Type] The type of Auth Rule. For certain rule types, this determines the event stream
28
32
  #
29
33
  # @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
30
34
  #
@@ -73,12 +77,10 @@ module Lithic
73
77
  # is provided, this will replace existing associations with the provided list of
74
78
  # entities.
75
79
  #
76
- # @overload update(auth_rule_token, account_tokens: nil, name: nil, state: nil, card_tokens: nil, excluded_card_tokens: nil, program_level: nil, request_options: {})
80
+ # @overload update(auth_rule_token, name: nil, state: nil, card_tokens: nil, excluded_card_tokens: nil, program_level: nil, request_options: {})
77
81
  #
78
82
  # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
79
83
  #
80
- # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
81
- #
82
84
  # @param name [String, nil] Auth Rule Name
83
85
  #
84
86
  # @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::State] The desired state of the Auth Rule.
@@ -110,10 +112,12 @@ module Lithic
110
112
  #
111
113
  # Lists V2 Auth rules
112
114
  #
113
- # @overload list(account_token: nil, card_token: nil, ending_before: nil, event_stream: nil, page_size: nil, scope: nil, starting_after: nil, request_options: {})
115
+ # @overload list(account_token: nil, business_account_token: nil, card_token: nil, ending_before: nil, event_stream: nil, page_size: nil, scope: nil, starting_after: nil, request_options: {})
114
116
  #
115
117
  # @param account_token [String] Only return Auth Rules that are bound to the provided account token.
116
118
  #
119
+ # @param business_account_token [String] Only return Auth Rules that are bound to the provided business account token.
120
+ #
117
121
  # @param card_token [String] Only return Auth Rules that are bound to the provided card token.
118
122
  #
119
123
  # @param ending_before [String] A cursor representing an item's token before which a page of results should end.
@@ -170,16 +174,18 @@ module Lithic
170
174
  #
171
175
  # Prefer using the `PATCH` method for this operation.
172
176
  #
173
- # @overload apply(auth_rule_token, account_tokens:, card_tokens:, program_level:, excluded_card_tokens: nil, request_options: {})
177
+ # @overload apply(auth_rule_token, card_tokens:, program_level:, account_tokens: nil, business_account_tokens: nil, excluded_card_tokens: nil, request_options: {})
174
178
  #
175
179
  # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
176
180
  #
177
- # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
178
- #
179
181
  # @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
180
182
  #
181
183
  # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
182
184
  #
185
+ # @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
186
+ #
187
+ # @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
188
+ #
183
189
  # @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
184
190
  #
185
191
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -207,7 +213,7 @@ module Lithic
207
213
  #
208
214
  # @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
209
215
  #
210
- # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, nil] Parameters for the Auth Rule
216
+ # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::V2DraftParams::Parameters::ConditionalAuthorizationActionParameters, nil] Parameters for the Auth Rule
211
217
  #
212
218
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
213
219
  #
@@ -204,6 +204,8 @@ module Lithic
204
204
  )
205
205
  end
206
206
 
207
+ # @deprecated use `simulate_credit_authorization_advice` instead
208
+ #
207
209
  # Some parameter documentations has been truncated, see
208
210
  # {Lithic::Models::TransactionSimulateCreditAuthorizationParams} for more details.
209
211
  #
@@ -238,6 +240,41 @@ module Lithic
238
240
  )
239
241
  end
240
242
 
243
+ # Some parameter documentations has been truncated, see
244
+ # {Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams} for more
245
+ # details.
246
+ #
247
+ # Simulates a credit authorization advice from the card network. This message
248
+ # indicates that the network approved a credit authorization on your behalf.
249
+ #
250
+ # @overload simulate_credit_authorization_advice(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, request_options: {})
251
+ #
252
+ # @param amount [Integer] Amount (in cents). Any value entered will be converted into a negative amount in
253
+ #
254
+ # @param descriptor [String] Merchant descriptor.
255
+ #
256
+ # @param pan [String] Sixteen digit card number.
257
+ #
258
+ # @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
259
+ #
260
+ # @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
261
+ #
262
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
263
+ #
264
+ # @return [Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse]
265
+ #
266
+ # @see Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
267
+ def simulate_credit_authorization_advice(params)
268
+ parsed, options = Lithic::TransactionSimulateCreditAuthorizationAdviceParams.dump_request(params)
269
+ @client.request(
270
+ method: :post,
271
+ path: "v1/simulate/credit_authorization_advice",
272
+ body: parsed,
273
+ model: Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse,
274
+ options: options
275
+ )
276
+ end
277
+
241
278
  # Returns, or refunds, an amount back to a card. Returns simulated via this
242
279
  # endpoint clear immediately, without prior authorization, and result in a
243
280
  # `SETTLED` transaction status.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.1.0.pre.alpha.41"
4
+ VERSION = "0.1.0.pre.alpha.43"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -339,6 +339,8 @@ require_relative "lithic/models/transaction_simulate_authorization_params"
339
339
  require_relative "lithic/models/transaction_simulate_authorization_response"
340
340
  require_relative "lithic/models/transaction_simulate_clearing_params"
341
341
  require_relative "lithic/models/transaction_simulate_clearing_response"
342
+ require_relative "lithic/models/transaction_simulate_credit_authorization_advice_params"
343
+ require_relative "lithic/models/transaction_simulate_credit_authorization_advice_response"
342
344
  require_relative "lithic/models/transaction_simulate_credit_authorization_params"
343
345
  require_relative "lithic/models/transaction_simulate_credit_authorization_response"
344
346
  require_relative "lithic/models/transaction_simulate_return_params"
@@ -80,18 +80,12 @@ module Lithic
80
80
 
81
81
  # Filter by transaction result
82
82
  sig do
83
- returns(
84
- T.nilable(
85
- T::Array[Lithic::AccountActivityListParams::Result::OrSymbol]
86
- )
87
- )
83
+ returns(T.nilable(Lithic::AccountActivityListParams::Result::OrSymbol))
88
84
  end
89
85
  attr_reader :result
90
86
 
91
87
  sig do
92
- params(
93
- result: T::Array[Lithic::AccountActivityListParams::Result::OrSymbol]
94
- ).void
88
+ params(result: Lithic::AccountActivityListParams::Result::OrSymbol).void
95
89
  end
96
90
  attr_writer :result
97
91
 
@@ -105,18 +99,12 @@ module Lithic
105
99
 
106
100
  # Filter by transaction status
107
101
  sig do
108
- returns(
109
- T.nilable(
110
- T::Array[Lithic::AccountActivityListParams::Status::OrSymbol]
111
- )
112
- )
102
+ returns(T.nilable(Lithic::AccountActivityListParams::Status::OrSymbol))
113
103
  end
114
104
  attr_reader :status
115
105
 
116
106
  sig do
117
- params(
118
- status: T::Array[Lithic::AccountActivityListParams::Status::OrSymbol]
119
- ).void
107
+ params(status: Lithic::AccountActivityListParams::Status::OrSymbol).void
120
108
  end
121
109
  attr_writer :status
122
110
 
@@ -130,9 +118,9 @@ module Lithic
130
118
  ending_before: String,
131
119
  financial_account_token: String,
132
120
  page_size: Integer,
133
- result: T::Array[Lithic::AccountActivityListParams::Result::OrSymbol],
121
+ result: Lithic::AccountActivityListParams::Result::OrSymbol,
134
122
  starting_after: String,
135
- status: T::Array[Lithic::AccountActivityListParams::Status::OrSymbol],
123
+ status: Lithic::AccountActivityListParams::Status::OrSymbol,
136
124
  request_options: Lithic::RequestOptions::OrHash
137
125
  ).returns(T.attached_class)
138
126
  end
@@ -178,11 +166,9 @@ module Lithic
178
166
  ending_before: String,
179
167
  financial_account_token: String,
180
168
  page_size: Integer,
181
- result:
182
- T::Array[Lithic::AccountActivityListParams::Result::OrSymbol],
169
+ result: Lithic::AccountActivityListParams::Result::OrSymbol,
183
170
  starting_after: String,
184
- status:
185
- T::Array[Lithic::AccountActivityListParams::Status::OrSymbol],
171
+ status: Lithic::AccountActivityListParams::Status::OrSymbol,
186
172
  request_options: Lithic::RequestOptions
187
173
  }
188
174
  )
@@ -272,6 +258,7 @@ module Lithic
272
258
  end
273
259
  end
274
260
 
261
+ # Filter by transaction result
275
262
  module Result
276
263
  extend Lithic::Internal::Type::Enum
277
264
 
@@ -301,6 +288,7 @@ module Lithic
301
288
  end
302
289
  end
303
290
 
291
+ # Filter by transaction status
304
292
  module Status
305
293
  extend Lithic::Internal::Type::Enum
306
294
 
@@ -325,24 +313,24 @@ module Lithic
325
313
  :PENDING,
326
314
  Lithic::AccountActivityListParams::Status::TaggedSymbol
327
315
  )
328
- SETTLED =
316
+ RETURNED =
329
317
  T.let(
330
- :SETTLED,
318
+ :RETURNED,
331
319
  Lithic::AccountActivityListParams::Status::TaggedSymbol
332
320
  )
333
- VOIDED =
321
+ REVERSED =
334
322
  T.let(
335
- :VOIDED,
323
+ :REVERSED,
336
324
  Lithic::AccountActivityListParams::Status::TaggedSymbol
337
325
  )
338
- RETURNED =
326
+ SETTLED =
339
327
  T.let(
340
- :RETURNED,
328
+ :SETTLED,
341
329
  Lithic::AccountActivityListParams::Status::TaggedSymbol
342
330
  )
343
- REVERSED =
331
+ VOIDED =
344
332
  T.let(
345
- :REVERSED,
333
+ :VOIDED,
346
334
  Lithic::AccountActivityListParams::Status::TaggedSymbol
347
335
  )
348
336