Class: Lithic::Resources::DisputesV2

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DisputesV2

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

Parameters:



69
70
71
# File 'lib/lithic/resources/disputes_v2.rb', line 69

def initialize(client:)
  @client = client
end

Instance Method Details

#list(account_token: nil, begin_: nil, card_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::DisputeV2>

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

Returns a paginated list of disputes.

Parameters:

  • account_token (String)

    Filter by account token.

  • begin_ (Time)

    RFC 3339 timestamp for filtering by created date, inclusive.

  • card_token (String)

    Filter by card token.

  • disputed_transaction_token (String)

    Filter by the token of the transaction being disputed. Corresponds with transact

  • end_ (Time)

    RFC 3339 timestamp for filtering by created date, inclusive.

  • ending_before (String)

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

  • page_size (Integer)

    Number of items to return.

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



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/lithic/resources/disputes_v2.rb', line 54

def list(params = {})
  parsed, options = Lithic::DisputesV2ListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "v2/disputes",
    query: parsed.transform_keys(begin_: "begin", end_: "end"),
    page: Lithic::Internal::CursorPage,
    model: Lithic::DisputeV2,
    options: options
  )
end

#retrieve(dispute_token, request_options: {}) ⇒ Lithic::Models::DisputeV2

Retrieves a specific dispute by its token.

Parameters:

  • dispute_token (String)

    Token of the dispute to retrieve.

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

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/lithic/resources/disputes_v2.rb', line 17

def retrieve(dispute_token, params = {})
  @client.request(
    method: :get,
    path: ["v2/disputes/%1$s", dispute_token],
    model: Lithic::DisputeV2,
    options: params[:request_options]
  )
end