Class: Ibanity::PontoConnect::Transaction
- Inherits:
-
BaseResource
- Object
- OpenStruct
- BaseResource
- Ibanity::PontoConnect::Transaction
- Defined in:
- lib/ibanity/api/ponto_connect/transaction.rb
Class Method Summary collapse
- .find(access_token:, account_id:, id:) ⇒ Object
- .list(access_token:, account_id: nil, synchronization_id: nil, **query_params) ⇒ Object
Methods inherited from BaseResource
create_by_uri, create_file_by_uri, destroy_by_uri, find_by_uri, find_file_by_uri, find_raw_by_uri, #initialize, list_by_uri, #reload!, update_by_uri
Constructor Details
This class inherits a constructor from Ibanity::BaseResource
Class Method Details
.find(access_token:, account_id:, id:) ⇒ Object
16 17 18 19 |
# File 'lib/ibanity/api/ponto_connect/transaction.rb', line 16 def self.find(access_token:, account_id:, id:) uri = Ibanity.ponto_connect_api_schema["account"]["transactions"].sub("{accountId}", account_id).sub("{transactionId}", id) find_by_uri(uri: uri, customer_access_token: access_token) end |
.list(access_token:, account_id: nil, synchronization_id: nil, **query_params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ibanity/api/ponto_connect/transaction.rb', line 4 def self.list(access_token:, account_id: nil, synchronization_id: nil, **query_params) uri = if synchronization_id Ibanity.ponto_connect_api_schema["synchronization"]["updatedTransactions"] .sub("{synchronizationId}", synchronization_id) else Ibanity.ponto_connect_api_schema["account"]["transactions"] .sub("{accountId}", account_id) .sub("{transactionId}", "") end list_by_uri(uri: uri, query_params: query_params, customer_access_token: access_token) end |