Class: Lithic::Resources::TransactionMonitoring::Queues

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/transaction_monitoring/queues.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Queues

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 Queues.

Parameters:



131
132
133
# File 'lib/lithic/resources/transaction_monitoring/queues.rb', line 131

def initialize(client:)
  @client = client
end

Instance Method Details

#create(name:, description: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::Queue

Creates a new queue for grouping transaction monitoring cases.

Parameters:

  • name (String)

    Human-readable name of the queue

  • description (String, nil)

    Optional description of the queue

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

Returns:

See Also:



20
21
22
23
24
25
26
27
28
29
# File 'lib/lithic/resources/transaction_monitoring/queues.rb', line 20

def create(params)
  parsed, options = Lithic::TransactionMonitoring::QueueCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/transaction_monitoring/queues",
    body: parsed,
    model: Lithic::TransactionMonitoring::Queue,
    options: options
  )
end

#delete(queue_token, request_options: {}) ⇒ nil

Deletes a transaction monitoring queue.

Parameters:

  • queue_token (String)

    Globally unique identifier for the queue.

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

Returns:

  • (nil)

See Also:



119
120
121
122
123
124
125
126
# File 'lib/lithic/resources/transaction_monitoring/queues.rb', line 119

def delete(queue_token, params = {})
  @client.request(
    method: :delete,
    path: ["v1/transaction_monitoring/queues/%1$s", queue_token],
    model: NilClass,
    options: params[:request_options]
  )
end

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

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

Lists transaction monitoring queues.

Parameters:

  • 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:



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/lithic/resources/transaction_monitoring/queues.rb', line 95

def list(params = {})
  parsed, options = Lithic::TransactionMonitoring::QueueListParams.dump_request(params)
  query = Lithic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "v1/transaction_monitoring/queues",
    query: query,
    page: Lithic::Internal::CursorPage,
    model: Lithic::TransactionMonitoring::Queue,
    options: options
  )
end

#retrieve(queue_token, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::Queue

Retrieves a single transaction monitoring queue.

Parameters:

  • queue_token (String)

    Globally unique identifier for the queue.

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

Returns:

See Also:



42
43
44
45
46
47
48
49
# File 'lib/lithic/resources/transaction_monitoring/queues.rb', line 42

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

#update(queue_token, description: nil, name: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::Queue

Updates a transaction monitoring queue.

Parameters:

  • queue_token (String)

    Globally unique identifier for the queue.

  • description (String, nil)

    New description for the queue, or ‘null` to clear it

  • name (String)

    New name for the queue

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

Returns:

See Also:



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

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