Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(invoices): Add open status #2330

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

julienbourdeau
Copy link
Contributor

Description

The open status is a technical status just like generating. It's used in different upcoming feature.

open invoices means:

  • invoice cannot be edited (unlike draft)
  • invoice is not visible (not via API nor GQL)
  • invoice is payable

Copy link
Collaborator

@rsempe rsempe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@julienbourdeau julienbourdeau changed the title Add open status feat(invoices): Add open status Jul 24, 2024
@julienbourdeau julienbourdeau merged commit 4017dbf into main Jul 24, 2024
6 checks passed
@julienbourdeau julienbourdeau deleted the feat-introduce-invoice-open-status branch July 24, 2024 08:58
julienbourdeau added a commit that referenced this pull request Jul 29, 2024
…wallet-related models (#2326)

## Description

We're introducing a way to topup your wallet without an invoice. The
invoice is only generated after the payment is made.

Internally, when the wallet transaction is initialized, we'll create [an
`open` invoice](#2330), which is
invisible and doesn't have a number yet. This invoice can be paid. Once
it's paid it's going to be finalized. (see #2336)

This PR introduce a parameter to control this behavior.

* When a `WalletTransaction` is created, the
`invoice_require_successful_payment` attribute can be set explicitly.
 * If not set, it follows the `Wallet` configuration
* When a wallet `RecurringTransactionRule` is created, the
`invoice_require_successful_payment` attribute can be set explicitly.
  * If not set, it follows the `Wallet` configuration
* When a `WalletTransaction` is created from a
`RecurringTransactionRule`, the invoice_require_successful_payment` is
always read from the rule.
* All three models default to `false` in the DB
abdussamadbello pushed a commit to abdussamadbello/lago-api that referenced this pull request Aug 8, 2024
## Description

The open status is a technical status just like `generating`. It's used
in different upcoming feature.

`open` invoices means:
* invoice cannot be edited (unlike `draft`)
* invoice is not visible (not via API nor GQL)
* invoice is payable
abdussamadbello pushed a commit to abdussamadbello/lago-api that referenced this pull request Aug 8, 2024
…wallet-related models (getlago#2326)

## Description

We're introducing a way to topup your wallet without an invoice. The
invoice is only generated after the payment is made.

Internally, when the wallet transaction is initialized, we'll create [an
`open` invoice](getlago#2330), which is
invisible and doesn't have a number yet. This invoice can be paid. Once
it's paid it's going to be finalized. (see getlago#2336)

This PR introduce a parameter to control this behavior.

* When a `WalletTransaction` is created, the
`invoice_require_successful_payment` attribute can be set explicitly.
 * If not set, it follows the `Wallet` configuration
* When a wallet `RecurringTransactionRule` is created, the
`invoice_require_successful_payment` attribute can be set explicitly.
  * If not set, it follows the `Wallet` configuration
* When a `WalletTransaction` is created from a
`RecurringTransactionRule`, the invoice_require_successful_payment` is
always read from the rule.
* All three models default to `false` in the DB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants