From 1df2426a41be45dd5f840f5bbc61caf9e7d888e9 Mon Sep 17 00:00:00 2001 From: Kyle Le Date: Wed, 6 Mar 2024 22:47:13 +0700 Subject: [PATCH] Update trigger_invoice_dry_run --- lib/killbill_client/models/invoice.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/killbill_client/models/invoice.rb b/lib/killbill_client/models/invoice.rb index 05e0dd9..54fd9bf 100644 --- a/lib/killbill_client/models/invoice.rb +++ b/lib/killbill_client/models/invoice.rb @@ -94,21 +94,22 @@ def trigger_invoice(account_id, target_date, user = nil, reason = nil, comment = end end - def trigger_invoice_dry_run(account_id, target_date, upcoming_invoice_target_date, options = {}) + def trigger_invoice_dry_run(account_id, target_date, upcoming_invoice_target_date, plugin_property = [], user = nil, reason = nil, comment = nil, options = {}) dry_run = InvoiceDryRunAttributes.new dry_run.dry_run_type = upcoming_invoice_target_date ? 'UPCOMING_INVOICE' : 'TARGET_DATE' query_map = {:accountId => account_id} query_map[:targetDate] = target_date if target_date != nil + query_map[:pluginProperty] = plugin_property unless plugin_property.blank? res = post "#{KILLBILL_API_DRY_RUN_INVOICES_PREFIX}", dry_run.to_json, query_map, { - :user => 'trigger_invoice_dry_run', - :reason => '', - :comment => '', + :user => user || 'trigger_invoice_dry_run', + :reason => reason, + :comment => comment, }.merge(options), Invoice