Skip to content

Commit

Permalink
Merge pull request #214 from getlago/feat-skip-zero-invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomiguelpinto authored Sep 6, 2024
2 parents 894ca40 + bd3e9e6 commit df4a580
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/lago/api/resources/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
1 change: 1 addition & 0 deletions lib/lago/api/resources/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
1 change: 1 addition & 0 deletions spec/factories/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/api/customer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/api/organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit df4a580

Please sign in to comment.