Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getlago/lago-api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.32.2
Choose a base ref
...
head repository: getlago/lago-api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.32.3
Choose a head ref
  • 11 commits
  • 58 files changed
  • 5 contributors

Commits on Aug 7, 2025

  1. Feat(fixed_charges): Move AmountDetails to ChargeModels namespace (

    …#4098)
    
    ## Roadmap Task
    
    👉
    https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices
    
    👉
    https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges
    
     ## Context
    
    What is the current situation?
    
    **Option 1:** User has to create a one off invoice alongside the
    subscription, it will create 2 different invoices.
    
    **Option 2:** User can add a recurring billable metric and use event to
    have this fee invoice on subscription renewal, but it won’t appear on
    the first billing subscription.
    
    What problem are we trying to solve?
    
    At subscription creation or afterward, there is no clear way to invoice
    a fixed fee that is not tied to events, aside from the subscription fee
    itself. This fee could be either a one-time charge or a recurring one.
    
     ## Description
    
    - Move `AmountDetails` services from `Charges` to `ChargeModels`
    namespace
    ancorcruz authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    715806a View commit details
    Browse the repository at this point in the history
  2. fix(invoice): Voided invoice is disputable as well (#4107)

    ## Context
    
    Voided invoice should be disputable as well.
    
    ## Description
    
    Change `Invoice#payment_dispute_losable?` method to return true even if
    invoice is voided.
    ivannovosad authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    68ffb23 View commit details
    Browse the repository at this point in the history
  3. misc(event): Add missing results on events services (#4110)

    ## Description
    
    This PR defines the `Result` object for all Events services, the goal is
    to avoid relying on the Legacy base result as it uses `OpenStruct`
    internally and is knows to cause memory issues
    vincent-pochet authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    1faf748 View commit details
    Browse the repository at this point in the history
  4. Fix get tax regenerate invoice (#4108)

    ## Context
    
    When regenerating an invoice from a voided one, the process to get taxes
    if the external provider is done in async way, so if taxes are pending,
    we can save the invoice because it will be finalized by another job when
    we have the taxes back
    
    We want to allow the regeneration process to proceed and persist the
    invoice with a tax_status of "pending", so users or automated systems
    can later inspect or correct the issue.
    brunomiguelpinto authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    991236b View commit details
    Browse the repository at this point in the history
  5. Feat(fixed_charges): Extract ChargeModel::FilterPropertiesService (#4100

    )
    
    ## Roadmap Task
    
    👉
    https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices
    
    👉
    https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges
    
     ## Context
    
    What is the current situation?
    
    **Option 1:** User has to create a one off invoice alongside the
    subscription, it will create 2 different invoices.
    
    **Option 2:** User can add a recurring billable metric and use event to
    have this fee invoice on subscription renewal, but it won’t appear on
    the first billing subscription.
    
    What problem are we trying to solve?
    
    At subscription creation or afterward, there is no clear way to invoice
    a fixed fee that is not tied to events, aside from the subscription fee
    itself. This fee could be either a one-time charge or a recurring one.
    
     ## Description
    
    - Extract `FilterChargeModelPropertiesService` from `Charges` namespace
    to `ChargeModels` namespace. Also, ensure it supports different
    chargeable types like `charge` and `fixed_charge`
    ancorcruz authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    ed9eec3 View commit details
    Browse the repository at this point in the history
  6. Feat(fixed_charges): Extract chargeable validation service (#4109)

    ## Roadmap Task
    
    👉
    https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices
    
    👉
    https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges
    
    ## Context
    
     What is the current situation?
    
     **Option 1:** User has to create a one off invoice alongside the
     subscription, it will create 2 different invoices.
    
     **Option 2:** User can add a recurring billable metric and use event to
     have this fee invoice on subscription renewal, but it won’t appear on
     the first billing subscription.
    
     What problem are we trying to solve?
    
     At subscription creation or afterward, there is no clear way to invoice
     a fixed fee that is not tied to events, aside from the subscription fee
     itself. This fee could be either a one-time charge or a recurring one.
    
    ## Description
    
      Add `Plans::ChargeablesValidationService` to validate billable metrics
      and add ons for charges and fixed charges on plans creation params.
    ancorcruz authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    84ade9f View commit details
    Browse the repository at this point in the history
  7. REVERT: Projected usage feature on API (#4112)

    ## Context
    
    Investigate if this is the cause of the RAM spike
    
    ## Description
    
    Changed the calculations to return fixed values when called from outside the API controller
    murparreira authored Aug 7, 2025
    Configuration menu
    Copy the full SHA
    12ac27c View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2025

  1. Feat(fixed_charges): Add FixedCharges::CreateService (#4113)

    ## Roadmap Task
    
    👉
    https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices
    
    👉
    https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges
    
     ## Context
    
     What is the current situation?
    
     **Option 1:** User has to create a one off invoice alongside the
     subscription, it will create 2 different invoices.
    
     **Option 2:** User can add a recurring billable metric and use event to
     have this fee invoice on subscription renewal, but it won’t appear on
     the first billing subscription.
    
     What problem are we trying to solve?
    
     At subscription creation or afterward, there is no clear way to invoice
     a fixed fee that is not tied to events, aside from the subscription fee
     itself. This fee could be either a one-time charge or a recurring one.
    
     ## Description
    
     Add `FixedCharges::CreateService` to handle fixed charge creation:
    
     * accepts add_on id and code
     * apply default properties based on fixed charge's charge model
     * filter properties based on the charge model
     * apply taxes to the fixed charge
    ancorcruz authored Aug 8, 2025
    Configuration menu
    Copy the full SHA
    daf56d8 View commit details
    Browse the repository at this point in the history
  2. fix(subscription-service): Fix potential race condition (#4117)

    ## Context
    
    There is a potential race condition when terminating a subscription.
    This job is called before invoice is created (transaction is not
    committed yet):
    
    ```
    GeneratePdfAndNotifyJob.perform_later(invoice:, email: should_deliver_finalized_email?)
    ```
    
    ## Description
    
    Call all the webhooks and other dependent jobs `after_commit`.
    ivannovosad authored Aug 8, 2025
    Configuration menu
    Copy the full SHA
    4206a63 View commit details
    Browse the repository at this point in the history
  3. Feat(fixed_charges): Plans::CreateService creates fixed charges (#4116)

    ## Roadmap Task
    
    👉
    https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices
    
    👉
    https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges
    
     ## Context
    
     What is the current situation?
    
     **Option 1:** User has to create a one off invoice alongside the
     subscription, it will create 2 different invoices.
    
     **Option 2:** User can add a recurring billable metric and use event to
     have this fee invoice on subscription renewal, but it won’t appear on
     the first billing subscription.
    
     What problem are we trying to solve?
    
     At subscription creation or afterward, there is no clear way to invoice
     a fixed fee that is not tied to events, aside from the subscription fee
     itself. This fee could be either a one-time charge or a recurring one.
    
     ## Description
    
     Updates `Plans::CreateService` to:
       - persist `bill_fixed_charges_monthly`
       - create fixed charges records with `FixedCharges::CreateService`
       - add fixed charge counts in track plan created for Segment tracking
    ancorcruz authored Aug 8, 2025
    Configuration menu
    Copy the full SHA
    86d412d View commit details
    Browse the repository at this point in the history
  4. fix(charge-model-factory): Boolean param to only calculate the projec…

    …ted values when being called by the projection service (#4118)
    
    ## Context
    
    Related to the RAM increase after the projected usage feature was
    merged. This one complements the previous that added a boolean flag to
    only calculate the projected values from the right parts of the
    application.
    
    ## Description
    
    In the `ChargeModelFactory`, added a boolean attribute that is only
    `true` when coming from the `ProjectionService`.
    murparreira authored Aug 8, 2025
    Configuration menu
    Copy the full SHA
    8c42cb7 View commit details
    Browse the repository at this point in the history
Loading