lark-billing 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl

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 (154) hide show
  1. lark/__init__.py +92 -369
  2. lark/checkout/client.py +20 -79
  3. lark/checkout/raw_client.py +18 -102
  4. lark/client.py +112 -27
  5. lark/core/client_wrapper.py +2 -2
  6. lark/core/http_sse/__init__.py +42 -0
  7. lark/core/http_sse/_api.py +112 -0
  8. lark/core/http_sse/_decoders.py +61 -0
  9. lark/{types/credit_grant.py → core/http_sse/_exceptions.py} +4 -2
  10. lark/core/http_sse/_models.py +17 -0
  11. lark/core/pydantic_utilities.py +3 -1
  12. lark/{feature_access → customer_access}/client.py +30 -24
  13. lark/{feature_access → customer_access}/raw_client.py +22 -17
  14. lark/{types/rate_card.py → customer_portal/__init__.py} +1 -2
  15. lark/customer_portal/client.py +115 -0
  16. lark/customer_portal/raw_client.py +134 -0
  17. lark/environment.py +7 -0
  18. lark/{types/dimension.py → invoices/__init__.py} +1 -2
  19. lark/invoices/client.py +136 -0
  20. lark/invoices/raw_client.py +147 -0
  21. lark/pricing_metrics/__init__.py +38 -0
  22. lark/pricing_metrics/client.py +288 -0
  23. lark/pricing_metrics/raw_client.py +369 -0
  24. lark/pricing_metrics/types/__init__.py +42 -0
  25. lark/{types/credit_grant_resource_input_schedule.py → pricing_metrics/types/pricing_metric_aggregation.py} +7 -8
  26. lark/rate_cards/__init__.py +0 -15
  27. lark/rate_cards/client.py +30 -542
  28. lark/rate_cards/raw_client.py +34 -370
  29. lark/rate_cards/types/__init__.py +0 -17
  30. lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +3 -29
  31. lark/subjects/client.py +18 -54
  32. lark/subjects/raw_client.py +14 -24
  33. lark/subscriptions/client.py +104 -80
  34. lark/subscriptions/raw_client.py +186 -53
  35. lark/types/__init__.py +63 -379
  36. lark/types/aggregation.py +1 -43
  37. lark/types/amount.py +5 -1
  38. lark/types/{credit_grant_date_time_expiration_interface.py → billing_state_response.py} +3 -2
  39. lark/types/{credit_grant_schedule_one_time_resource.py → count_aggregation_pricing_metric_resource.py} +1 -1
  40. lark/types/{create_dimension_interface.py → create_customer_portal_session_response.py} +3 -3
  41. lark/types/{create_dimension_coordinate_interface.py → create_fixed_rate_request.py} +5 -3
  42. lark/types/{pricing_metric_interface.py → create_pricing_metric_response.py} +2 -5
  43. lark/types/{create_simple_usage_based_rate_interface.py → create_simple_usage_based_rate_request.py} +6 -9
  44. lark/types/create_subject_response.py +30 -6
  45. lark/types/create_subscription_checkout_session_response.py +1 -2
  46. lark/types/create_usage_event_summary_response.py +1 -1
  47. lark/types/fixed_rate_interface.py +0 -6
  48. lark/types/{create_pricing_metric_interface.py → get_pricing_metric_response.py} +3 -5
  49. lark/types/{complete_subscription_checkout_response.py → invoice_line_item_resource.py} +4 -2
  50. lark/types/invoice_resource.py +31 -0
  51. lark/types/invoice_status.py +5 -0
  52. lark/types/{check_feature_access_response.py → list_invoices_response.py} +4 -4
  53. lark/types/{check_feature_access_request.py → list_pricing_metrics_response.py} +4 -7
  54. lark/types/package_price.py +2 -2
  55. lark/types/package_price_input_rounding_behavior.py +5 -0
  56. lark/types/package_price_output_rounding_behavior.py +5 -0
  57. lark/types/period_resource.py +23 -0
  58. lark/types/price.py +39 -1
  59. lark/types/pricing_metric_resource.py +24 -0
  60. lark/types/rate_card_resource.py +0 -6
  61. lark/types/rate_card_resource_usage_based_rates_item.py +2 -29
  62. lark/types/simple_usage_based_rate_interface.py +1 -7
  63. lark/types/subject_resource.py +30 -6
  64. lark/types/subscription_resource.py +6 -4
  65. lark/types/subscription_status.py +5 -0
  66. lark/types/{credit_grant_date_time_expiration_resource.py → sum_aggregation_pricing_metric_resource.py} +2 -2
  67. lark/types/{subject.py → value.py} +1 -1
  68. lark/usage_events/client.py +8 -21
  69. lark/usage_events/raw_client.py +6 -6
  70. {lark_billing-0.0.6.dist-info → lark_billing-0.0.8.dist-info}/METADATA +4 -3
  71. lark_billing-0.0.8.dist-info/RECORD +107 -0
  72. lark/rate_cards/types/create_rate_card_version_request_usage_based_rates_item.py +0 -58
  73. lark/rate_cards/types/create_rate_card_version_request_version_type.py +0 -5
  74. lark/types/create_credit_grant_interface.py +0 -27
  75. lark/types/create_credit_grant_interface_expiration.py +0 -27
  76. lark/types/create_credit_pool_request.py +0 -5
  77. lark/types/create_dimensional_usage_based_rate_interface.py +0 -32
  78. lark/types/create_fixed_rate_interface.py +0 -28
  79. lark/types/create_pricing_matrix_cell_interface.py +0 -22
  80. lark/types/create_pricing_matrix_interface.py +0 -20
  81. lark/types/create_pricing_plan_request.py +0 -5
  82. lark/types/create_rate_card_response.py +0 -36
  83. lark/types/create_rate_card_response_billing_interval.py +0 -5
  84. lark/types/create_rate_card_response_usage_based_rates_item.py +0 -58
  85. lark/types/create_rate_card_version_response.py +0 -36
  86. lark/types/create_rate_card_version_response_billing_interval.py +0 -5
  87. lark/types/create_rate_card_version_response_usage_based_rates_item.py +0 -59
  88. lark/types/credit_grant_duration_expiration_interface.py +0 -21
  89. lark/types/credit_grant_duration_expiration_resource.py +0 -21
  90. lark/types/credit_grant_interface.py +0 -28
  91. lark/types/credit_grant_interface_input_expiration.py +0 -27
  92. lark/types/credit_grant_interface_output_expiration.py +0 -43
  93. lark/types/credit_grant_interface_output_schedule.py +0 -41
  94. lark/types/credit_grant_resource.py +0 -28
  95. lark/types/credit_grant_resource_input_expiration.py +0 -27
  96. lark/types/credit_grant_resource_output_expiration.py +0 -43
  97. lark/types/credit_grant_resource_output_schedule.py +0 -39
  98. lark/types/credit_grant_schedule.py +0 -5
  99. lark/types/credit_grant_schedule_one_time_interface.py +0 -19
  100. lark/types/credit_grant_schedule_rate_cycle_start_interface.py +0 -19
  101. lark/types/credit_grant_schedule_rate_cycle_start_resource.py +0 -17
  102. lark/types/credit_grant_subject_granting_config_interface.py +0 -20
  103. lark/types/credit_pool.py +0 -5
  104. lark/types/credit_pool_rollover_config.py +0 -5
  105. lark/types/custom_aggregation_pricing_metric_interface.py +0 -22
  106. lark/types/custom_pricing_metric.py +0 -5
  107. lark/types/custom_unit.py +0 -5
  108. lark/types/custom_unit_amount.py +0 -5
  109. lark/types/dimension_coordinate.py +0 -5
  110. lark/types/dimension_coordinate_interface.py +0 -20
  111. lark/types/dimension_coordinate_set.py +0 -5
  112. lark/types/dimension_interface.py +0 -20
  113. lark/types/dimensional_rate_matrix.py +0 -5
  114. lark/types/dimensional_rate_matrix_cell.py +0 -5
  115. lark/types/dimensional_usage_based_rate.py +0 -5
  116. lark/types/dimensional_usage_based_rate_input.py +0 -5
  117. lark/types/dimensional_usage_based_rate_interface.py +0 -33
  118. lark/types/feature_access_resource.py +0 -21
  119. lark/types/get_rate_card_response.py +0 -36
  120. lark/types/get_rate_card_response_billing_interval.py +0 -5
  121. lark/types/get_rate_card_response_usage_based_rates_item.py +0 -58
  122. lark/types/grant_credits_request.py +0 -5
  123. lark/types/last_aggregation_pricing_metric_interface.py +0 -22
  124. lark/types/license_based_rate.py +0 -5
  125. lark/types/license_based_rate_input.py +0 -5
  126. lark/types/max_aggregation_pricing_metric_interface.py +0 -22
  127. lark/types/monetary_amount.py +0 -5
  128. lark/types/package_price_rounding_behavior.py +0 -5
  129. lark/types/package_price_wrapper.py +0 -5
  130. lark/types/pricing_matrix_cell_interface.py +0 -22
  131. lark/types/pricing_matrix_interface.py +0 -20
  132. lark/types/pricing_metric.py +0 -5
  133. lark/types/pricing_plan.py +0 -5
  134. lark/types/pricing_plan_subscription.py +0 -5
  135. lark/types/pricing_tier.py +0 -5
  136. lark/types/rate_card_version.py +0 -5
  137. lark/types/rate_card_version_input.py +0 -5
  138. lark/types/simple_usage_based_rate.py +0 -5
  139. lark/types/simple_usage_based_rate_input.py +0 -5
  140. lark/types/status.py +0 -5
  141. lark/types/subject_granting_config.py +0 -5
  142. lark/types/subject_granting_config_resource.py +0 -20
  143. lark/types/tiered_price.py +0 -5
  144. lark/types/tiered_price_wrapper.py +0 -5
  145. lark/types/unit.py +0 -5
  146. lark/types/update_pricing_plan_request.py +0 -5
  147. lark/types/update_rate_card_request.py +0 -5
  148. lark/types/update_subscription_request.py +0 -5
  149. lark/types/usage_based_rate.py +0 -5
  150. lark/types/usage_based_rate_input.py +0 -5
  151. lark/types/usage_unit.py +0 -5
  152. lark_billing-0.0.6.dist-info/RECORD +0 -167
  153. /lark/{feature_access → customer_access}/__init__.py +0 -0
  154. {lark_billing-0.0.6.dist-info → lark_billing-0.0.8.dist-info}/WHEEL +0 -0
