• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

raystack / frontier / 9417646654
38%

Build:
DEFAULT BRANCH: main
Ran 07 Jun 2024 01:18PM UTC
Jobs 1
Files 239
Run time 457min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jun 2024 01:15PM UTC coverage: 9.312% (-0.03%) from 9.345%
9417646654

push

github

web-flow
feat: offline billing accounts in org (#638)

- Offline billing accounts are not registered in billing provider
like Stripe by default.
- Only online b/a can use CheckoutAPI so when requesting to create
new Checkout, it will automatically try to register the billing
account to provider if it is offline
- DelegatedCheckout with virtual credits can be used with offline
customers
- Offline customers will not interact with billing provider at all
and can't support subscriptions as well
- A offline customer can be migrated to online using RegisterBillingAccount
API
- https://github.com/raystack/proton/pull/360
- A change in frontier env/yaml configs are introduced to handle
offline accounts better
```yaml
billing:
  # default currency to be used for billing if not provided by the user
  # e.g. usd, inr, eur
  default_currency: "inr"
  # billing customer account configuration
  customer:
    # automatically create a default customer account when an org is created
    auto_create_with_org: true
    # name of the plan that should be used subscribed automatically when the org is created
    # it also automatically creates an empty billing account under the org
    default_plan: ""
    # default offline status for the customer account, if true the customer account
    # will not be registered in billing provider
    default_offline: false
    # free credits to be added to the customer account when created as a part of the org
    onboard_credits_with_org: 0
```

Signed-off-by: Kush Sharma <thekushsharma@gmail.com>

514 of 5274 new or added lines in 14 files covered. (9.75%)

108 existing lines in 3 files now uncovered.

9642 of 103546 relevant lines covered (9.31%)

2.66 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% billing/subscription/service.go
1
0.0
0.0% cmd/serve.go
3
15.0
-2.65% billing/customer/customer.go
4
0.0
0.0% billing/checkout/service.go
4
34.82
34.82% internal/store/postgres/billing_customer_repository.go
16
0.0
0.0% pkg/server/interceptors/authorization.go
30
8.07
-0.49% internal/api/v1beta1/billing_customer.go
44
0.0
0.0% core/event/service.go
52
0.0
0.0% billing/customer/service.go
78
0.0
0.0% proto/v1beta1/frontier_grpc.pb.go
106
8.52
-3.54% internal/api/v1beta1/mocks/customer_service.go
333
0.0
0.0% proto/v1beta1/frontier.pb.gw.go
342
0.0
0.0% proto/v1beta1/frontier.pb.validate.go
3746
5.78
-0.1% proto/v1beta1/frontier.pb.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
8.52
-3.54% internal/api/v1beta1/mocks/customer_service.go
2
0.0
0.0% core/event/service.go
105
5.78
-0.1% proto/v1beta1/frontier.pb.go
Jobs
ID Job ID Ran Files Coverage
1 9417646654.1 07 Jun 2024 01:18PM UTC 239
9.31
GitHub Action Run
Source Files on build 9417646654
  • Tree
  • List 239
  • Changed 18
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7fca56ef on github
  • Prev Build on main (#9381599834)
  • Next Build on main (#9468464094)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc