Skip to content

Commit

Permalink
Merge pull request #98 from tungleduyxyz/issue_89_sync_invoice_dry_ru…
Browse files Browse the repository at this point in the history
…n_api

Update trigger_invoice_dry_run
  • Loading branch information
tungleduyxyz authored Mar 9, 2024
2 parents b52f8c6 + 1df2426 commit d85f39b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/killbill_client/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d85f39b

Please sign in to comment.