From 4538f011296a36a8dff73ff249411c18617c5fd0 Mon Sep 17 00:00:00 2001 From: Reshma Bidikar <85998496+reshmabidikar@users.noreply.github.com> Date: Mon, 31 Aug 2026 13:18:07 +0530 Subject: [PATCH] fix for 1582 --- lib/killbill_client/models/invoice.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/killbill_client/models/invoice.rb b/lib/killbill_client/models/invoice.rb index 8832576..b736479 100644 --- a/lib/killbill_client/models/invoice.rb +++ b/lib/killbill_client/models/invoice.rb @@ -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'},