lark-billing 0.0.6__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.
- lark/__init__.py +522 -0
- lark/checkout/__init__.py +4 -0
- lark/checkout/client.py +214 -0
- lark/checkout/raw_client.py +252 -0
- lark/client.py +240 -0
- lark/core/__init__.py +105 -0
- lark/core/api_error.py +23 -0
- lark/core/client_wrapper.py +79 -0
- lark/core/datetime_utils.py +28 -0
- lark/core/file.py +67 -0
- lark/core/force_multipart.py +18 -0
- lark/core/http_client.py +543 -0
- lark/core/http_response.py +55 -0
- lark/core/jsonable_encoder.py +100 -0
- lark/core/pydantic_utilities.py +258 -0
- lark/core/query_encoder.py +58 -0
- lark/core/remove_none_from_dict.py +11 -0
- lark/core/request_options.py +35 -0
- lark/core/serialization.py +276 -0
- lark/errors/__init__.py +34 -0
- lark/errors/unprocessable_entity_error.py +11 -0
- lark/feature_access/__init__.py +4 -0
- lark/feature_access/client.py +102 -0
- lark/feature_access/raw_client.py +113 -0
- lark/py.typed +0 -0
- lark/rate_cards/__init__.py +61 -0
- lark/rate_cards/client.py +817 -0
- lark/rate_cards/raw_client.py +728 -0
- lark/rate_cards/types/__init__.py +63 -0
- lark/rate_cards/types/create_rate_card_request_billing_interval.py +5 -0
- lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +56 -0
- lark/rate_cards/types/create_rate_card_version_request_usage_based_rates_item.py +58 -0
- lark/rate_cards/types/create_rate_card_version_request_version_type.py +5 -0
- lark/subjects/__init__.py +4 -0
- lark/subjects/client.py +501 -0
- lark/subjects/raw_client.py +633 -0
- lark/subscriptions/__init__.py +4 -0
- lark/subscriptions/client.py +462 -0
- lark/subscriptions/raw_client.py +495 -0
- lark/types/__init__.py +493 -0
- lark/types/aggregation.py +80 -0
- lark/types/amount.py +20 -0
- lark/types/check_feature_access_request.py +24 -0
- lark/types/check_feature_access_response.py +21 -0
- lark/types/complete_subscription_checkout_response.py +21 -0
- lark/types/count_aggregation_pricing_metric_interface.py +17 -0
- lark/types/create_credit_grant_interface.py +27 -0
- lark/types/create_credit_grant_interface_expiration.py +27 -0
- lark/types/create_credit_pool_request.py +5 -0
- lark/types/create_dimension_coordinate_interface.py +20 -0
- lark/types/create_dimension_interface.py +20 -0
- lark/types/create_dimensional_usage_based_rate_interface.py +32 -0
- lark/types/create_fixed_rate_interface.py +28 -0
- lark/types/create_pricing_matrix_cell_interface.py +22 -0
- lark/types/create_pricing_matrix_interface.py +20 -0
- lark/types/create_pricing_metric_interface.py +26 -0
- lark/types/create_pricing_plan_request.py +5 -0
- lark/types/create_rate_card_response.py +36 -0
- lark/types/create_rate_card_response_billing_interval.py +5 -0
- lark/types/create_rate_card_response_usage_based_rates_item.py +58 -0
- lark/types/create_rate_card_version_response.py +36 -0
- lark/types/create_rate_card_version_response_billing_interval.py +5 -0
- lark/types/create_rate_card_version_response_usage_based_rates_item.py +59 -0
- lark/types/create_simple_usage_based_rate_interface.py +30 -0
- lark/types/create_subject_response.py +24 -0
- lark/types/create_subscription_checkout_session_response.py +23 -0
- lark/types/create_usage_event_summary_response.py +23 -0
- lark/types/credit_grant.py +5 -0
- lark/types/credit_grant_date_time_expiration_interface.py +19 -0
- lark/types/credit_grant_date_time_expiration_resource.py +19 -0
- lark/types/credit_grant_duration_expiration_interface.py +21 -0
- lark/types/credit_grant_duration_expiration_resource.py +21 -0
- lark/types/credit_grant_interface.py +28 -0
- lark/types/credit_grant_interface_input_expiration.py +27 -0
- lark/types/credit_grant_interface_output_expiration.py +43 -0
- lark/types/credit_grant_interface_output_schedule.py +41 -0
- lark/types/credit_grant_resource.py +28 -0
- lark/types/credit_grant_resource_input_expiration.py +27 -0
- lark/types/credit_grant_resource_input_schedule.py +39 -0
- lark/types/credit_grant_resource_output_expiration.py +43 -0
- lark/types/credit_grant_resource_output_schedule.py +39 -0
- lark/types/credit_grant_schedule.py +5 -0
- lark/types/credit_grant_schedule_one_time_interface.py +19 -0
- lark/types/credit_grant_schedule_one_time_resource.py +17 -0
- lark/types/credit_grant_schedule_rate_cycle_start_interface.py +19 -0
- lark/types/credit_grant_schedule_rate_cycle_start_resource.py +17 -0
- lark/types/credit_grant_subject_granting_config_interface.py +20 -0
- lark/types/credit_pool.py +5 -0
- lark/types/credit_pool_rollover_config.py +5 -0
- lark/types/custom_aggregation_pricing_metric_interface.py +22 -0
- lark/types/custom_pricing_metric.py +5 -0
- lark/types/custom_unit.py +5 -0
- lark/types/custom_unit_amount.py +5 -0
- lark/types/dimension.py +5 -0
- lark/types/dimension_coordinate.py +5 -0
- lark/types/dimension_coordinate_interface.py +20 -0
- lark/types/dimension_coordinate_set.py +5 -0
- lark/types/dimension_interface.py +20 -0
- lark/types/dimensional_rate_matrix.py +5 -0
- lark/types/dimensional_rate_matrix_cell.py +5 -0
- lark/types/dimensional_usage_based_rate.py +5 -0
- lark/types/dimensional_usage_based_rate_input.py +5 -0
- lark/types/dimensional_usage_based_rate_interface.py +33 -0
- lark/types/feature_access_resource.py +21 -0
- lark/types/fixed_rate_interface.py +29 -0
- lark/types/flat_price.py +24 -0
- lark/types/get_rate_card_response.py +36 -0
- lark/types/get_rate_card_response_billing_interval.py +5 -0
- lark/types/get_rate_card_response_usage_based_rates_item.py +58 -0
- lark/types/grant_credits_request.py +5 -0
- lark/types/http_validation_error.py +20 -0
- lark/types/last_aggregation_pricing_metric_interface.py +22 -0
- lark/types/license_based_rate.py +5 -0
- lark/types/license_based_rate_input.py +5 -0
- lark/types/list_rate_cards_response.py +21 -0
- lark/types/list_subjects_response.py +21 -0
- lark/types/list_subscriptions_response.py +21 -0
- lark/types/max_aggregation_pricing_metric_interface.py +22 -0
- lark/types/monetary_amount.py +5 -0
- lark/types/package_price.py +27 -0
- lark/types/package_price_rounding_behavior.py +5 -0
- lark/types/package_price_wrapper.py +5 -0
- lark/types/period.py +22 -0
- lark/types/price.py +5 -0
- lark/types/pricing_matrix_cell_interface.py +22 -0
- lark/types/pricing_matrix_interface.py +20 -0
- lark/types/pricing_metric.py +5 -0
- lark/types/pricing_metric_interface.py +27 -0
- lark/types/pricing_plan.py +5 -0
- lark/types/pricing_plan_subscription.py +5 -0
- lark/types/pricing_tier.py +5 -0
- lark/types/rate_card.py +5 -0
- lark/types/rate_card_resource.py +36 -0
- lark/types/rate_card_resource_billing_interval.py +5 -0
- lark/types/rate_card_resource_usage_based_rates_item.py +58 -0
- lark/types/rate_card_version.py +5 -0
- lark/types/rate_card_version_input.py +5 -0
- lark/types/simple_usage_based_rate.py +5 -0
- lark/types/simple_usage_based_rate_input.py +5 -0
- lark/types/simple_usage_based_rate_interface.py +31 -0
- lark/types/status.py +5 -0
- lark/types/subject.py +5 -0
- lark/types/subject_granting_config.py +5 -0
- lark/types/subject_granting_config_resource.py +20 -0
- lark/types/subject_resource.py +24 -0
- lark/types/subscription_resource.py +28 -0
- lark/types/sum_aggregation_pricing_metric_interface.py +22 -0
- lark/types/tiered_price.py +5 -0
- lark/types/tiered_price_wrapper.py +5 -0
- lark/types/unit.py +5 -0
- lark/types/update_pricing_plan_request.py +5 -0
- lark/types/update_rate_card_request.py +5 -0
- lark/types/update_subscription_request.py +5 -0
- lark/types/usage_based_rate.py +5 -0
- lark/types/usage_based_rate_input.py +5 -0
- lark/types/usage_unit.py +5 -0
- lark/types/validation_error.py +22 -0
- lark/types/validation_error_loc_item.py +5 -0
- lark/usage_events/__init__.py +34 -0
- lark/usage_events/client.py +293 -0
- lark/usage_events/raw_client.py +318 -0
- lark/usage_events/types/__init__.py +36 -0
- lark/usage_events/types/create_usage_event_summary_request_aggregation_type.py +5 -0
- lark/version.py +3 -0
- lark_billing-0.0.6.dist-info/METADATA +188 -0
- lark_billing-0.0.6.dist-info/RECORD +167 -0
- lark_billing-0.0.6.dist-info/WHEEL +4 -0
lark/types/flat_price.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .amount import Amount
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FlatPrice(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Flat price is a price that linearly scales with the quantity.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
amount: Amount
|
|
16
|
+
|
|
17
|
+
if IS_PYDANTIC_V2:
|
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class Config:
|
|
22
|
+
frozen = True
|
|
23
|
+
smart_union = True
|
|
24
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .credit_grant_resource import CreditGrantResource
|
|
8
|
+
from .feature_access_resource import FeatureAccessResource
|
|
9
|
+
from .fixed_rate_interface import FixedRateInterface
|
|
10
|
+
from .get_rate_card_response_billing_interval import GetRateCardResponseBillingInterval
|
|
11
|
+
from .get_rate_card_response_usage_based_rates_item import GetRateCardResponseUsageBasedRatesItem
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GetRateCardResponse(UniversalBaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
name: str
|
|
17
|
+
description: str
|
|
18
|
+
usage_based_rates: typing.List[GetRateCardResponseUsageBasedRatesItem]
|
|
19
|
+
fixed_rates: typing.List[FixedRateInterface]
|
|
20
|
+
billing_interval: GetRateCardResponseBillingInterval
|
|
21
|
+
credit_grants: typing.List[CreditGrantResource]
|
|
22
|
+
created_at: str
|
|
23
|
+
updated_at: str
|
|
24
|
+
major_version: int
|
|
25
|
+
minor_version: int
|
|
26
|
+
feature_access: typing.List[FeatureAccessResource]
|
|
27
|
+
metadata: typing.Dict[str, str]
|
|
28
|
+
|
|
29
|
+
if IS_PYDANTIC_V2:
|
|
30
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import pydantic
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from .dimension_interface import DimensionInterface
|
|
10
|
+
from .price import Price
|
|
11
|
+
from .pricing_matrix_interface import PricingMatrixInterface
|
|
12
|
+
from .pricing_metric_interface import PricingMetricInterface
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GetRateCardResponseUsageBasedRatesItem_Dimensional(UniversalBaseModel):
|
|
16
|
+
usage_based_rate_type: typing.Literal["dimensional"] = "dimensional"
|
|
17
|
+
id: str
|
|
18
|
+
code: str
|
|
19
|
+
name: str
|
|
20
|
+
description: str
|
|
21
|
+
included_units: int
|
|
22
|
+
pricing_metric: PricingMetricInterface
|
|
23
|
+
dimensions: typing.List[DimensionInterface]
|
|
24
|
+
pricing_matrix: PricingMatrixInterface
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class GetRateCardResponseUsageBasedRatesItem_Simple(UniversalBaseModel):
|
|
37
|
+
usage_based_rate_type: typing.Literal["simple"] = "simple"
|
|
38
|
+
id: str
|
|
39
|
+
code: str
|
|
40
|
+
name: str
|
|
41
|
+
description: str
|
|
42
|
+
price: Price
|
|
43
|
+
included_units: int
|
|
44
|
+
pricing_metric: PricingMetricInterface
|
|
45
|
+
|
|
46
|
+
if IS_PYDANTIC_V2:
|
|
47
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
48
|
+
else:
|
|
49
|
+
|
|
50
|
+
class Config:
|
|
51
|
+
frozen = True
|
|
52
|
+
smart_union = True
|
|
53
|
+
extra = pydantic.Extra.allow
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
GetRateCardResponseUsageBasedRatesItem = typing.Union[
|
|
57
|
+
GetRateCardResponseUsageBasedRatesItem_Dimensional, GetRateCardResponseUsageBasedRatesItem_Simple
|
|
58
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .validation_error import ValidationError
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class HttpValidationError(UniversalBaseModel):
|
|
11
|
+
detail: typing.Optional[typing.List[ValidationError]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class LastAggregationPricingMetricInterface(UniversalBaseModel):
|
|
10
|
+
value_field: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
Field to get the last value of.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .rate_card_resource import RateCardResource
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListRateCardsResponse(UniversalBaseModel):
|
|
11
|
+
rate_cards: typing.List[RateCardResource]
|
|
12
|
+
has_more: bool
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .subject_resource import SubjectResource
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListSubjectsResponse(UniversalBaseModel):
|
|
11
|
+
subjects: typing.List[SubjectResource]
|
|
12
|
+
has_more: bool
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .subscription_resource import SubscriptionResource
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListSubscriptionsResponse(UniversalBaseModel):
|
|
11
|
+
subscriptions: typing.List[SubscriptionResource]
|
|
12
|
+
has_more: bool
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MaxAggregationPricingMetricInterface(UniversalBaseModel):
|
|
10
|
+
value_field: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
Field to get the max value of.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .amount import Amount
|
|
8
|
+
from .package_price_rounding_behavior import PackagePriceRoundingBehavior
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PackagePrice(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Package price is a price that is charged for a fixed number of units. For example, $10 per 1000 units. If the quantity is not a multiple of the package units, the rounding behavior will be applied.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
amount: Amount
|
|
17
|
+
package_units: int
|
|
18
|
+
rounding_behavior: PackagePriceRoundingBehavior
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
lark/types/period.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Period(UniversalBaseModel):
|
|
10
|
+
inclusive_start: typing.Optional[bool] = None
|
|
11
|
+
inclusive_end: typing.Optional[bool] = None
|
|
12
|
+
start: str
|
|
13
|
+
end: str
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
lark/types/price.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .dimension_coordinate_interface import DimensionCoordinateInterface
|
|
8
|
+
from .price import Price
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PricingMatrixCellInterface(UniversalBaseModel):
|
|
12
|
+
dimension_coordinates: typing.List[DimensionCoordinateInterface]
|
|
13
|
+
price: Price
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .pricing_matrix_cell_interface import PricingMatrixCellInterface
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PricingMatrixInterface(UniversalBaseModel):
|
|
11
|
+
cells: typing.List[PricingMatrixCellInterface]
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .aggregation import Aggregation
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PricingMetricInterface(UniversalBaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
name: str
|
|
13
|
+
event_name: str
|
|
14
|
+
aggregation: Aggregation
|
|
15
|
+
unit: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Unit of the value computed by the pricing metric.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
lark/types/rate_card.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .credit_grant_resource import CreditGrantResource
|
|
8
|
+
from .feature_access_resource import FeatureAccessResource
|
|
9
|
+
from .fixed_rate_interface import FixedRateInterface
|
|
10
|
+
from .rate_card_resource_billing_interval import RateCardResourceBillingInterval
|
|
11
|
+
from .rate_card_resource_usage_based_rates_item import RateCardResourceUsageBasedRatesItem
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RateCardResource(UniversalBaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
name: str
|
|
17
|
+
description: str
|
|
18
|
+
usage_based_rates: typing.List[RateCardResourceUsageBasedRatesItem]
|
|
19
|
+
fixed_rates: typing.List[FixedRateInterface]
|
|
20
|
+
billing_interval: RateCardResourceBillingInterval
|
|
21
|
+
credit_grants: typing.List[CreditGrantResource]
|
|
22
|
+
created_at: str
|
|
23
|
+
updated_at: str
|
|
24
|
+
major_version: int
|
|
25
|
+
minor_version: int
|
|
26
|
+
feature_access: typing.List[FeatureAccessResource]
|
|
27
|
+
metadata: typing.Dict[str, str]
|
|
28
|
+
|
|
29
|
+
if IS_PYDANTIC_V2:
|
|
30
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import pydantic
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from .dimension_interface import DimensionInterface
|
|
10
|
+
from .price import Price
|
|
11
|
+
from .pricing_matrix_interface import PricingMatrixInterface
|
|
12
|
+
from .pricing_metric_interface import PricingMetricInterface
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RateCardResourceUsageBasedRatesItem_Dimensional(UniversalBaseModel):
|
|
16
|
+
usage_based_rate_type: typing.Literal["dimensional"] = "dimensional"
|
|
17
|
+
id: str
|
|
18
|
+
code: str
|
|
19
|
+
name: str
|
|
20
|
+
description: str
|
|
21
|
+
included_units: int
|
|
22
|
+
pricing_metric: PricingMetricInterface
|
|
23
|
+
dimensions: typing.List[DimensionInterface]
|
|
24
|
+
pricing_matrix: PricingMatrixInterface
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RateCardResourceUsageBasedRatesItem_Simple(UniversalBaseModel):
|
|
37
|
+
usage_based_rate_type: typing.Literal["simple"] = "simple"
|
|
38
|
+
id: str
|
|
39
|
+
code: str
|
|
40
|
+
name: str
|
|
41
|
+
description: str
|
|
42
|
+
price: Price
|
|
43
|
+
included_units: int
|
|
44
|
+
pricing_metric: PricingMetricInterface
|
|
45
|
+
|
|
46
|
+
if IS_PYDANTIC_V2:
|
|
47
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
48
|
+
else:
|
|
49
|
+
|
|
50
|
+
class Config:
|
|
51
|
+
frozen = True
|
|
52
|
+
smart_union = True
|
|
53
|
+
extra = pydantic.Extra.allow
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
RateCardResourceUsageBasedRatesItem = typing.Union[
|
|
57
|
+
RateCardResourceUsageBasedRatesItem_Dimensional, RateCardResourceUsageBasedRatesItem_Simple
|
|
58
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .price import Price
|
|
8
|
+
from .pricing_metric_interface import PricingMetricInterface
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SimpleUsageBasedRateInterface(UniversalBaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
code: str = pydantic.Field()
|
|
14
|
+
"""
|
|
15
|
+
Code of this rate to be used for overrides and external reference.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
name: str
|
|
19
|
+
description: str
|
|
20
|
+
price: Price
|
|
21
|
+
included_units: int
|
|
22
|
+
pricing_metric: PricingMetricInterface
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|
lark/types/status.py
ADDED
lark/types/subject.py
ADDED