Class: PapierkramApi::V1::Endpoints::Banking::Transactions

Inherits:
PapierkramApi::V1::Endpoints::Base show all
Defined in:
lib/papierkram_api/v1/endpoints/banking/transactions.rb

Overview

This class is responsible for all the API calls related to banking transactions.

Instance Attribute Summary

Attributes inherited from PapierkramApi::V1::Endpoints::Base

#client, #url_api_path

Instance Method Summary collapse

Methods inherited from PapierkramApi::V1::Endpoints::Base

#http_delete, #http_get, #http_patch, #http_post, #http_put, #initialize, #remaining_quota

Constructor Details

This class inherits a constructor from PapierkramApi::V1::Endpoints::Base

Instance Method Details

#all(bank_connection_id:, page: 1, page_size: 100, order_by: nil, order_direction: nil) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/papierkram_api/v1/endpoints/banking/transactions.rb', line 13

def all(bank_connection_id:,
        page: 1,
        page_size: 100,
        order_by: nil,
        order_direction: nil)
  query = {
    bank_connection_id: bank_connection_id,
    page: page,
    page_size: page_size
  }
  query[:order_by] = order_by if order_by
  query[:order_direction] = order_direction if order_direction

  http_get("#{@url_api_path}/banking/transactions", query)
end

#find_by(id:) ⇒ Object



9
10
11
# File 'lib/papierkram_api/v1/endpoints/banking/transactions.rb', line 9

def find_by(id:)
  http_get("#{@url_api_path}/banking/transactions/#{id}")
end