@@ -5,11 +5,11 @@ from __future__ import annotations
5
5
  import typing
6
6
 
7
7
  import pydantic
8
- from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
9
 
10
10
 
11
- class CreditGrantResourceInputSchedule_OneTime(UniversalBaseModel):
12
- schedule_type: typing.Literal["one_time"] = "one_time"
11
+ class PricingMetricAggregation_Count(UniversalBaseModel):
12
+ aggregation_type: typing.Literal["count"] = "count"
13
13
 
14
14
  if IS_PYDANTIC_V2:
15
15
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -21,8 +21,9 @@ class CreditGrantResourceInputSchedule_OneTime(UniversalBaseModel):
21
21
  extra = pydantic.Extra.allow
22
22
 
23
23
 
24
- class CreditGrantResourceInputSchedule_RateCycleStart(UniversalBaseModel):
25
- schedule_type: typing.Literal["rate_cycle_start"] = "rate_cycle_start"
24
+ class PricingMetricAggregation_Sum(UniversalBaseModel):
25
+ aggregation_type: typing.Literal["sum"] = "sum"
26
+ value_field: str
26
27
 
27
28
  if IS_PYDANTIC_V2:
28
29
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -34,6 +35,4 @@ class CreditGrantResourceInputSchedule_RateCycleStart(UniversalBaseModel):
34
35
  extra = pydantic.Extra.allow
