lark-billing 0.0.7__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lark-billing might be problematic. Click here for more details.

Files changed (117) hide show
  1. {lark_billing-0.0.7 → lark_billing-0.0.9}/PKG-INFO +8 -7
  2. {lark_billing-0.0.7 → lark_billing-0.0.9}/README.md +6 -6
  3. {lark_billing-0.0.7 → lark_billing-0.0.9}/pyproject.toml +2 -2
  4. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/__init__.py +45 -29
  5. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/checkout/client.py +34 -12
  6. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/checkout/raw_client.py +22 -6
  7. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/client.py +19 -0
  8. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/client_wrapper.py +2 -2
  9. lark_billing-0.0.9/src/lark/core/http_sse/__init__.py +42 -0
  10. lark_billing-0.0.9/src/lark/core/http_sse/_api.py +112 -0
  11. lark_billing-0.0.9/src/lark/core/http_sse/_decoders.py +61 -0
  12. lark_billing-0.0.9/src/lark/core/http_sse/_exceptions.py +7 -0
  13. lark_billing-0.0.9/src/lark/core/http_sse/_models.py +17 -0
  14. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/pydantic_utilities.py +3 -1
  15. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/customer_portal/client.py +4 -2
  16. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/customer_portal/raw_client.py +2 -0
  17. lark_billing-0.0.9/src/lark/invoices/client.py +136 -0
  18. lark_billing-0.0.9/src/lark/invoices/raw_client.py +147 -0
  19. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/pricing_metrics/client.py +69 -0
  20. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/pricing_metrics/raw_client.py +101 -0
  21. lark_billing-0.0.9/src/lark/rate_cards/__init__.py +46 -0
  22. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/rate_cards/client.py +20 -14
  23. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/rate_cards/raw_client.py +26 -20
  24. lark_billing-0.0.9/src/lark/rate_cards/types/__init__.py +46 -0
  25. lark_billing-0.0.7/src/lark/types/create_simple_usage_based_rate_interface.py → lark_billing-0.0.9/src/lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +10 -5
  26. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/subjects/client.py +16 -18
  27. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/subjects/raw_client.py +14 -8
  28. lark_billing-0.0.9/src/lark/subscriptions/__init__.py +4 -0
  29. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/subscriptions/client.py +194 -8
  30. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/subscriptions/raw_client.py +256 -4
  31. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/__init__.py +31 -32
  32. lark_billing-0.0.9/src/lark/types/aggregation.py +38 -0
  33. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/amount.py +4 -1
  34. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/create_customer_portal_session_response.py +9 -2
  35. lark_billing-0.0.7/src/lark/types/create_fixed_rate_interface.py → lark_billing-0.0.9/src/lark/types/create_fixed_rate_request.py +11 -3
  36. lark_billing-0.0.9/src/lark/types/create_simple_usage_based_rate_request.py +39 -0
  37. lark_billing-0.0.9/src/lark/types/create_subject_response.py +48 -0
  38. lark_billing-0.0.9/src/lark/types/create_subscription_checkout_session_response.py +33 -0
  39. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/fixed_rate_interface.py +1 -1
  40. lark_billing-0.0.7/src/lark/types/create_subscription_checkout_session_response.py → lark_billing-0.0.9/src/lark/types/invoice_line_item_resource.py +4 -3
  41. lark_billing-0.0.9/src/lark/types/invoice_resource.py +56 -0
  42. lark_billing-0.0.9/src/lark/types/invoice_status.py +5 -0
  43. lark_billing-0.0.9/src/lark/types/list_invoices_response.py +21 -0
  44. lark_billing-0.0.9/src/lark/types/list_pricing_metrics_response.py +21 -0
  45. lark_billing-0.0.9/src/lark/types/period_resource.py +23 -0
  46. lark_billing-0.0.9/src/lark/types/pricing_metric_resource.py +24 -0
  47. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/rate_card_resource.py +36 -7
  48. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/rate_card_resource_usage_based_rates_item.py +1 -2
  49. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/simple_usage_based_rate_interface.py +1 -6
  50. lark_billing-0.0.9/src/lark/types/subject_resource.py +48 -0
  51. lark_billing-0.0.9/src/lark/types/subscription_resource.py +61 -0
  52. lark_billing-0.0.9/src/lark/types/subscription_status.py +5 -0
  53. {lark_billing-0.0.7/src/lark/rate_cards/types → lark_billing-0.0.9/src/lark/usage_events}/__init__.py +4 -3
  54. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/usage_events/client.py +15 -4
  55. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/usage_events/raw_client.py +21 -6
  56. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/usage_events/types/__init__.py +4 -2
  57. lark_billing-0.0.7/src/lark/types/status.py → lark_billing-0.0.9/src/lark/usage_events/types/create_usage_event_request_data_value.py +1 -1
  58. lark_billing-0.0.7/src/lark/rate_cards/__init__.py +0 -34
  59. lark_billing-0.0.7/src/lark/types/aggregation.py +0 -80
  60. lark_billing-0.0.7/src/lark/types/create_subject_response.py +0 -25
  61. lark_billing-0.0.7/src/lark/types/custom_pricing_metric_resource.py +0 -19
  62. lark_billing-0.0.7/src/lark/types/last_aggregation_pricing_metric_resource.py +0 -19
  63. lark_billing-0.0.7/src/lark/types/max_aggregation_pricing_metric_resource.py +0 -19
  64. lark_billing-0.0.7/src/lark/types/subject_resource.py +0 -25
  65. lark_billing-0.0.7/src/lark/types/subscription_resource.py +0 -27
  66. lark_billing-0.0.7/src/lark/usage_events/__init__.py +0 -34
  67. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/checkout/__init__.py +0 -0
  68. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/__init__.py +0 -0
  69. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/api_error.py +0 -0
  70. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/datetime_utils.py +0 -0
  71. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/file.py +0 -0
  72. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/force_multipart.py +0 -0
  73. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/http_client.py +0 -0
  74. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/http_response.py +0 -0
  75. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/jsonable_encoder.py +0 -0
  76. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/query_encoder.py +0 -0
  77. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/remove_none_from_dict.py +0 -0
  78. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/request_options.py +0 -0
  79. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/core/serialization.py +0 -0
  80. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/customer_access/__init__.py +0 -0
  81. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/customer_access/client.py +0 -0
  82. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/customer_access/raw_client.py +0 -0
  83. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/customer_portal/__init__.py +0 -0
  84. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/environment.py +0 -0
  85. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/errors/__init__.py +0 -0
  86. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/errors/unprocessable_entity_error.py +0 -0
  87. {lark_billing-0.0.7/src/lark/subjects → lark_billing-0.0.9/src/lark/invoices}/__init__.py +0 -0
  88. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/pricing_metrics/__init__.py +0 -0
  89. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/pricing_metrics/types/__init__.py +0 -0
  90. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/pricing_metrics/types/pricing_metric_aggregation.py +0 -0
  91. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/py.typed +0 -0
  92. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/rate_cards/types/create_rate_card_request_billing_interval.py +0 -0
  93. {lark_billing-0.0.7/src/lark/subscriptions → lark_billing-0.0.9/src/lark/subjects}/__init__.py +0 -0
  94. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/billing_state_response.py +0 -0
  95. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/count_aggregation_pricing_metric_interface.py +0 -0
  96. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/count_aggregation_pricing_metric_resource.py +0 -0
  97. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/create_pricing_metric_response.py +0 -0
  98. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/create_usage_event_summary_response.py +0 -0
  99. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/flat_price.py +0 -0
  100. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/get_pricing_metric_response.py +0 -0
  101. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/http_validation_error.py +0 -0
  102. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/list_rate_cards_response.py +0 -0
  103. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/list_subjects_response.py +0 -0
  104. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/list_subscriptions_response.py +0 -0
  105. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/package_price.py +0 -0
  106. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/package_price_input_rounding_behavior.py +0 -0
  107. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/package_price_output_rounding_behavior.py +0 -0
  108. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/period.py +0 -0
  109. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/price.py +0 -0
  110. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/rate_card_resource_billing_interval.py +0 -0
  111. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/sum_aggregation_pricing_metric_interface.py +0 -0
  112. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/sum_aggregation_pricing_metric_resource.py +0 -0
  113. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/validation_error.py +0 -0
  114. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/validation_error_loc_item.py +0 -0
  115. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/types/value.py +0 -0
  116. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/usage_events/types/create_usage_event_summary_request_aggregation_type.py +0 -0
  117. {lark_billing-0.0.7 → lark_billing-0.0.9}/src/lark/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lark-billing
