Class: Lithic::Resources::Fraud::Transactions

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/fraud/transactions.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Transactions

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

Parameters:



63
64
65
# File 'lib/lithic/resources/fraud/transactions.rb', line 63

def initialize(client:)
  @client = client
end

Instance Method Details

#report(transaction_token, fraud_status:, comment: nil, fraud_type: nil, request_options: {}) ⇒ Lithic::Models::Fraud::TransactionReportResponse

Some parameter documentations has been truncated, see Models::Fraud::TransactionReportParams for more details.

Report fraud for a specific transaction token by providing details such as fraud type, fraud status, and any additional comments.

Parameters:

Returns:

See Also:



49
50
51
52
53
54
55
56
57
58
# File 'lib/lithic/resources/fraud/transactions.rb', line 49

def report(transaction_token, params)
  parsed, options = Lithic::Fraud::TransactionReportParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v1/fraud/transactions/%1$s", transaction_token],
    body: parsed,
    model: Lithic::Models::Fraud::TransactionReportResponse,
    options: options
  )
end

#retrieve(transaction_token, request_options: {}) ⇒ Lithic::Models::Fraud::TransactionRetrieveResponse

Retrieve a fraud report for a specific transaction identified by its unique transaction token.

Parameters:

  • transaction_token (String)

    The token of the transaction that the enhanced data is associated with.

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

Returns:

See Also:



19
20
21
22
23
24
25
26
# File 'lib/lithic/resources/fraud/transactions.rb', line 19

def retrieve(transaction_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/fraud/transactions/%1$s", transaction_token],
    model: Lithic::Models::Fraud::TransactionRetrieveResponse,
    options: params[:request_options]
  )
end