lithic 0.17.0 → 0.18.1

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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/type/union.rb +7 -21
  5. data/lib/lithic/models/auth_rules/rule_feature.rb +291 -2
  6. data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
  7. data/lib/lithic/models/card_authorization.rb +7 -6
  8. data/lib/lithic/models/claim_created_webhook_event.rb +190 -0
  9. data/lib/lithic/models/claim_document_accepted_webhook_event.rb +175 -0
  10. data/lib/lithic/models/claim_document_rejected_webhook_event.rb +175 -0
  11. data/lib/lithic/models/claim_document_uploaded_webhook_event.rb +175 -0
  12. data/lib/lithic/models/claim_updated_webhook_event.rb +190 -0
  13. data/lib/lithic/models/event.rb +23 -0
  14. data/lib/lithic/models/event_list_params.rb +14 -0
  15. data/lib/lithic/models/event_subscription.rb +14 -0
  16. data/lib/lithic/models/events/subscription_create_params.rb +14 -0
  17. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +5 -0
  18. data/lib/lithic/models/events/subscription_update_params.rb +14 -0
  19. data/lib/lithic/models/parsed_webhook_event.rb +11 -1
  20. data/lib/lithic/models/transaction_monitoring/case_transaction.rb +120 -43
  21. data/lib/lithic/models.rb +10 -0
  22. data/lib/lithic/resources/transaction_monitoring/cases.rb +1 -1
  23. data/lib/lithic/resources/webhooks.rb +1 -1
  24. data/lib/lithic/version.rb +1 -1
  25. data/lib/lithic.rb +5 -0
  26. data/rbi/lithic/models/auth_rules/rule_feature.rbi +686 -2
  27. data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +15 -3
  28. data/rbi/lithic/models/card_authorization.rbi +12 -10
  29. data/rbi/lithic/models/claim_created_webhook_event.rbi +386 -0
  30. data/rbi/lithic/models/claim_document_accepted_webhook_event.rbi +315 -0
  31. data/rbi/lithic/models/claim_document_rejected_webhook_event.rbi +315 -0
  32. data/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi +315 -0
  33. data/rbi/lithic/models/claim_updated_webhook_event.rbi +386 -0
  34. data/rbi/lithic/models/event.rbi +46 -0
  35. data/rbi/lithic/models/event_list_params.rbi +34 -0
  36. data/rbi/lithic/models/event_subscription.rbi +34 -0
  37. data/rbi/lithic/models/events/subscription_create_params.rbi +34 -0
  38. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +25 -0
  39. data/rbi/lithic/models/events/subscription_update_params.rbi +34 -0
  40. data/rbi/lithic/models/parsed_webhook_event.rbi +5 -0
  41. data/rbi/lithic/models/transaction_monitoring/case_transaction.rbi +151 -46
  42. data/rbi/lithic/models.rbi +13 -0
  43. data/rbi/lithic/resources/transaction_monitoring/cases.rbi +1 -1
  44. data/rbi/lithic/resources/webhooks.rbi +5 -0
  45. data/sig/lithic/models/auth_rules/rule_feature.rbs +252 -0
  46. data/sig/lithic/models/claim_created_webhook_event.rbs +169 -0
  47. data/sig/lithic/models/claim_document_accepted_webhook_event.rbs +131 -0
  48. data/sig/lithic/models/claim_document_rejected_webhook_event.rbs +131 -0
  49. data/sig/lithic/models/claim_document_uploaded_webhook_event.rbs +131 -0
  50. data/sig/lithic/models/claim_updated_webhook_event.rbs +169 -0
  51. data/sig/lithic/models/event.rbs +10 -0
  52. data/sig/lithic/models/event_list_params.rbs +10 -0
  53. data/sig/lithic/models/event_subscription.rbs +10 -0
  54. data/sig/lithic/models/events/subscription_create_params.rbs +10 -0
  55. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +10 -0
  56. data/sig/lithic/models/events/subscription_update_params.rbs +10 -0
  57. data/sig/lithic/models/parsed_webhook_event.rbs +5 -0
  58. data/sig/lithic/models/transaction_monitoring/case_transaction.rbs +93 -34
  59. data/sig/lithic/models.rbs +10 -0
  60. data/sig/lithic/resources/transaction_monitoring/cases.rbs +1 -1
  61. data/sig/lithic/resources/webhooks.rbs +5 -0
  62. metadata +17 -2
@@ -3,50 +3,127 @@
3
3
  module Lithic
4
4
  module Models
5
5
  module TransactionMonitoring
6
+ # A single transaction associated with a case. The `category` field identifies
7
+ # whether this is a card transaction or a payment transaction.
8
+ #
6
9
  # @see Lithic::Resources::TransactionMonitoring::Cases#list_transactions