35
36
 
36
37
 
37
- CreditGrantResourceInputSchedule = typing.Union[
38
- CreditGrantResourceInputSchedule_OneTime, CreditGrantResourceInputSchedule_RateCycleStart
39
- ]
38
+ PricingMetricAggregation = typing.Union[PricingMetricAggregation_Count, PricingMetricAggregation_Sum]
@@ -9,22 +9,12 @@ if typing.TYPE_CHECKING:
9
9
  from .types import (
10
10
  CreateRateCardRequestBillingInterval,
11
11
  CreateRateCardRequestUsageBasedRatesItem,
12
- CreateRateCardRequestUsageBasedRatesItem_Dimensional,
13
12
  CreateRateCardRequestUsageBasedRatesItem_Simple,
14
- CreateRateCardVersionRequestUsageBasedRatesItem,
15
- CreateRateCardVersionRequestUsageBasedRatesItem_Dimensional,
16
- CreateRateCardVersionRequestUsageBasedRatesItem_Simple,
17
- CreateRateCardVersionRequestVersionType,
18
13
  )
19
14
  _dynamic_imports: typing.Dict[str, str] = {
20
15
  "CreateRateCardRequestBillingInterval": ".types",
21
16
  "CreateRateCardRequestUsageBasedRatesItem": ".types",
22
- "CreateRateCardRequestUsageBasedRatesItem_Dimensional": ".types",
23
17
  "CreateRateCardRequestUsageBasedRatesItem_Simple": ".types",
24
- "CreateRateCardVersionRequestUsageBasedRatesItem": ".types",
25
- "CreateRateCardVersionRequestUsageBasedRatesItem_Dimensional": ".types",
26
- "CreateRateCardVersionRequestUsageBasedRatesItem_Simple": ".types",
27
- "CreateRateCardVersionRequestVersionType": ".types",
28
18
  }
29
19
 
30
20
 
@@ -52,10 +42,5 @@ def __dir__():
52
42
  __all__ = [
53
43
  "CreateRateCardRequestBillingInterval",
54
44
  "CreateRateCardRequestUsageBasedRatesItem",
55
- "CreateRateCardRequestUsageBasedRatesItem_Dimensional",
56
45
  "CreateRateCardRequestUsageBasedRatesItem_Simple",
57
- "CreateRateCardVersionRequestUsageBasedRatesItem",
58
- "CreateRateCardVersionRequestUsageBasedRatesItem_Dimensional",
59
- "CreateRateCardVersionRequestUsageBasedRatesItem_Simple",
60
- "CreateRateCardVersionRequestVersionType",
61
46
  ]