Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/killbill_client/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,13 @@ def cancel_subscription_dry_run(account_id, bundle_id, subscription_id, target_d
def get_invoice_template(is_manual_pay, locale = nil, options = {})

require_multi_tenant_options!(options, "Retrieving an invoice template supported in multi-tenant mode")
locale ||= 'en'

get "#{KILLBILL_API_INVOICES_PREFIX}/#{is_manual_pay ? "manualPayTemplate/#{locale}" : "template"}",
# Manual-pay templates are tenant-scoped, not locale-scoped. Keep the
# locale argument for backwards compatibility with callers, but don't
# include it in the endpoint path.
template_path = is_manual_pay ? "manualPayTemplate" : "template"

get "#{KILLBILL_API_INVOICES_PREFIX}/#{template_path}",
{},
{
:head => {'Accept' => 'text/html'},
Expand Down
Loading