7
- class CaseTransaction < Lithic::Internal::Type::BaseModel
8
- # @!attribute token
9
- # Globally unique identifier for the transaction
10
- #
11
- # @return [String]
12
- required :token, String
13
-
14
- # @!attribute account_token
15
- # Token of the account the transaction belongs to
16
- #
17
- # @return [String]
18
- required :account_token, String
19
-
20
- # @!attribute added_at
21
- # Date and time at which the transaction was added to the case
22
- #
23
- # @return [Time]
24
- required :added_at, Time
25
-
26
- # @!attribute card_token
27
- # Token of the card the transaction was made on
28
- #
29
- # @return [String]
30
- required :card_token, String
31
-
32
- # @!attribute transaction_created_at
33
- # Date and time at which the transaction was created
34
- #
35
- # @return [Time]
36
- required :transaction_created_at, Time
37
-
38
- # @!method initialize(token:, account_token:, added_at:, card_token:, transaction_created_at:)
39
- # A single transaction associated with a case
40
- #
41
- # @param token [String] Globally unique identifier for the transaction
42
- #
43
- # @param account_token [String] Token of the account the transaction belongs to
44
- #
45
- # @param added_at [Time] Date and time at which the transaction was added to the case
46
- #
47
- # @param card_token [String] Token of the card the transaction was made on
48
- #
49
- # @param transaction_created_at [Time] Date and time at which the transaction was created
10
+ module CaseTransaction
11
+ extend Lithic::Internal::Type::Union
12
+
13
+ discriminator :category
14
+
15
+ # A card transaction associated with a case
16
+ variant -> { Lithic::TransactionMonitoring::CaseTransaction::CardCaseTransaction }
17
+
18
+ # A payment (ACH) transaction associated with a case
19
+ variant -> { Lithic::TransactionMonitoring::CaseTransaction::PaymentCaseTransaction }
20
+
21
+ class CardCaseTransaction < Lithic::Internal::Type::BaseModel
22
+ # @!attribute token
23
+ # Globally unique identifier for the card transaction
24
+ #
25
+ # @return [String]
26
+ required :token, String
27
+
28
+ # @!attribute account_token
29
+ # Token of the account the transaction belongs to
30
+ #
31
+ # @return [String]
32
+ required :account_token, String
33
+
34
+ # @!attribute added_at
35
+ # Date and time at which the transaction was added to the case
36
+ #
37
+ # @return [Time]
38
+ required :added_at, Time
39
+
40
+ # @!attribute card_token
41
+ # Token of the card the transaction was made on
42
+ #
43
+ # @return [String]
44
+ required :card_token, String
45
+
46
+ # @!attribute category
47
+ #
48
+ # @return [Symbol, :CARD]
49
+ required :category, const: :CARD
50
+
51
+ # @!attribute transaction_created_at
52
+ # Date and time at which the transaction was created
53
+ #
54
+ # @return [Time]
55
+ required :transaction_created_at, Time
56
+
57
+ # @!method initialize(token:, account_token:, added_at:, card_token:, transaction_created_at:, category: :CARD)
58
+ # A card transaction associated with a case
59
+ #
60
+ # @param token [String] Globally unique identifier for the card transaction
61
+ #
62
+ # @param account_token [String] Token of the account the transaction belongs to
63
+ #
64
+ # @param added_at [Time] Date and time at which the transaction was added to the case
65
+ #
66
+ # @param card_token [String] Token of the card the transaction was made on
67
+ #
68
+ # @param transaction_created_at [Time] Date and time at which the transaction was created
69
+ #
70
+ # @param category [Symbol, :CARD]
71
+ end
72
+
73
+ class PaymentCaseTransaction < Lithic::Internal::Type::BaseModel
74
+ # @!attribute token
75
+ # Globally unique identifier for the payment transaction
76
+ #
77
+ # @return [String]
78
+ required :token, String
79
+
80
+ # @!attribute added_at
81
+ # Date and time at which the transaction was added to the case
82
+ #
83
+ # @return [Time]
84
+ required :added_at, Time
85
+
86
+ # @!attribute category
87
+ #
88
+ # @return [Symbol, :PAYMENT]
89
+ required :category, const: :PAYMENT
90
+
91
+ # @!attribute financial_account_token
92
+ # Token of the financial account the payment belongs to
93
+ #
94
+ # @return [String]
95
+ required :financial_account_token, String
96
+
97
+ # @!attribute transaction_created_at
98
+ # Date and time at which the transaction was created
99
+ #
100
+ # @return [Time]
101
+ required :transaction_created_at, Time
102
+
103
+ # @!attribute account_token
104
+ # Token of the account the payment belongs to, if applicable
105
+ #
106
+ # @return [String, nil]
107
+ optional :account_token, String
108
+
109
+ # @!method initialize(token:, added_at:, financial_account_token:, transaction_created_at:, account_token: nil, category: :PAYMENT)
110
+ # A payment (ACH) transaction associated with a case
111
+ #
112
+ # @param token [String] Globally unique identifier for the payment transaction
113
+ #
114
+ # @param added_at [Time] Date and time at which the transaction was added to the case
115
+ #
116
+ # @param financial_account_token [String] Token of the financial account the payment belongs to
117
+ #
118
+ # @param transaction_created_at [Time] Date and time at which the transaction was created
119
+ #
120
+ # @param account_token [String] Token of the account the payment belongs to, if applicable
121
+ #
122
+ # @param category [Symbol, :PAYMENT]
123
+ end
124
+
125
+ # @!method self.variants
126
+ # @return [Array(Lithic::Models::TransactionMonitoring::CaseTransaction::CardCaseTransaction, Lithic::Models::TransactionMonitoring::CaseTransaction::PaymentCaseTransaction)]
50
127
  end
