Skip to content

Commit 37af713

Browse files
feat(api): add transaction_monitoring with cases/comments/files/queues, refactor entity_type
1 parent 71ab28b commit 37af713

141 files changed

Lines changed: 7809 additions & 145 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 195
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-99f95bae0a9466a3c3032c867cae9878877c1602f2d68c2441813ce2c8dc8f87.yml
3-
openapi_spec_hash: 047fd5b9c00f6acddd3e4f5dc203a4ed
4-
config_hash: a0a579b0564a5c18568a78f5ba2b6653
1+
configured_endpoints: 213
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-65a6644277529a38afcac424d99d87cbfa4d8294423ad618dbbd875634ec1d3c.yml
3+
openapi_spec_hash: 6f3c1bb6a70830afb8af1dacd6352a97
4+
config_hash: 126e04f676f61e5871a82889336dbf9d

lib/lithic.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,40 @@
444444
require_relative "lithic/models/token_metadata"
445445
require_relative "lithic/models/transaction_expire_authorization_params"
446446
require_relative "lithic/models/transaction_list_params"
447+
require_relative "lithic/models/transaction_monitoring/case_activity_entry"
448+
require_relative "lithic/models/transaction_monitoring/case_activity_type"
449+
require_relative "lithic/models/transaction_monitoring/case_card"
450+
require_relative "lithic/models/transaction_monitoring/case_entity"
451+
require_relative "lithic/models/transaction_monitoring/case_list_activity_params"
452+
require_relative "lithic/models/transaction_monitoring/case_list_params"
453+
require_relative "lithic/models/transaction_monitoring/case_list_transactions_params"
454+
require_relative "lithic/models/transaction_monitoring/case_priority"
455+
require_relative "lithic/models/transaction_monitoring/case_retrieve_cards_params"
456+
require_relative "lithic/models/transaction_monitoring/case_retrieve_cards_response"
457+
require_relative "lithic/models/transaction_monitoring/case_retrieve_params"
458+
require_relative "lithic/models/transaction_monitoring/cases/case_file"
459+
require_relative "lithic/models/transaction_monitoring/cases/comment_create_params"
460+
require_relative "lithic/models/transaction_monitoring/cases/comment_delete_params"
461+
require_relative "lithic/models/transaction_monitoring/cases/comment_update_params"
462+
require_relative "lithic/models/transaction_monitoring/cases/file_create_params"
463+
require_relative "lithic/models/transaction_monitoring/cases/file_delete_params"
464+
require_relative "lithic/models/transaction_monitoring/cases/file_list_params"
465+
require_relative "lithic/models/transaction_monitoring/cases/file_retrieve_params"
466+
require_relative "lithic/models/transaction_monitoring/cases/file_status"
467+
require_relative "lithic/models/transaction_monitoring/cases/upload_constraints"
468+
require_relative "lithic/models/transaction_monitoring/case_sort_order"
469+
require_relative "lithic/models/transaction_monitoring/case_status"
470+
require_relative "lithic/models/transaction_monitoring/case_transaction"
471+
require_relative "lithic/models/transaction_monitoring/case_update_params"
472+
require_relative "lithic/models/transaction_monitoring/entity_type"
473+
require_relative "lithic/models/transaction_monitoring/monitoring_case"
474+
require_relative "lithic/models/transaction_monitoring/queue"
475+
require_relative "lithic/models/transaction_monitoring/queue_create_params"
476+
require_relative "lithic/models/transaction_monitoring/queue_delete_params"
477+
require_relative "lithic/models/transaction_monitoring/queue_list_params"
478+
require_relative "lithic/models/transaction_monitoring/queue_retrieve_params"
479+
require_relative "lithic/models/transaction_monitoring/queue_update_params"
480+
require_relative "lithic/models/transaction_monitoring/resolution_outcome"
447481
require_relative "lithic/models/transaction_retrieve_params"
448482
require_relative "lithic/models/transactions/enhanced_commercial_data_retrieve_params"
449483
require_relative "lithic/models/transactions/enhanced_commercial_data_retrieve_response"
@@ -525,6 +559,11 @@
525559
require_relative "lithic/resources/three_ds/decisioning"
526560
require_relative "lithic/resources/tokenization_decisioning"
527561
require_relative "lithic/resources/tokenizations"
562+
require_relative "lithic/resources/transaction_monitoring"
563+
require_relative "lithic/resources/transaction_monitoring/cases"
564+
require_relative "lithic/resources/transaction_monitoring/cases/comments"
565+
require_relative "lithic/resources/transaction_monitoring/cases/files"
566+
require_relative "lithic/resources/transaction_monitoring/queues"
528567
require_relative "lithic/resources/transactions"
529568
require_relative "lithic/resources/transactions/enhanced_commercial_data"
530569
require_relative "lithic/resources/transactions/events"

