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

Returns a new instance of DeclinedTransactions.



6
7
8
# File 'lib/increase/resources/declined_transactions.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::DeclinedTransaction>

List Declined Transactions

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :account_id (String)

    Filter Declined Transactions to ones belonging to the specified Account.

  • :category (Category)
  • :created_at (CreatedAt)
  • :cursor (String)

    Return the page of entries after this one.

  • :limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 objects.

  • :route_id (String)

    Filter Declined Transactions to those belonging to the specified route.

Returns:



38
39
40
41
42
43
44
45
46
# File 'lib/increase/resources/declined_transactions.rb', line 38

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/declined_transactions"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::DeclinedTransaction
  @client.request(req, opts)
end

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

Retrieve a Declined Transaction

Parameters:

  • declined_transaction_id (String)

    The identifier of the Declined Transaction.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



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

def retrieve(declined_transaction_id, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/declined_transactions/#{declined_transaction_id}"
  req[:model] = Increase::Models::DeclinedTransaction
  @client.request(req, opts)
end