Commit Graph

35 Commits

Author SHA1 Message Date
Jorge Manrubia 5b2fa6b74a Remove nested if 2025-12-16 12:00:23 +01:00
Jorge Manrubia 2671e52821 Move presentation method to a regular view helper 2025-12-16 12:00:23 +01:00
Jorge Manrubia 8d11c62b7c Rename to stripe_session to avoid confusions 2025-12-16 12:00:23 +01:00
Jorge Manrubia 71369de38d Extract method 2025-12-16 12:00:23 +01:00
Jorge Manrubia b39a9ecab4 Make active_subscription a private method 2025-12-16 12:00:23 +01:00
Jorge Manrubia e47657759f More concise 2025-12-16 12:00:23 +01:00
Jorge Manrubia 20b5e57dd3 Prefer if/else over early return 2025-12-16 12:00:23 +01:00
Jorge Manrubia 973b4e4aed Rename param to remove redundant bit
Co-authored-by: Matt Almeida <matt7@hey.com>
2025-12-16 12:00:23 +01:00
Jorge Manrubia c0050415f5 This is needed for vat id collection 2025-12-16 12:00:23 +01:00
Jorge Manrubia f68aa0d947 Enable tax id collection 2025-12-16 12:00:23 +01:00
Jorge Manrubia 3395b8d6ed Grab and show the next amount to pay from Stripe 2025-12-16 12:00:23 +01:00
Jorge Manrubia 8dd31e3635 Add system to comp accounts 2025-12-16 12:00:23 +01:00
Jorge Manrubia 3ef5e4eeef Add record to track overridden limits
Before, we were relying on just changing the cards_count in account, but this
could create problems where the system to calculate the next card number fails due
to the unique constraint.
2025-12-16 12:00:23 +01:00
Jorge Manrubia 725e850802 Enable automatic taxes and calculate based on mandatory billing address
https://app.fizzy.do/5986089/cards/3465
2025-12-16 12:00:23 +01:00
Jorge Manrubia f4184e5a61 Remove redundant condition 2025-12-16 12:00:23 +01:00
Jorge Manrubia c8330a7be8 Don't prevent creating drafts, or you won't get to see the upgrade banner
Instead:

- Always let you create drafts when pressing "Add card"
- Prevent creations of published cards via API
- Prevent publication of cards in all cases when the limit is exceeded
2025-12-16 12:00:23 +01:00
Jason Zimdars 7a5e29699c Give this some padding 2025-12-16 12:00:23 +01:00
Jason Zimdars b19770c2a8 Show different things to non-admins 2025-12-16 12:00:23 +01:00
Jason Zimdars 6411268d7a More fancy apostrophes 2025-12-16 12:00:23 +01:00
Jason Zimdars b1a8b3c859 Layout 2025-12-16 12:00:23 +01:00
Jason Zimdars 5957ed6449 Typo 2025-12-16 12:00:23 +01:00
Jason Zimdars 9953508541 Fancy apostrophes 2025-12-16 12:00:23 +01:00
Jason Zimdars d556f051a6 Spelling 2025-12-16 12:00:23 +01:00
Jorge Manrubia e53455d2ca Paid plans never exceed limits! 2025-12-16 12:00:23 +01:00
Jorge Manrubia d5018cab23 Fix typo 2025-12-16 12:00:23 +01:00
Jorge Manrubia ca5095cafd Fix typo with unlimitted 2025-12-16 12:00:23 +01:00
Jorge Manrubia 5baf9d879d Dont't fail if not set 2025-12-16 12:00:23 +01:00
Jorge Manrubia a25bd9adfd Let's use a single sandbox environment via 1password ENV vars 2025-12-16 12:00:23 +01:00
Jorge Manrubia 5be4dca80e Refresh the subscription instead of relying on event payloads
Events can land out of order. See https://github.com/basecamp/fizzy-saas/pull/23#discussion_r2609909558
2025-12-16 12:00:23 +01:00
Jorge Manrubia 984a5dd4ce Add Stripe-based billing system
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Jason Zimdars <jz@37signals.com>
2025-12-16 12:00:23 +01:00
Mike Dalessio 8f73e1e1be Add console1984 and audits1984
To keep as much of this as we can in the `fizzy-saas` gem, this PR
opts to store console/audits models in a separate database, and so:

- the gem contains the migrations and the database config
- the app contains a separate schema file distinctly for SaaS concerns
  - Rails' current behavior prevents us from easily keeping this file in the gem

Also note that the stock `audits1984` schema is updated to reference
the auditor via a UUID foreign key.

Finally, in order for the database schema file to be located in the
gem directory (and not the application directory), it's necessary to
monkeypatch `AR::DatabaseTasks.schema_dump_path` to support absolute
paths. This functionality has been proposed upstream in
https://github.com/rails/rails/pull/56290 but is awaiting a decision
from the core team.

ref: https://app.fizzy.do/5986089/cards/2469
ref: #17
2025-12-04 11:43:48 -05:00
Jorge Manrubia 0b23a4f907 Remove code not used now 2025-11-27 13:12:58 +01:00
Jorge Manrubia 3d849a202a Move signup code back to the app, leave only queenbee hooks 2025-11-27 12:52:12 +01:00
Jorge Manrubia 2232caf778 Remove empty dir 2025-11-24 15:17:39 +01:00
Jorge Manrubia db57a7ba0f Initial commit: Move fizzy-saas to separate repository 2025-11-23 06:04:20 +01:00