lib/lithic/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class Client < Lithic::Internal::Transport::BaseClient
3535
# @return [Lithic::Resources::AuthRules]
3636
attr_reader :auth_rules
3737

38+
# @return [Lithic::Resources::TransactionMonitoring]
39+
attr_reader :transaction_monitoring
40+
3841
# @return [Lithic::Resources::AuthStreamEnrollment]
3942
attr_reader :auth_stream_enrollment
4043

@@ -221,6 +224,7 @@ def initialize(
221224
@accounts = Lithic::Resources::Accounts.new(client: self)
222225
@account_holders = Lithic::Resources::AccountHolders.new(client: self)
223226
@auth_rules = Lithic::Resources::AuthRules.new(client: self)
227+
@transaction_monitoring = Lithic::Resources::TransactionMonitoring.new(client: self)
224228
@auth_stream_enrollment = Lithic::Resources::AuthStreamEnrollment.new(client: self)
225229
@tokenization_decisioning = Lithic::Resources::TokenizationDecisioning.new(client: self)
226230
@tokenizations = Lithic::Resources::Tokenizations.new(client: self)

lib/lithic/models.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ module Lithic
574574

575575
TransactionListParams = Lithic::Models::TransactionListParams
576576

577+
TransactionMonitoring = Lithic::Models::TransactionMonitoring
578+
577579
TransactionRetrieveParams = Lithic::Models::TransactionRetrieveParams
578580

579581
Transactions = Lithic::Models::Transactions

lib/lithic/models/account_holders/account_holder_entity.rb

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class AccountHolderEntity < Lithic::Internal::Type::BaseModel
6262
# @!attribute type
6363
# The type of entity
6464
#
65-
# @return [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Type]
66-
required :type, enum: -> { Lithic::AccountHolders::AccountHolderEntity::Type }
65+
# @return [Symbol, Lithic::Models::TransactionMonitoring::EntityType]
66+
required :type, enum: -> { Lithic::TransactionMonitoring::EntityType }
6767

6868
# @!method initialize(token:, account_holder_token:, address:, dob:, email:, first_name:, last_name:, phone_number:, status:, type:)
6969
# Information about an entity associated with an account holder
@@ -86,7 +86,7 @@ class AccountHolderEntity < Lithic::Internal::Type::BaseModel
8686
#
8787
# @param status [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Status] The status of the entity
8888
#
89-
# @param type [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Type] The type of entity
89+
# @param type [Symbol, Lithic::Models::TransactionMonitoring::EntityType] The type of entity
9090

9191
# @see Lithic::Models::AccountHolders::AccountHolderEntity#address
9292
class Address < Lithic::Internal::Type::BaseModel
@@ -162,19 +162,6 @@ module Status
162162
# @!method self.values
163163
# @return [Array<Symbol>]
164164
end
165-
166-
# The type of entity
167-
#
168-
# @see Lithic::Models::AccountHolders::AccountHolderEntity#type
169-
module Type
170-
extend Lithic::Internal::Type::Enum
171-
172-
BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL
173-
CONTROL_PERSON = :CONTROL_PERSON
174-
175-
# @!method self.values
176-
# @return [Array<Symbol>]
177-
end
178165
end
179166
end
180167

lib/lithic/models/account_holders/entity_create_params.rb

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class EntityCreateParams < Lithic::Internal::Type::BaseModel
6363
# @!attribute type
6464
# The type of entity to create on the account holder
6565
#
66-
# @return [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type]
67-
required :type, enum: -> { Lithic::AccountHolders::EntityCreateParams::Type }
66+
# @return [Symbol, Lithic::Models::TransactionMonitoring::EntityType]
67+
required :type, enum: -> { Lithic::TransactionMonitoring::EntityType }
6868

6969
# @!method initialize(account_holder_token:, address:, dob:, email:, first_name:, government_id:, last_name:, phone_number:, type:, request_options: {})
7070
# Some parameter documentations has been truncated, see
@@ -86,7 +86,7 @@ class EntityCreateParams < Lithic::Internal::Type::BaseModel
8686
#
8787
# @param phone_number [String] Individual's phone number, entered in E.164 format.
8888
#
89-
# @param type [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type] The type of entity to create on the account holder
89+
# @param type [Symbol, Lithic::Models::TransactionMonitoring::EntityType] The type of entity to create on the account holder
9090
#
9191
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
9292

@@ -149,17 +149,6 @@ class Address < Lithic::Internal::Type::BaseModel
149149
#
150150
# @param address2 [String] Unit or apartment number (if applicable).
151151
end
152-
153-
# The type of entity to create on the account holder
154-
module Type
155-
extend Lithic::Internal::Type::Enum
156-
157-
BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL
158-
CONTROL_PERSON = :CONTROL_PERSON
159-
160-
# @!method self.values
161-
# @return [Array<Symbol>]
162-
end
163152
end
164153
end
165154
end
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module TransactionMonitoring
6+
# @see Lithic::Resources::TransactionMonitoring::Cases#list_activity
7+
class CaseActivityEntry < Lithic::Internal::Type::BaseModel
8+
# @!attribute token
9+
# Globally unique identifier for the activity entry
10+
#
11+
# @return [String]
12+
required :token, String
13+
14+
# @!attribute actor_token
15+
# Identifier of the actor that produced the activity entry
16+
#
17+
# @return [String, nil]
18+
required :actor_token, String, nil?: true
19+
20+
# @!attribute created
21+
# Date and time at which the activity entry was created
22+
#
23+
# @return [Time]
24+
required :created, Time
25+
26+
# @!attribute entry_type
27+
# The case field that changed, or the action that was taken, in an activity entry:
28+
#
29+
# - `STATUS` - The case status changed
30+
# - `TITLE` - The case title changed
31+
# - `ASSIGNED_TO` - The case assignee changed
32+
# - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed
33+
# - `RESOLUTION_NOTES` - The resolution notes were set or changed
34+
# - `TAGS` - The case tags changed
35+
# - `PRIORITY` - The case priority changed
36+
# - `COMMENT` - A comment was added or edited
37+
# - `FILE` - A file was attached to the case
38+
#
39+
# @return [Symbol, Lithic::Models::TransactionMonitoring::CaseActivityType]
40+
required :entry_type, enum: -> { Lithic::TransactionMonitoring::CaseActivityType }
41+
42+
# @!attribute new_value
43+
# New value of the changed field, when applicable
44+
#
45+
# @return [String, nil]
46+
required :new_value, String, nil?: true
47+
48+
# @!attribute previous_value
49+
# Previous value of the changed field, when applicable
50+
#
51+
# @return [String, nil]
52+
required :previous_value, String, nil?: true
53+
54+
# @!method initialize(token:, actor_token:, created:, entry_type:, new_value:, previous_value:)
55+
# Some parameter documentations has been truncated, see
56+
# {Lithic::Models::TransactionMonitoring::CaseActivityEntry} for more details.
57+
#
58+
# A single entry in a case's activity feed
59+
#
60+
# @param token [String] Globally unique identifier for the activity entry
61+
#
62+
# @param actor_token [String, nil] Identifier of the actor that produced the activity entry
63+
#
64+
# @param created [Time] Date and time at which the activity entry was created
65+
#
66+
# @param entry_type [Symbol, Lithic::Models::TransactionMonitoring::CaseActivityType] The case field that changed, or the action that was taken, in an activity entry:
67+
#
68+
# @param new_value [String, nil] New value of the changed field, when applicable
69+
#
70+
# @param previous_value [String, nil] Previous value of the changed field, when applicable
71+
end
72+
end
73+
end
74+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module TransactionMonitoring
6+
# The case field that changed, or the action that was taken, in an activity entry:
7+
#
8+
# - `STATUS` - The case status changed
9+
# - `TITLE` - The case title changed
10+
# - `ASSIGNED_TO` - The case assignee changed
11+
# - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed
12+
# - `RESOLUTION_NOTES` - The resolution notes were set or changed
13+
# - `TAGS` - The case tags changed
14+
# - `PRIORITY` - The case priority changed
15+
# - `COMMENT` - A comment was added or edited
16+
# - `FILE` - A file was attached to the case
17+
module CaseActivityType
18+
extend Lithic::Internal::Type::Enum
19+
20+
STATUS = :STATUS
21+
TITLE = :TITLE
22+
ASSIGNED_TO = :ASSIGNED_TO
23+
RESOLUTION_OUTCOME = :RESOLUTION_OUTCOME
24+
RESOLUTION_NOTES = :RESOLUTION_NOTES
25+
TAGS = :TAGS
26+
PRIORITY = :PRIORITY
27+
COMMENT = :COMMENT
28+
FILE = :FILE
29+
30+
# @!method self.values
31+
# @return [Array<Symbol>]
32+
end
33+
end
34+
end
35+
end
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module TransactionMonitoring
6+
class CaseCard < Lithic::Internal::Type::BaseModel
7+
# @!attribute account_token
8+
# Token of the account the card belongs to
9+
#
10+
# @return [String]
11+
required :account_token, String
12+
13+
# @!attribute card_token
14+
# Token of the card
15+
#
16+
# @return [String]
17+
required :card_token, String
18+
19+
# @!attribute transaction_count
20+
# Number of the card's transactions associated with the case
21+
#
22+
# @return [Integer]
23+
required :transaction_count, Integer
24+
25+
# @!method initialize(account_token:, card_token:, transaction_count:)
26+
# Summary of a card's involvement in a case, aggregated across the case's
27+
# transactions
28+
#
29+
# @param account_token [String] Token of the account the card belongs to
30+
#
31+
# @param card_token [String] Token of the card
32+
#
33+
# @param transaction_count [Integer] Number of the card's transactions associated with the case
34+
end
35+
end
36+
end
37+
end
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module TransactionMonitoring
6+
class CaseEntity < Lithic::Internal::Type::BaseModel
7+
# @!attribute entity_token
8+
# Globally unique identifier for the associated entity
9+
#
10+
# @return [String]
11+
required :entity_token, String
12+
13+
# @!attribute entity_type
14+
# The type of entity a case is associated with:
15+
#
16+
# - `CARD` - The case is associated with a card
17+
# - `ACCOUNT` - The case is associated with an account
18+
#
19+
# @return [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType]
20+
required :entity_type, enum: -> { Lithic::TransactionMonitoring::CaseEntity::EntityType }
21+
22+
# @!method initialize(entity_token:, entity_type:)
23+
# Some parameter documentations has been truncated, see
24+
# {Lithic::Models::TransactionMonitoring::CaseEntity} for more details.
25+
#
26+
# The entity a case is associated with
27+
#
28+
# @param entity_token [String] Globally unique identifier for the associated entity
29+
#
30+
# @param entity_type [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] The type of entity a case is associated with:
31+
32+
# The type of entity a case is associated with:
33+
#
34+
# - `CARD` - The case is associated with a card
35+
# - `ACCOUNT` - The case is associated with an account
36+
#
37+
# @see Lithic::Models::TransactionMonitoring::CaseEntity#entity_type
38+
module EntityType
39+
extend Lithic::Internal::Type::Enum
40+
41+
CARD = :CARD
42+
ACCOUNT = :ACCOUNT
43+
44+
# @!method self.values
45+
# @return [Array<Symbol>]
46+
end
47+
end
48+
end
49+
end
50+
end

0 commit comments

Comments
 (0)