mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
feat: process pending transactions from lunchflow (#731)
* feat(config): add Lunchflow runtime configuration flags * feat(api): add include_pending parameter to Lunchflow API * feat(processor): add pending metadata support to Lunchflow processor * feat(processor): generate temporary IDs for pending transactions * feat(importer): integrate pending transaction support in sync * fix(importer): improve deduplication for transactions without IDs * feat(model): add Lunchflow pending support to Transaction scopes * test: add Lunchflow processor pending metadata tests * docs: update AGENTS.md for Lunchflow pending support * chore: remove unused variable * fix: simplify key check * fix: dotenv-linter key order * fix: avoid collapsing distinct pending transactions * fix: prevent unbounded raw payload growth for blank IDs
This commit is contained in:
@@ -30,8 +30,8 @@ class Provider::Lunchflow
|
||||
|
||||
# Get transactions for a specific account
|
||||
# Returns: { transactions: [...], total: N }
|
||||
# Transaction structure: { id, accountId, amount, currency, date, merchant, description }
|
||||
def get_account_transactions(account_id, start_date: nil, end_date: nil)
|
||||
# Transaction structure: { id, accountId, amount, currency, date, merchant, description, isPending }
|
||||
def get_account_transactions(account_id, start_date: nil, end_date: nil, include_pending: false)
|
||||
query_params = {}
|
||||
|
||||
if start_date
|
||||
@@ -42,6 +42,10 @@ class Provider::Lunchflow
|
||||
query_params[:end_date] = end_date.to_date.to_s
|
||||
end
|
||||
|
||||
if include_pending
|
||||
query_params[:include_pending] = true
|
||||
end
|
||||
|
||||
path = "/accounts/#{ERB::Util.url_encode(account_id.to_s)}/transactions"
|
||||
path += "?#{URI.encode_www_form(query_params)}" unless query_params.empty?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user