diff --git a/lib/lago/api/resources/customer.rb b/lib/lago/api/resources/customer.rb index 15ae124..723d462 100644 --- a/lib/lago/api/resources/customer.rb +++ b/lib/lago/api/resources/customer.rb @@ -72,6 +72,7 @@ def whitelist_params(params) currency: params[:currency], tax_codes: params[:tax_codes], timezone: params[:timezone], + finalize_zero_amount_invoice: params[:finalize_zero_amount_invoice], } whitelist_billing_configuration(params[:billing_configuration]).tap do |config| diff --git a/lib/lago/api/resources/organization.rb b/lib/lago/api/resources/organization.rb index 70cc24f..923840f 100644 --- a/lib/lago/api/resources/organization.rb +++ b/lib/lago/api/resources/organization.rb @@ -32,6 +32,7 @@ def whitelist_params(params) email_settings: params[:email_settings], document_numbering: params[:document_numbering], document_number_prefix: params[:document_number_prefix], + finalize_zero_amount_invoice: params[:finalize_zero_amount_invoice], }.compact whitelist_billing_configuration(params[:billing_configuration]).tap do |config| diff --git a/spec/factories/customer.rb b/spec/factories/customer.rb index a9ec8df..6b54d5a 100644 --- a/spec/factories/customer.rb +++ b/spec/factories/customer.rb @@ -18,6 +18,7 @@ legal_number { '49-008-2965' } net_payment_term { nil } tax_identification_number { 'EU123456789' } + finalize_zero_amount_invoice { 'inherit' } billing_configuration do { invoice_grace_period: 3, diff --git a/spec/fixtures/api/customer.json b/spec/fixtures/api/customer.json index c851ba4..e6d237a 100644 --- a/spec/fixtures/api/customer.json +++ b/spec/fixtures/api/customer.json @@ -21,6 +21,7 @@ "currency": "EUR", "timezone": "Europe/Paris", "applicable_timezone": "Europe/Paris", + "finalize_zero_amount_invoice": "inherit", "billing_configuration": { "invoice_grace_period": 3, "payment_provider": "stripe", diff --git a/spec/fixtures/api/organization.json b/spec/fixtures/api/organization.json index 277ff64..3eb7b88 100644 --- a/spec/fixtures/api/organization.json +++ b/spec/fixtures/api/organization.json @@ -21,6 +21,7 @@ "timezone": "America/New_York", "document_numbering": "per_customer", "document_number_prefix": "ORG-1234", + "finalize_zero_amount_invoice": true, "billing_configuration": { "invoice_footer": null, "invoice_grace_period": 3,