Coverage for polar/api.py: 100%

94 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 12:42 +0000

1from fastapi import APIRouter 

2 

3from polar.account.endpoints import router as accounts_router 

4from polar.auth.endpoints import router as auth_router 

5from polar.benefit.endpoints import router as benefits_router 

6from polar.benefit.grant.endpoints import router as benefit_grants_router 

7from polar.checkout.endpoints import router as checkout_router 

8from polar.checkout_link.endpoints import router as checkout_link_router 

9from polar.custom_field.endpoints import router as custom_field_router 

10from polar.customer.endpoints import router as customer_router 

11from polar.customer_meter.endpoints import router as customer_meter_router 

12from polar.customer_portal.endpoints import router as customer_portal_router 

13from polar.customer_seat.endpoints import router as customer_seat_router 

14from polar.customer_session.endpoints import router as customer_session_router 

15from polar.discount.endpoints import router as discount_router 

16from polar.email_update.endpoints import router as email_update_router 

17from polar.event.endpoints import router as event_router 

18from polar.event_type.endpoints import router as event_type_router 

19from polar.eventstream.endpoints import router as stream_router 

20from polar.file.endpoints import router as files_router 

21from polar.integrations.apple.endpoints import router as apple_router 

22from polar.integrations.discord.endpoints import router as discord_router 

23from polar.integrations.github.endpoints import router as github_router 

24from polar.integrations.github_repository_benefit.endpoints import ( 

25 router as github_repository_benefit_router, 

26) 

27from polar.integrations.google.endpoints import router as google_router 

28from polar.integrations.plain.endpoints import router as plain_router 

29from polar.integrations.stripe.endpoints import router as stripe_router 

30from polar.license_key.endpoints import router as license_key_router 

31from polar.login_code.endpoints import router as login_code_router 

32from polar.member.endpoints import router as member_router 

33from polar.meter.endpoints import router as meter_router 

34from polar.metrics.endpoints import router as metrics_router 

35from polar.notifications.endpoints import router as notifications_router 

36from polar.oauth2.endpoints.oauth2 import router as oauth2_router 

37from polar.order.endpoints import router as order_router 

38from polar.organization.endpoints import router as organization_router 

39from polar.organization_access_token.endpoints import ( 

40 router as organization_access_token_router, 

41) 

42from polar.payment.endpoints import router as payment_router 

43from polar.payout.endpoints import router as payout_router 

44from polar.personal_access_token.endpoints import router as pat_router 

45from polar.product.endpoints import router as product_router 

46from polar.refund.endpoints import router as refund_router 

47from polar.storefront.endpoints import router as storefront_router 

48from polar.subscription.endpoints import router as subscription_router 

49from polar.transaction.endpoints import router as transaction_router 

50from polar.user.endpoints import router as user_router 

51from polar.wallet.endpoints import router as wallet_router 

52from polar.webhook.endpoints import router as webhook_router 

53 

54router = APIRouter(prefix="/v1") 

55 

56# /users 

57router.include_router(user_router) 

58# /integrations/github 

59router.include_router(github_router) 

60# /integrations/github_repository_benefit 

61router.include_router(github_repository_benefit_router) 

62# /integrations/stripe 

63router.include_router(stripe_router) 

64# /integrations/discord 

65router.include_router(discord_router) 

66# /integrations/apple 

67router.include_router(apple_router) 

68# /login-code 

69router.include_router(login_code_router) 

70# /notifications 

71router.include_router(notifications_router) 

72# /personal_access_tokens 

73router.include_router(pat_router) 

74# /accounts 

75router.include_router(accounts_router) 

76# /stream 

77router.include_router(stream_router) 

78# /organizations 

79router.include_router(organization_router) 

80# /subscriptions 

81router.include_router(subscription_router) 

82# /transactions 

83router.include_router(transaction_router) 

84# /auth 

85router.include_router(auth_router) 

86# /oauth2 

87router.include_router(oauth2_router) 

88# /benefits 

89router.include_router(benefits_router) 

90# /benefit-grants 

91router.include_router(benefit_grants_router) 

92# /webhooks 

93router.include_router(webhook_router) 

94# /products 

95router.include_router(product_router) 

96# /orders 

97router.include_router(order_router) 

98# /refunds 

99router.include_router(refund_router) 

100# /checkouts 

101router.include_router(checkout_router) 

102# /files 

103router.include_router(files_router) 

104# /metrics 

105router.include_router(metrics_router) 

106# /integrations/google 

107router.include_router(google_router) 

108# /license-keys 

109router.include_router(license_key_router) 

110# /checkout-links 

111router.include_router(checkout_link_router) 

112# /storefronts 

113router.include_router(storefront_router) 

114# /custom-fields 

115router.include_router(custom_field_router) 

116# /discounts 

117router.include_router(discount_router) 

118# /customers 

119router.include_router(customer_router) 

120# /members 

121router.include_router(member_router) 

122# /customer-portal 

123router.include_router(customer_portal_router) 

124# /seats 

125router.include_router(customer_seat_router) 

126# /update-email 

127router.include_router(email_update_router) 

128# /customer-sessions 

129router.include_router(customer_session_router) 

130# /integrations/plain 

131router.include_router(plain_router) 

132# /events 

133router.include_router(event_router) 

134# /event-types 

135router.include_router(event_type_router) 

136# /meters 

137router.include_router(meter_router) 

138# /organization-access-tokens 

139router.include_router(organization_access_token_router) 

140# /customer-meters 

141router.include_router(customer_meter_router) 

142# /payments 

143router.include_router(payment_router) 

144# /payouts 

145router.include_router(payout_router) 

146# /wallets 

147router.include_router(wallet_router)