Class: Increase::Resources::DeclinedTransactions

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/declined_transactions.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DeclinedTransactions

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

Parameters:



65
66
67
# File 'lib/increase/resources/declined_transactions.rb', line 65

def initialize(client:)
  @client = client
end

Instance Method Details

#list(account_id: nil, category: nil, created_at: nil, cursor: nil, limit: nil, route_id: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::DeclinedTransaction>

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

List Declined Transactions

Parameters:

Returns:

See Also:



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/increase/resources/declined_transactions.rb', line 50

def list(params = {})
  parsed, options = Increase::DeclinedTransactionListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "declined_transactions",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::DeclinedTransaction,
    options: options
  )
end

#retrieve(declined_transaction_id, request_options: {}) ⇒ Increase::Models::DeclinedTransaction

Retrieve a Declined Transaction

Parameters:

  • declined_transaction_id (String)

    The identifier of the Declined Transaction.

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

Returns:

See Also:



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

def retrieve(declined_transaction_id, params = {})
  @client.request(
    method: :get,
    path: ["declined_transactions/%1$s", declined_transaction_id],
    model: Increase::DeclinedTransaction,
    options: params[:request_options]
  )
end