3
- Version: 0.0.7
3
+ Version: 0.0.9
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -22,6 +22,7 @@ Requires-Dist: httpx (>=0.21.2)
22
22
  Requires-Dist: pydantic (>=1.9.2)
23
23
  Requires-Dist: pydantic-core (>=2.18.2)
24
24
  Requires-Dist: typing_extensions (>=4.0.0)
25
+ Project-URL: Repository, https://github.com/fern-demo/lark-python-sdk
25
26
  Description-Content-Type: text/markdown
26
27
 
27
28
  # Lark Python Library
@@ -52,9 +53,9 @@ client = Lark(
52
53
  api_key="YOUR_API_KEY",
53
54
  )
54
55
  client.checkout.create_subscription_checkout_session(
55
- subject_id="subject_id",
56
- rate_card_id="rate_card_id",
57
- callback_url="callback_url",
56
+ subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
57
+ rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
58
+ success_callback_url="https://example.com/callback",
58
59
  )
59
60
  ```
60
61
 
@@ -74,9 +75,9 @@ client = AsyncLark(
74
75
 
75
76
  async def main() -> None:
76
77
  await client.checkout.create_subscription_checkout_session(
77
- subject_id="subject_id",
78
- rate_card_id="rate_card_id",
79
- callback_url="callback_url",
78
+ subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
79
+ rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
80
+ success_callback_url="https://example.com/callback",
80
81
  )
81
82
 
82
83
 
@@ -26,9 +26,9 @@ client = Lark(
26
26
  api_key="YOUR_API_KEY",
27
27
  )
28
28
  client.checkout.create_subscription_checkout_session(
29
- subject_id="subject_id",
30
- rate_card_id="rate_card_id",
31
- callback_url="callback_url",
29
+ subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
30
+ rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
31
+ success_callback_url="https://example.com/callback",
32
32
  )
33
33
  ```
