This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 33
44from ..helpers .ariadne import ariadne_load_local_graphql
55from .account import account , account_bindable
6+ from .billing import billing_bindable
67from .branch import branch , branch_bindable
78from .bundle_analysis import (
89 bundle_analysis ,
9091enums = ariadne_load_local_graphql (__file__ , "./enums" )
9192errors = ariadne_load_local_graphql (__file__ , "./errors" )
9293types = [
94+ billing ,
9395 branch ,
9496 bundle_analysis_comparison ,
9597 bundle_analysis_report ,
140142bindables = [
141143 * enum_types .enum_types ,
142144 * mutation_resolvers ,
145+ billing_bindable ,
143146 branch_bindable ,
144147 bundle_analysis_comparison_bindable ,
145148 bundle_analysis_comparison_result_bindable ,
Original file line number Diff line number Diff line change 1+ from graphql_api .helpers .ariadne import ariadne_load_local_graphql
2+
3+ from .billing import billing_bindable
4+
5+ billing = ariadne_load_local_graphql (__file__ , "billing.graphql" )
6+
7+
8+ __all__ = ["billing_bindable" ]
Original file line number Diff line number Diff line change 1+ type Billing {
2+ unVerifiedPaymentMethods : [UnverifiedPaymentMethod ! ]!
3+ }
4+
5+ type UnverifiedPaymentMethod {
6+ paymentMethodId : String !
7+ hostedVerificationUrl : String
8+ }
Original file line number Diff line number Diff line change 1+ from ariadne import ObjectType
2+ from graphql import GraphQLResolveInfo
3+
4+ from codecov_auth .models import Owner
5+ from services .billing import BillingService
6+
7+ billing_bindable = ObjectType ("Billing" )
8+
9+
10+ @billing_bindable .field ("unverifiedPaymentMethods" )
11+ def resolve_unverified_payment_methods (
12+ owner : Owner , info : GraphQLResolveInfo
13+ ) -> list [dict ]:
14+ return BillingService (requesting_user = owner ).get_unverified_payment_methods ()
Original file line number Diff line number Diff line change @@ -396,3 +396,10 @@ def resolve_upload_token_required(
396396@require_shared_account_or_part_of_org
397397def resolve_activated_user_count (owner : Owner , info : GraphQLResolveInfo ) -> int :
398398 return owner .activated_user_count
399+
400+
401+
402+ @owner_bindable .field ("billing" )
403+ @sync_to_async
404+ @require_part_of_org
405+ def resolve_billing (owner : Owner , info : GraphQLResolveInfo ) -> dict | None :
You can’t perform that action at this time.
0 commit comments