Class: Increase::Resources::Transactions
- Inherits:
-
Object
- Object
- Increase::Resources::Transactions
- Defined in:
- lib/increase/resources/transactions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Transactions
constructor
private
A new instance of Transactions.
-
#list(account_id: nil, category: nil, created_at: nil, cursor: nil, limit: nil, route_id: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Transaction>
Some parameter documentations has been truncated, see Models::TransactionListParams for more details.
-
#retrieve(transaction_id, request_options: {}) ⇒ Increase::Models::Transaction
Retrieve a Transaction.
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.
65 66 67 |
# File 'lib/increase/resources/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::Transaction>
Some parameter documentations has been truncated, see Models::TransactionListParams for more details.
List Transactions
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/increase/resources/transactions.rb', line 50 def list(params = {}) parsed, = Increase::TransactionListParams.dump_request(params) @client.request( method: :get, path: "transactions", query: parsed, page: Increase::Internal::Page, model: Increase::Transaction, options: ) end |
#retrieve(transaction_id, request_options: {}) ⇒ Increase::Models::Transaction
Retrieve a Transaction
17 18 19 20 21 22 23 24 |
# File 'lib/increase/resources/transactions.rb', line 17 def retrieve(transaction_id, params = {}) @client.request( method: :get, path: ["transactions/%1$s", transaction_id], model: Increase::Transaction, options: params[:request_options] ) end |