File tree Expand file tree Collapse file tree 7 files changed +74
-1
lines changed
lago_python_client/models Expand file tree Collapse file tree 7 files changed +74
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ class ChargeFilter(BaseModel):
12
12
values : Optional [Dict [str , List [str ]]]
13
13
14
14
15
+ class AppliedPricingUnit (BaseModel ):
16
+ code : Optional [str ]
17
+ conversion_rate : Optional [float ]
18
+
19
+
15
20
class ChargeFilters (BaseModel ):
16
21
__root__ : List [ChargeFilter ]
17
22
@@ -29,6 +34,7 @@ class Charge(BaseModel):
29
34
properties : Optional [Dict [str , Any ]]
30
35
filters : Optional [ChargeFilters ]
31
36
tax_codes : Optional [List [str ]]
37
+ applied_pricing_unit : Optional [AppliedPricingUnit ]
32
38
33
39
34
40
class Charges (BaseModel ):
Original file line number Diff line number Diff line change @@ -12,12 +12,19 @@ class Metric(BaseModel):
12
12
aggregation_type : str
13
13
14
14
15
+ class PricingUnitDetails (BaseModel ):
16
+ amount_cents : int
17
+ short_name : str
18
+ conversion_rate : float
19
+
20
+
15
21
class ChargeFilterUsage (BaseModel ):
16
22
invoice_display_name : Optional [str ]
17
23
values : Dict [str , List [str ]]
18
24
units : str
19
25
amount_cents : int
20
26
events_count : int
27
+ pricing_unit_details : Optional [PricingUnitDetails ]
21
28
22
29
23
30
class ChargeObject (BaseModel ):
@@ -32,6 +39,7 @@ class GroupedUsage(BaseModel):
32
39
units : float
33
40
grouped_by : Dict [str , str ]
34
41
filters : List [ChargeFilterUsage ]
42
+ pricing_unit_details : Optional [PricingUnitDetails ]
35
43
36
44
37
45
class ChargeUsage (BaseModel ):
@@ -43,6 +51,7 @@ class ChargeUsage(BaseModel):
43
51
billable_metric : Metric
44
52
filters : List [ChargeFilterUsage ]
45
53
grouped_usage : Optional [List [GroupedUsage ]]
54
+ pricing_unit_details : Optional [PricingUnitDetails ]
46
55
47
56
48
57
class CustomerUsageResponse (BaseResponseModel ):
Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ class FeeAppliedTaxes(BaseResponseModel):
26
26
__root__ : List [FeeAppliedTax ]
27
27
28
28
29
+ class PricingUnitDetails (BaseResponseModel ):
30
+ lago_pricing_unit_id : Optional [str ]
31
+ pricing_unit_code : Optional [str ]
32
+ short_name : Optional [str ]
33
+ amount_cents : Optional [int ]
34
+ precise_amount_cents : Optional [str ]
35
+ unit_amount_cents : Optional [int ]
36
+ precise_unit_amount : Optional [str ]
37
+ conversion_rate : Optional [float ]
38
+
39
+
29
40
class FeeResponse (BaseResponseModel ):
30
41
lago_id : Optional [str ]
31
42
lago_charge_id : Optional [str ]
@@ -59,6 +70,7 @@ class FeeResponse(BaseResponseModel):
59
70
from_date : Optional [str ]
60
71
to_date : Optional [str ]
61
72
amount_details : Optional [Dict [str , Any ]]
73
+ pricing_unit_details : Optional [PricingUnitDetails ]
62
74
billing_entity_code : Optional [str ]
63
75
64
76
item : Optional [InvoiceItemResponse ]
Original file line number Diff line number Diff line change 25
25
"code" : " usage_metric" ,
26
26
"aggregation_type" : " sum"
27
27
},
28
+ "pricing_unit_details" : {
29
+ "amount_cents" : 123 ,
30
+ "short_name" : " CR" ,
31
+ "conversion_rate" : 1.0
32
+ },
28
33
"filters" : [
29
34
{
30
35
"units" : " 3.0" ,
34
39
"country" : [
35
40
" france"
36
41
]
42
+ },
43
+ "pricing_unit_details" : {
44
+ "amount_cents" : 123 ,
45
+ "short_name" : " CR" ,
46
+ "conversion_rate" : 1.0
37
47
}
38
48
}
39
49
]
Original file line number Diff line number Diff line change 25
25
"code" : " usage_metric" ,
26
26
"aggregation_type" : " sum"
27
27
},
28
+ "pricing_unit_details" : {
29
+ "amount_cents" : 123 ,
30
+ "short_name" : " CR" ,
31
+ "conversion_rate" : 1.0
32
+ },
28
33
"filters" : [
29
34
{
30
35
"units" : " 3.0" ,
34
39
"country" : [
35
40
" france"
36
41
]
42
+ },
43
+ "pricing_unit_details" : {
44
+ "amount_cents" : 123 ,
45
+ "short_name" : " CR" ,
46
+ "conversion_rate" : 1.0
37
47
}
38
48
}
39
49
],
45
55
"grouped_by" : {
46
56
"agent_name" : " aragorn"
47
57
},
58
+ "pricing_unit_details" : {
59
+ "amount_cents" : 456 ,
60
+ "short_name" : " CR" ,
61
+ "conversion_rate" : 1.2
62
+ },
48
63
"filters" : [
49
64
{
50
65
"units" : " 3.0" ,
54
69
"country" : [
55
70
" france"
56
71
]
57
- }
72
+ },
73
+ "pricing_unit_details" : null
58
74
}
59
75
]
60
76
}
Original file line number Diff line number Diff line change 26
26
"total_amount_currency" : " EUR" ,
27
27
"units" : " 10.0" ,
28
28
"events_count" : 10 ,
29
+ "pricing_unit_details" : {
30
+ "lago_pricing_unit_id" : " 1a901a90-1a90-1a90-1a90-1a901a901a90" ,
31
+ "pricing_unit_code" : " unit_code" ,
32
+ "short_name" : " UC" ,
33
+ "amount_cents" : 120 ,
34
+ "precise_amount_cents" : " 120.00" ,
35
+ "unit_amount_cents" : 12 ,
36
+ "precise_unit_amount" : " 12.00" ,
37
+ "conversion_rate" : 1.0
38
+ },
29
39
"applied_taxes" : [
30
40
{
31
41
"lago_id" : " 1a901a90-1a90-1a90-1a90-1a901a901a90" ,
Original file line number Diff line number Diff line change 26
26
"total_amount_currency" : " EUR" ,
27
27
"units" : " 1.0" ,
28
28
"events_count" : 1 ,
29
+ "pricing_unit_details" : {
30
+ "lago_pricing_unit_id" : " 1a901a90-1a90-1a90-1a90-1a901a901a90" ,
31
+ "pricing_unit_code" : " unit_code" ,
32
+ "short_name" : " UN" ,
33
+ "amount_cents" : 120 ,
34
+ "precise_amount_cents" : " 120.00" ,
35
+ "unit_amount_cents" : 120 ,
36
+ "precise_unit_amount" : " 120.00" ,
37
+ "conversion_rate" : 1.0
38
+ },
29
39
"applied_taxes" : [
30
40
{
31
41
"lago_id" : " 1a901a90-1a90-1a90-1a90-1a901a901a90" ,
You can’t perform that action at this time.
0 commit comments