Class: Lithic::Resources::TransactionMonitoring::Cases

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/transaction_monitoring/cases.rb,
lib/lithic/resources/transaction_monitoring/cases/files.rb,
lib/lithic/resources/transaction_monitoring/cases/comments.rb

Defined Under Namespace

Classes: Comments, Files

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Cases

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Cases.

Parameters:



220
221
222
223
224
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 220

def initialize(client:)
  @client = client
  @comments = Lithic::Resources::TransactionMonitoring::Cases::Comments.new(client: client)
  @files = Lithic::Resources::TransactionMonitoring::Cases::Files.new(client: client)
end

Instance Attribute Details

#commentsLithic::Resources::TransactionMonitoring::Cases::Comments (readonly)



8
9
10
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 8

def comments
  @comments
end

#filesLithic::Resources::TransactionMonitoring::Cases::Files (readonly)



11
12
13
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 11

def files
  @files
end

Instance Method Details

#list(account_token: nil, assignee: nil, begin_: nil, card_token: nil, end_: nil, ending_before: nil, entity_token: nil, page_size: nil, queue_token: nil, rule_token: nil, sort_by: nil, starting_after: nil, status: nil, transaction_token: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::TransactionMonitoring::MonitoringCase>

Some parameter documentations has been truncated, see Models::TransactionMonitoring::CaseListParams for more details.

Lists transaction monitoring cases, optionally filtered.

Parameters:

  • account_token (String)

    Only return cases that include transactions on the provided account.

  • assignee (String)

    Only return cases assigned to the provided value. Pass an empty string to return

  • begin_ (Time)

    Date string in RFC 3339 format. Only entries created after the specified time wi

  • card_token (String)

    Only return cases that include transactions on the provided card.

  • end_ (Time)

    Date string in RFC 3339 format. Only entries created before the specified time w

  • ending_before (String)

    A cursor representing an item’s token before which a page of results should end.

  • entity_token (String)

    Only return cases associated with the provided entity.

  • page_size (Integer)

    Page size (for pagination).

  • queue_token (String)

    Only return cases belonging to the provided queue.

  • rule_token (String)

    Only return cases triggered by the provided transaction monitoring rule.

  • sort_by (Symbol, Lithic::Models::TransactionMonitoring::CaseSortOrder)

    Sort order for the returned cases.

  • starting_after (String)

    A cursor representing an item’s token after which a page of results should begin

  • status (Symbol, Lithic::Models::TransactionMonitoring::CaseStatus)

    Only return cases with the provided status.

  • transaction_token (String)

    Only return cases that include the provided transaction.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 116

def list(params = {})
  parsed, options = Lithic::TransactionMonitoring::CaseListParams.dump_request(params)
  query = Lithic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "v1/transaction_monitoring/cases",
    query: query.transform_keys(begin_: "begin", end_: "end"),
    page: Lithic::Internal::CursorPage,
    model: Lithic::TransactionMonitoring::MonitoringCase,
    options: options
  )
end

#list_activity(case_token, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::TransactionMonitoring::CaseActivityEntry>

Some parameter documentations has been truncated, see Models::TransactionMonitoring::CaseListActivityParams for more details.

Lists the activity feed for a case.

Parameters:

  • case_token (String)

    Globally unique identifier for the case.

  • ending_before (String)

    A cursor representing an item’s token before which a page of results should end.

  • page_size (Integer)

    Page size (for pagination).

  • starting_after (String)

    A cursor representing an item’s token after which a page of results should begin

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 150

def list_activity(case_token, params = {})
  parsed, options = Lithic::TransactionMonitoring::CaseListActivityParams.dump_request(params)
  query = Lithic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/transaction_monitoring/cases/%1$s/activity", case_token],
    query: query,
    page: Lithic::Internal::CursorPage,
    model: Lithic::TransactionMonitoring::CaseActivityEntry,
    options: options
  )
end

#list_transactions(case_token, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::TransactionMonitoring::CaseTransaction>

Some parameter documentations has been truncated, see Models::TransactionMonitoring::CaseListTransactionsParams for more details.

Lists the transactions associated with a case.

Parameters:

  • case_token (String)

    Globally unique identifier for the case.

  • ending_before (String)

    A cursor representing an item’s token before which a page of results should end.

  • page_size (Integer)

    Page size (for pagination).

  • starting_after (String)

    A cursor representing an item’s token after which a page of results should begin

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 184

def list_transactions(case_token, params = {})
  parsed, options = Lithic::TransactionMonitoring::CaseListTransactionsParams.dump_request(params)
  query = Lithic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/transaction_monitoring/cases/%1$s/transactions", case_token],
    query: query,
    page: Lithic::Internal::CursorPage,
    model: Lithic::TransactionMonitoring::CaseTransaction,
    options: options
  )
end

#retrieve(case_token, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::MonitoringCase

Retrieves a single transaction monitoring case.

Parameters:

  • case_token (String)

    Globally unique identifier for the case.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



24
25
26
27
28
29
30
31
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 24

def retrieve(case_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/transaction_monitoring/cases/%1$s", case_token],
    model: Lithic::TransactionMonitoring::MonitoringCase,
    options: params[:request_options]
  )
end

#retrieve_cards(case_token, request_options: {}) ⇒ Array<Lithic::Models::TransactionMonitoring::CaseCard>

Lists the cards involved in a case, with per-card transaction counts.

Parameters:

  • case_token (String)

    Globally unique identifier for the case.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



208
209
210
211
212
213
214
215
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 208

def retrieve_cards(case_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/transaction_monitoring/cases/%1$s/cards", case_token],
    model: Lithic::Internal::Type::ArrayOf[Lithic::TransactionMonitoring::CaseCard],
    options: params[:request_options]
  )
end

#update(case_token, actor_token: nil, assignee: nil, priority: nil, resolution: nil, resolution_notes: nil, sla_deadline: nil, status: nil, tags: nil, title: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::MonitoringCase

Some parameter documentations has been truncated, see Models::TransactionMonitoring::CaseUpdateParams for more details.

Updates a transaction monitoring case.

Parameters:

  • case_token (String)

    Globally unique identifier for the case.

  • actor_token (String)

    Optional client-provided identifier for the actor performing this action,

  • assignee (String, nil)

    New assignee for the case, or ‘null` to unassign

  • priority (Symbol, Lithic::Models::TransactionMonitoring::CasePriority)

    Priority level of a case, controlling queue ordering and SLA urgency

  • resolution (Symbol, Lithic::Models::TransactionMonitoring::ResolutionOutcome)

    Outcome recorded when a case is resolved:

  • resolution_notes (String)

    Notes describing the resolution

  • sla_deadline (Time, nil)

    New SLA deadline for the case, or ‘null` to clear it

  • status (Symbol, Lithic::Models::TransactionMonitoring::CaseStatus)

    Status of a case as it progresses through the review workflow:

  • tags (Hash{Symbol=>String})

    Arbitrary key-value metadata to set on the case

  • title (String, nil)

    New title for the case, or ‘null` to clear it

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



65
66
67
68
69
70
71
72
73
74
# File 'lib/lithic/resources/transaction_monitoring/cases.rb', line 65

def update(case_token, params = {})
  parsed, options = Lithic::TransactionMonitoring::CaseUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["v1/transaction_monitoring/cases/%1$s", case_token],
    body: parsed,
    model: Lithic::TransactionMonitoring::MonitoringCase,
    options: options
  )
end