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: set billing customer credit min limit #781

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

kushsharma
Copy link
Member

  • If a billing account credit min limit is set less then 0, it works as overdraft. Default is 0.
  • If a org billing account is in overdraft state, it's not allowed to create new billing account unless the dues are settled.
  • Setting this limit more then 0 works as min purchase requirement for the account.
  • Only platform admins can change the account limits.
  • feat(frontier): billing account credit min limit proton#370

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 4:47am

@coveralls
Copy link

coveralls commented Sep 19, 2024

Pull Request Test Coverage Report for Build 11174148935

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 29 of 584 (4.97%) changed or added relevant lines in 14 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.03%) to 9.669%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/serve.go 0 2 0.0%
billing/customer/service.go 14 17 82.35%
pkg/server/interceptors/authorization.go 0 3 0.0%
internal/api/v1beta1/billing_customer.go 0 6 0.0%
proto/v1beta1/admin_grpc.pb.go 0 26 0.0%
internal/store/postgres/billing_customer_repository.go 3 30 10.0%
billing/customer/mocks/repository.go 0 37 0.0%
internal/api/v1beta1/mocks/customer_service.go 0 37 0.0%
billing/customer/mocks/credit_service.go 0 46 0.0%
internal/store/postgres/billing_transactions_repository.go 9 69 13.04%
Files with Coverage Reduction New Missed Lines %
internal/store/postgres/billing_transactions_repository.go 1 3.17%
proto/v1beta1/admin_grpc.pb.go 1 0.0%
proto/v1beta1/admin.pb.gw.go 2 0.0%
Totals Coverage Status
Change from base Build 11159729320: -0.03%
Covered Lines: 11008
Relevant Lines: 113854

💛 - Coveralls

- If a billing account credit min limit is set less then 0,
it works as overdraft. Default is 0.
- If a org billing account is in overdraft state, it's not
allowed to create new billing account unless the dues are
settled.
- Setting this limit more then 0 works as min purchase requirement
for the account.
- Only platform admins can change the account limits.
- raystack/proton#370

Signed-off-by: Kush Sharma <[email protected]>
@kushsharma kushsharma enabled auto-merge (squash) October 4, 2024 04:47
@kushsharma kushsharma merged commit bbebf12 into main Oct 4, 2024
7 checks passed
@kushsharma kushsharma deleted the customer-credit-limit branch October 4, 2024 04:50
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