From 70d596c7b78d683580bb0b4fd03d5924f8e4c070 Mon Sep 17 00:00:00 2001 From: Miguel Pinto Date: Fri, 16 Aug 2024 14:21:02 +0100 Subject: [PATCH] feat: add metadata to wallet transaction --- lib/lago/api/resources/wallet.rb | 2 ++ lib/lago/api/resources/wallet_transaction.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/lago/api/resources/wallet.rb b/lib/lago/api/resources/wallet.rb index eb5d175..d2881b8 100644 --- a/lib/lago/api/resources/wallet.rb +++ b/lib/lago/api/resources/wallet.rb @@ -21,6 +21,7 @@ def whitelist_params(params) granted_credits: params[:granted_credits], currency: params[:currency], expiration_at: params[:expiration_at], + transaction_metadata: params[:transaction_metadata], invoice_requires_successful_payment: params[:invoice_requires_successful_payment], }.compact @@ -45,6 +46,7 @@ def whitelist_recurring_rules(rules) :method, :started_at, :target_ongoing_balance, + :transaction_metadata ) processed_rules << result unless result.empty? diff --git a/lib/lago/api/resources/wallet_transaction.rb b/lib/lago/api/resources/wallet_transaction.rb index 78fd52f..ce838c9 100644 --- a/lib/lago/api/resources/wallet_transaction.rb +++ b/lib/lago/api/resources/wallet_transaction.rb @@ -27,6 +27,7 @@ def whitelist_params(params) granted_credits: params[:granted_credits], voided_credits: params[:voided_credits], invoice_requires_successful_payment: params[:invoice_requires_successful_payment], + metadata: params[:metadata], }.compact } end