34
34
 
@@ -48,9 +48,9 @@ client = AsyncLark(
48
48
 
49
49
  async def main() -> None:
50
50
  await client.checkout.create_subscription_checkout_session(
51
- subject_id="subject_id",
52
- rate_card_id="rate_card_id",
53
- callback_url="callback_url",
51
+ subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
52
+ rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
53
+ success_callback_url="https://example.com/callback",
54
54
  )
55
55
 
56
56
 
@@ -3,7 +3,7 @@ name = "lark-billing"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "lark-billing"
6
- version = "0.0.7"
6
+ version = "0.0.9"
7
7
  description = ""
8
8
  readme = "README.md"
9
9
  authors = []
@@ -30,7 +30,7 @@ packages = [
30
30
  { include = "lark", from = "src"}
31
31
  ]
32
32
 
33
- [project.urls]
33
+ [tool.poetry.urls]
34
34
  Repository = 'https://github.com/fern-demo/lark-python-sdk'
35
35
 
36
36
  [tool.poetry.dependencies]
@@ -9,46 +9,47 @@ if typing.TYPE_CHECKING:
9
9
  from .types import (
10
10
  Aggregation,
11
11
  Aggregation_Count,
12
- Aggregation_Custom,
13
- Aggregation_Last,
14
- Aggregation_Max,
15
12
  Aggregation_Sum,
16
13
  Amount,
17
14
  BillingStateResponse,
18
15
  CountAggregationPricingMetricInterface,
19
16
  CountAggregationPricingMetricResource,
20
17
  CreateCustomerPortalSessionResponse,
21
- CreateFixedRateInterface,
18
+ CreateFixedRateRequest,
22
19
  CreatePricingMetricResponse,
23
- CreateSimpleUsageBasedRateInterface,
20
+ CreateSimpleUsageBasedRateRequest,
24
21
  CreateSubjectResponse,
25
22
  CreateSubscriptionCheckoutSessionResponse,
26
23
  CreateUsageEventSummaryResponse,
27
- CustomPricingMetricResource,
28
24
  FixedRateInterface,
29
25
  FlatPrice,
30
26
  GetPricingMetricResponse,
31
27
  HttpValidationError,
32
- LastAggregationPricingMetricResource,
28
+ InvoiceLineItemResource,
29
+ InvoiceResource,
30
+ InvoiceStatus,
31
+ ListInvoicesResponse,
32
+ ListPricingMetricsResponse,
33
33
  ListRateCardsResponse,
34
34
  ListSubjectsResponse,
35
35
  ListSubscriptionsResponse,
36
- MaxAggregationPricingMetricResource,
37
36
  PackagePrice,
38
37
  PackagePriceInputRoundingBehavior,
39
38
  PackagePriceOutputRoundingBehavior,
40
39
  Period,
40
+ PeriodResource,
41
41
  Price,
42
42
  Price_Flat,
43
43
  Price_Package,
44
+ PricingMetricResource,
44
45
  RateCardResource,
45
46
  RateCardResourceBillingInterval,
46
47
  RateCardResourceUsageBasedRatesItem,
47
48
  RateCardResourceUsageBasedRatesItem_Simple,
48
49
  SimpleUsageBasedRateInterface,
49
- Status,
50
50
  SubjectResource,
51
51
  SubscriptionResource,
52
+ SubscriptionStatus,
52
53
  SumAggregationPricingMetricInterface,
53
54
  SumAggregationPricingMetricResource,
54
55
  ValidationError,
@@ -60,6 +61,7 @@ if typing.TYPE_CHECKING:
60
61
  checkout,
61
62
  customer_access,
62
63
  customer_portal,
64
+ invoices,
63
65
  pricing_metrics,
64
66
  rate_cards,
65
67
  subjects,
@@ -69,15 +71,16 @@ if typing.TYPE_CHECKING:
69
71
  from .client import AsyncLark, Lark
70
72
  from .environment import LarkEnvironment
71
73
  from .pricing_metrics import PricingMetricAggregation, PricingMetricAggregation_Count, PricingMetricAggregation_Sum
72
- from .rate_cards import CreateRateCardRequestBillingInterval
73
- from .usage_events import CreateUsageEventSummaryRequestAggregationType
74
+ from .rate_cards import (
75
+ CreateRateCardRequestBillingInterval,
76
+ CreateRateCardRequestUsageBasedRatesItem,
77
+ CreateRateCardRequestUsageBasedRatesItem_Simple,
78
+ )
79
+ from .usage_events import CreateUsageEventRequestDataValue, CreateUsageEventSummaryRequestAggregationType
74
80
  from .version import __version__
75
81
  _dynamic_imports: typing.Dict[str, str] = {
76
82
  "Aggregation": ".types",
77
83
  "Aggregation_Count": ".types",
78
- "Aggregation_Custom": ".types",
79
- "Aggregation_Last": ".types",
80
- "Aggregation_Max": ".types",
81
84
  "Aggregation_Sum": ".types",
82
85
  "Amount": ".types",
83
86
  "AsyncLark": ".client",
@@ -85,44 +88,51 @@ _dynamic_imports: typing.Dict[str, str] = {
85
88
  "CountAggregationPricingMetricInterface": ".types",
86
89
  "CountAggregationPricingMetricResource": ".types",
87
90
  "CreateCustomerPortalSessionResponse": ".types",
88
- "CreateFixedRateInterface": ".types",
91
+ "CreateFixedRateRequest": ".types",
89
92
  "CreatePricingMetricResponse": ".types",
90
93
  "CreateRateCardRequestBillingInterval": ".rate_cards",
91
- "CreateSimpleUsageBasedRateInterface": ".types",
94
+ "CreateRateCardRequestUsageBasedRatesItem": ".rate_cards",
95
+ "CreateRateCardRequestUsageBasedRatesItem_Simple": ".rate_cards",
96
+ "CreateSimpleUsageBasedRateRequest": ".types",
92
97
  "CreateSubjectResponse": ".types",
93
98
  "CreateSubscriptionCheckoutSessionResponse": ".types",
99
+ "CreateUsageEventRequestDataValue": ".usage_events",
94
100
  "CreateUsageEventSummaryRequestAggregationType": ".usage_events",
95
101
  "CreateUsageEventSummaryResponse": ".types",
96
- "CustomPricingMetricResource": ".types",
97
102
  "FixedRateInterface": ".types",
98
103
  "FlatPrice": ".types",
99
104
  "GetPricingMetricResponse": ".types",
100
105
  "HttpValidationError": ".types",
106
+ "InvoiceLineItemResource": ".types",
107
+ "InvoiceResource": ".types",
108
+ "InvoiceStatus": ".types",
101
109
  "Lark": ".client",
102
110
  "LarkEnvironment": ".environment",
103
- "LastAggregationPricingMetricResource": ".types",
111
+ "ListInvoicesResponse": ".types",
112
+ "ListPricingMetricsResponse": ".types",
104
113
  "ListRateCardsResponse": ".types",
105
114
  "ListSubjectsResponse": ".types",
106
115
  "ListSubscriptionsResponse": ".types",
107
- "MaxAggregationPricingMetricResource": ".types",
108
116
  "PackagePrice": ".types",
109
117
  "PackagePriceInputRoundingBehavior": ".types",
110
118
  "PackagePriceOutputRoundingBehavior": ".types",
111
119
  "Period": ".types",
120
+ "PeriodResource": ".types",
112
121
  "Price": ".types",
113
122
  "Price_Flat": ".types",
114
123
  "Price_Package": ".types",
115
124
  "PricingMetricAggregation": ".pricing_metrics",
116
125
  "PricingMetricAggregation_Count": ".pricing_metrics",
117
126
  "PricingMetricAggregation_Sum": ".pricing_metrics",
127
+ "PricingMetricResource": ".types",
118
128
  "RateCardResource": ".types",
119
129
  "RateCardResourceBillingInterval": ".types",
120
130
  "RateCardResourceUsageBasedRatesItem": ".types",
121
131
  "RateCardResourceUsageBasedRatesItem_Simple": ".types",
122
132
  "SimpleUsageBasedRateInterface": ".types",
123
- "Status": ".types",
124
133
  "SubjectResource": ".types",
125
134
  "SubscriptionResource": ".types",
135
+ "SubscriptionStatus": ".types",
126
136
  "SumAggregationPricingMetricInterface": ".types",
127
137
  "SumAggregationPricingMetricResource": ".types",
128
138
  "UnprocessableEntityError": ".errors",
@@ -133,6 +143,7 @@ _dynamic_imports: typing.Dict[str, str] = {
133
143
  "checkout": ".checkout",
134
144
  "customer_access": ".customer_access",
135
145
  "customer_portal": ".customer_portal",
146
+ "invoices": ".invoices",
136
147
  "pricing_metrics": ".pricing_metrics",
137
148
  "rate_cards": ".rate_cards",
138
149
  "subjects": ".subjects",
@@ -165,9 +176,6 @@ def __dir__():
165
176
  __all__ = [
166
177
  "Aggregation",
167
178
  "Aggregation_Count",
168
- "Aggregation_Custom",
169
- "Aggregation_Last",
170
- "Aggregation_Max",
171
179
  "Aggregation_Sum",
172
180
  "Amount",
173
181
  "AsyncLark",
@@ -175,44 +183,51 @@ __all__ = [
175
183
  "CountAggregationPricingMetricInterface",
176
184
  "CountAggregationPricingMetricResource",
177
185
  "CreateCustomerPortalSessionResponse",
178
- "CreateFixedRateInterface",
186
+ "CreateFixedRateRequest",
179
187
  "CreatePricingMetricResponse",
180
188
  "CreateRateCardRequestBillingInterval",
181
- "CreateSimpleUsageBasedRateInterface",
189
+ "CreateRateCardRequestUsageBasedRatesItem",
190
+ "CreateRateCardRequestUsageBasedRatesItem_Simple",
191
+ "CreateSimpleUsageBasedRateRequest",
182
192
  "CreateSubjectResponse",
183
193
  "CreateSubscriptionCheckoutSessionResponse",
194
+ "CreateUsageEventRequestDataValue",
184
195
  "CreateUsageEventSummaryRequestAggregationType",
185
196
  "CreateUsageEventSummaryResponse",
186
- "CustomPricingMetricResource",
187
197
  "FixedRateInterface",
188
198
  "FlatPrice",
189
199
  "GetPricingMetricResponse",
190
200
  "HttpValidationError",
201
+ "InvoiceLineItemResource",
202
+ "InvoiceResource",
203
+ "InvoiceStatus",
191
204
  "Lark",
192
205
  "LarkEnvironment",
193
- "LastAggregationPricingMetricResource",
206
+ "ListInvoicesResponse",
207
+ "ListPricingMetricsResponse",
194
208
  "ListRateCardsResponse",
195
209
  "ListSubjectsResponse",
196
210
  "ListSubscriptionsResponse",
197
- "MaxAggregationPricingMetricResource",
198
211
  "PackagePrice",
199
212
  "PackagePriceInputRoundingBehavior",
200
213
  "PackagePriceOutputRoundingBehavior",
201
214
  "Period",
215
+ "PeriodResource",
202
216
  "Price",
203
217
  "Price_Flat",
204
218
  "Price_Package",
205
219
  "PricingMetricAggregation",
206
220
  "PricingMetricAggregation_Count",
207
221
  "PricingMetricAggregation_Sum",
222
+ "PricingMetricResource",
208
223
  "RateCardResource",
209
224
  "RateCardResourceBillingInterval",
210
225
  "RateCardResourceUsageBasedRatesItem",
211
226
  "RateCardResourceUsageBasedRatesItem_Simple",
212
227
  "SimpleUsageBasedRateInterface",
213
- "Status",
214
228
  "SubjectResource",
215
229
  "SubscriptionResource",
230
+ "SubscriptionStatus",
216
231
  "SumAggregationPricingMetricInterface",
217
232
  "SumAggregationPricingMetricResource",
218
233
  "UnprocessableEntityError",
@@ -223,6 +238,7 @@ __all__ = [
223
238
  "checkout",
224
239
  "customer_access",
225
240
  "customer_portal",
241
+ "invoices",
226
242
  "pricing_metrics",
227
243
  "rate_cards",
228
244
  "subjects",
@@ -31,17 +31,24 @@ class CheckoutClient:
31
31
  *,
32
32
  subject_id: str,
33
33
  rate_card_id: str,
34
- callback_url: str,
34
+ success_callback_url: str,
35
+ cancel_url: typing.Optional[str] = OMIT,
35
36
  request_options: typing.Optional[RequestOptions] = None,
36
37
  ) -> CreateSubscriptionCheckoutSessionResponse:
37
38
  """
38
39
  Parameters
39
40
  ----------
40
41
  subject_id : str
42
+ The ID of the subject to create the checkout for.
41
43
 
42
44
  rate_card_id : str
45
+ The ID of the rate card to subscribe to.
43
46
 
44
- callback_url : str
47
+ success_callback_url : str
48
+ The URL to redirect to after the checkout is successful.
49
+
50
+ cancel_url : typing.Optional[str]
51
+ The URL to redirect to after the checkout is cancelled.
45
52
 
46
53
  request_options : typing.Optional[RequestOptions]
47
54
  Request-specific configuration.
@@ -59,13 +66,17 @@ class CheckoutClient:
59
66
  api_key="YOUR_API_KEY",
60
67
  )
61
68
  client.checkout.create_subscription_checkout_session(
62
- subject_id="subject_id",
63
- rate_card_id="rate_card_id",
64
- callback_url="callback_url",
69
+ subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
70
+ rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
71
+ success_callback_url="https://example.com/callback",
65
72
  )
66
73
  """
67
74
  _response = self._raw_client.create_subscription_checkout_session(
68
- subject_id=subject_id, rate_card_id=rate_card_id, callback_url=callback_url, request_options=request_options
75
+ subject_id=subject_id,
76
+ rate_card_id=rate_card_id,
77
+ success_callback_url=success_callback_url,
78
+ cancel_url=cancel_url,
79
+ request_options=request_options,
69
80
  )
70
81
  return _response.data
71
82
 
@@ -90,17 +101,24 @@ class AsyncCheckoutClient:
90
101
  *,
91
102
  subject_id: str,
92
103
  rate_card_id: str,
93
- callback_url: str,
104
+ success_callback_url: str,
105
+ cancel_url: typing.Optional[str] = OMIT,
94
106
  request_options: typing.Optional[RequestOptions] = None,
95
107
  ) -> CreateSubscriptionCheckoutSessionResponse:
96
108
  """
97
109
  Parameters
98
110
  ----------
99
111
  subject_id : str
112
+ The ID of the subject to create the checkout for.
100
113
 
101
114
  rate_card_id : str
115
+ The ID of the rate card to subscribe to.
116
+
117
+ success_callback_url : str
118
+ The URL to redirect to after the checkout is successful.
102
119
 
103
- callback_url : str
120
+ cancel_url : typing.Optional[str]
121
+ The URL to redirect to after the checkout is cancelled.
104
122
 
105
123
  request_options : typing.Optional[RequestOptions]
106
124
  Request-specific configuration.
@@ -123,15 +141,19 @@ class AsyncCheckoutClient:
123
141
 
124
142
  async def main() -> None:
125
143
  await client.checkout.create_subscription_checkout_session(
126
- subject_id="subject_id",
127
- rate_card_id="rate_card_id",
128
- callback_url="callback_url",
144
+ subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
145
+ rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
146
+ success_callback_url="https://example.com/callback",
129
147
  )
130
148
 
131
149
 
132
150
  asyncio.run(main())
133
151
  """
134
152
  _response = await self._raw_client.create_subscription_checkout_session(
135
- subject_id=subject_id, rate_card_id=rate_card_id, callback_url=callback_url, request_options=request_options
153
+ subject_id=subject_id,
154
+ rate_card_id=rate_card_id,
155
+ success_callback_url=success_callback_url,
156
+ cancel_url=cancel_url,
157
+ request_options=request_options,
136
158
  )
137
159
  return _response.data
@@ -25,17 +25,24 @@ class RawCheckoutClient:
25
25
  *,
26
26
  subject_id: str,
27
27
  rate_card_id: str,
28
- callback_url: str,
28
+ success_callback_url: str,
29
+ cancel_url: typing.Optional[str] = OMIT,
29
30
  request_options: typing.Optional[RequestOptions] = None,
30
31
  ) -> HttpResponse[CreateSubscriptionCheckoutSessionResponse]:
31
32
  """
32
33
  Parameters
33
34
  ----------
34
35
  subject_id : str
36
+ The ID of the subject to create the checkout for.
35
37
 
36
38
  rate_card_id : str
39
+ The ID of the rate card to subscribe to.
37
40
 
38
- callback_url : str
41
+ success_callback_url : str
42
+ The URL to redirect to after the checkout is successful.
43
+
44
+ cancel_url : typing.Optional[str]
45
+ The URL to redirect to after the checkout is cancelled.
39
46
 
40
47
  request_options : typing.Optional[RequestOptions]
41
48
  Request-specific configuration.
@@ -51,7 +58,8 @@ class RawCheckoutClient:
51
58
  json={
52
59
  "subject_id": subject_id,
53
60
  "rate_card_id": rate_card_id,
54
- "callback_url": callback_url,
61
+ "success_callback_url": success_callback_url,
62
+ "cancel_url": cancel_url,
55
63
  },
56
64
  headers={
57
65
  "content-type": "application/json",
@@ -95,17 +103,24 @@ class AsyncRawCheckoutClient:
95
103
  *,
96
104
  subject_id: str,
97
105
  rate_card_id: str,
98
- callback_url: str,
106
+ success_callback_url: str,
107
+ cancel_url: typing.Optional[str] = OMIT,
99
108
  request_options: typing.Optional[RequestOptions] = None,
100
109
  ) -> AsyncHttpResponse[CreateSubscriptionCheckoutSessionResponse]:
101
110
  """
102
111
  Parameters
103
112
  ----------
104
113
  subject_id : str
114
+ The ID of the subject to create the checkout for.
105
115
 
106
116
  rate_card_id : str
117
+ The ID of the rate card to subscribe to.
118
+
119
+ success_callback_url : str
120
+ The URL to redirect to after the checkout is successful.
107
121
 
108
- callback_url : str
122
+ cancel_url : typing.Optional[str]
123
+ The URL to redirect to after the checkout is cancelled.
109
124
 
110
125
  request_options : typing.Optional[RequestOptions]
111
126
  Request-specific configuration.
@@ -121,7 +136,8 @@ class AsyncRawCheckoutClient:
121
136
  json={
122
137
  "subject_id": subject_id,
123
138
  "rate_card_id": rate_card_id,
124
- "callback_url": callback_url,
139
+ "success_callback_url": success_callback_url,
140
+ "cancel_url": cancel_url,
125
141
  },
126
142
  headers={
127
143
  "content-type": "application/json",
@@ -12,6 +12,7 @@ if typing.TYPE_CHECKING:
12
12
  from .checkout.client import AsyncCheckoutClient, CheckoutClient
13
13
  from .customer_access.client import AsyncCustomerAccessClient, CustomerAccessClient
14
14
  from .customer_portal.client import AsyncCustomerPortalClient, CustomerPortalClient
15
+ from .invoices.client import AsyncInvoicesClient, InvoicesClient
15
16
  from .pricing_metrics.client import AsyncPricingMetricsClient, PricingMetricsClient
16
17
  from .rate_cards.client import AsyncRateCardsClient, RateCardsClient
17
18
  from .subjects.client import AsyncSubjectsClient, SubjectsClient
@@ -92,6 +93,7 @@ class Lark:
92
93
  self._subjects: typing.Optional[SubjectsClient] = None
93
94
  self._pricing_metrics: typing.Optional[PricingMetricsClient] = None
94
95
  self._customer_access: typing.Optional[CustomerAccessClient] = None
96
+ self._invoices: typing.Optional[InvoicesClient] = None
95
97
 
96
98
  @property
97
99
  def checkout(self):
@@ -157,6 +159,14 @@ class Lark:
157
159
  self._customer_access = CustomerAccessClient(client_wrapper=self._client_wrapper)
158
160
  return self._customer_access
159
161
 
162
+ @property
163
+ def invoices(self):
164
+ if self._invoices is None:
165
+ from .invoices.client import InvoicesClient # noqa: E402
166
+
167
+ self._invoices = InvoicesClient(client_wrapper=self._client_wrapper)
168
+ return self._invoices
169
+
160
170
 
161
171
  class AsyncLark:
162
172
  """
@@ -231,6 +241,7 @@ class AsyncLark:
231
241
  self._subjects: typing.Optional[AsyncSubjectsClient] = None
232
242
  self._pricing_metrics: typing.Optional[AsyncPricingMetricsClient] = None
233
243
  self._customer_access: typing.Optional[AsyncCustomerAccessClient] = None
244
+ self._invoices: typing.Optional[AsyncInvoicesClient] = None
234
245
 
235
246
  @property
236
247
  def checkout(self):
@@ -296,6 +307,14 @@ class AsyncLark:
296
307
  self._customer_access = AsyncCustomerAccessClient(client_wrapper=self._client_wrapper)
297
308
  return self._customer_access
298
309
 
310
+ @property
311
+ def invoices(self):
312
+ if self._invoices is None:
313
+ from .invoices.client import AsyncInvoicesClient # noqa: E402
314
+
315
+ self._invoices = AsyncInvoicesClient(client_wrapper=self._client_wrapper)
316
+ return self._invoices
317
+
299
318
 
300
319
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: LarkEnvironment) -> str:
301
320
  if base_url is not None:
@@ -22,10 +22,10 @@ class BaseClientWrapper:
22
22
 
23
23
  def get_headers(self) -> typing.Dict[str, str]:
24
24
  headers: typing.Dict[str, str] = {
25
- "User-Agent": "lark-billing/0.0.7",
25
+ "User-Agent": "lark-billing/0.0.9",
26
26
  "X-Fern-Language": "Python",
27
27
  "X-Fern-SDK-Name": "lark-billing",
28
- "X-Fern-SDK-Version": "0.0.7",
28
+ "X-Fern-SDK-Version": "0.0.9",
29
29
  **(self.get_custom_headers() or {}),
30
30
  }
31
31
  headers["X-API-Key"] = self.api_key
@@ -0,0 +1,42 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from ._api import EventSource, aconnect_sse, connect_sse
10
+ from ._exceptions import SSEError
11
+ from ._models import ServerSentEvent
12
+ _dynamic_imports: typing.Dict[str, str] = {
13
+ "EventSource": "._api",
14
+ "SSEError": "._exceptions",
15
+ "ServerSentEvent": "._models",
16
+ "aconnect_sse": "._api",
17
+ "connect_sse": "._api",
18
+ }
19
+
20
+
21
+ def __getattr__(attr_name: str) -> typing.Any:
22
+ module_name = _dynamic_imports.get(attr_name)
23
+ if module_name is None:
24
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
25
+ try:
26
+ module = import_module(module_name, __package__)
27
+ if module_name == f".{attr_name}":
28
+ return module
29
+ else:
30
+ return getattr(module, attr_name)
31
+ except ImportError as e:
32
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
33
+ except AttributeError as e:
34
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
35
+
36
+
37
+ def __dir__():
38
+ lazy_attrs = list(_dynamic_imports.keys())
39
+ return sorted(lazy_attrs)
40
+
41
+
42
+ __all__ = ["EventSource", "SSEError", "ServerSentEvent", "aconnect_sse", "connect_sse"]