Skip to content

Commit

Permalink
Merge pull request #204 from getlago/feat/invoice-require-successful-…
Browse files Browse the repository at this point in the history
…payment

feat: add invoice require successful payment field
  • Loading branch information
brunomiguelpinto authored Aug 5, 2024
2 parents f2f6669 + 30e4ee1 commit 9634444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/lago/api/resources/wallet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def whitelist_params(params)
granted_credits: params[:granted_credits],
currency: params[:currency],
expiration_at: params[:expiration_at],
invoice_requires_successful_payment: params[:invoice_requires_successful_payment],
}.compact

recurring_rules = whitelist_recurring_rules(params[:recurring_transaction_rules])
Expand All @@ -38,6 +39,7 @@ def whitelist_recurring_rules(rules)
:paid_credits,
:granted_credits,
:threshold_credits,
:invoice_requires_successful_payment,
:trigger,
:interval,
:method,
Expand Down
3 changes: 2 additions & 1 deletion lib/lago/api/resources/wallet_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def whitelist_params(params)
wallet_id: params[:wallet_id],
paid_credits: params[:paid_credits],
granted_credits: params[:granted_credits],
voided_credits: params[:voided_credits]
voided_credits: params[:voided_credits],
invoice_requires_successful_payment: params[:invoice_requires_successful_payment],
}.compact
}
end
Expand Down

0 comments on commit 9634444

Please sign in to comment.