51
128
  end
52
129
  end
data/lib/lithic/models.rb CHANGED
@@ -214,6 +214,16 @@ module Lithic
214
214
 
215
215
  CategoryDetails = Lithic::Models::CategoryDetails
216
216
 
217
+ ClaimCreatedWebhookEvent = Lithic::Models::ClaimCreatedWebhookEvent
218
+
219
+ ClaimDocumentAcceptedWebhookEvent = Lithic::Models::ClaimDocumentAcceptedWebhookEvent
220
+
221
+ ClaimDocumentRejectedWebhookEvent = Lithic::Models::ClaimDocumentRejectedWebhookEvent
222
+
223
+ ClaimDocumentUploadedWebhookEvent = Lithic::Models::ClaimDocumentUploadedWebhookEvent
224
+
225
+ ClaimUpdatedWebhookEvent = Lithic::Models::ClaimUpdatedWebhookEvent
226
+
217
227
  ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams
218
228
 
219
229
  CreditProducts = Lithic::Models::CreditProducts
@@ -178,7 +178,7 @@ module Lithic
178
178
  #
179
179
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
180
180
  #
181
- # @return [Lithic::Internal::CursorPage<Lithic::Models::TransactionMonitoring::CaseTransaction>]
181
+ # @return [Lithic::Internal::CursorPage<Lithic::Models::TransactionMonitoring::CaseTransaction::CardCaseTransaction, Lithic::Models::TransactionMonitoring::CaseTransaction::PaymentCaseTransaction>]
182
182
  #
183
183
  # @see Lithic::Models::TransactionMonitoring::CaseListTransactionsParams
184
184
  def list_transactions(case_token, params = {})
@@ -9,7 +9,7 @@ module Lithic
9
9
  # @param headers [Hash{String => String}] The webhook request headers
10
10
  # @param secret [String, nil] The webhook secret. If not provided, reads from LITHIC_WEBHOOK_SECRET environment variable.
11
11
  #
12
- # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] #
12
+ # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::ClaimCreatedWebhookEvent, Lithic::Models::ClaimUpdatedWebhookEvent, Lithic::Models::ClaimDocumentUploadedWebhookEvent, Lithic::Models::ClaimDocumentAcceptedWebhookEvent, Lithic::Models::ClaimDocumentRejectedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] #
13
13
  # @raise [ArgumentError] if secret is not provided and LITHIC_WEBHOOK_SECRET env var is not set
14
14
  # @raise [Lithic::Errors::MissingDependencyError] if the standardwebhooks gem is not installed
15
15
  # @raise [StandardWebhooks::WebhookVerificationError] if the signature is invalid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.17.0"
4
+ VERSION = "0.18.1"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -219,6 +219,11 @@ require_relative "lithic/models/card_web_provision_params"
219
219
  require_relative "lithic/models/card_web_provision_response"
220
220
  require_relative "lithic/models/carrier"
221
221
  require_relative "lithic/models/category_details"
222
+ require_relative "lithic/models/claim_created_webhook_event"
223
+ require_relative "lithic/models/claim_document_accepted_webhook_event"
224
+ require_relative "lithic/models/claim_document_rejected_webhook_event"
225
+ require_relative "lithic/models/claim_document_uploaded_webhook_event"
226
+ require_relative "lithic/models/claim_updated_webhook_event"
222
227
  require_relative "lithic/models/client_api_status_params"
223
228
  require_relative "lithic/models/credit_products/extended_credit"
224
229
  require_relative "lithic/models/credit_products/extended_credit_retrieve_params"