openmeter 1.0.0b97__py3-none-any.whl → 1.0.0b99__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 openmeter might be problematic. Click here for more details.
- openmeter/_operations/_operations.py +80 -43
- openmeter/aio/_operations/_operations.py +77 -41
- {openmeter-1.0.0b97.dist-info → openmeter-1.0.0b99.dist-info}/METADATA +1 -1
- {openmeter-1.0.0b97.dist-info → openmeter-1.0.0b99.dist-info}/RECORD +5 -5
- {openmeter-1.0.0b97.dist-info → openmeter-1.0.0b99.dist-info}/WHEEL +0 -0
|
@@ -719,8 +719,8 @@ def build_get_entitlement_history_request(
|
|
|
719
719
|
subject_id_or_key: str,
|
|
720
720
|
entitlement_id: str,
|
|
721
721
|
*,
|
|
722
|
-
from_parameter: datetime.datetime,
|
|
723
722
|
window_size: str,
|
|
723
|
+
from_parameter: Optional[datetime.datetime] = None,
|
|
724
724
|
to: Optional[datetime.datetime] = None,
|
|
725
725
|
window_time_zone: str = "UTC",
|
|
726
726
|
**kwargs: Any
|
|
@@ -740,7 +740,8 @@ def build_get_entitlement_history_request(
|
|
|
740
740
|
_url: str = _url.format(**path_format_arguments) # type: ignore
|
|
741
741
|
|
|
742
742
|
# Construct parameters
|
|
743
|
-
|
|
743
|
+
if from_parameter is not None:
|
|
744
|
+
_params["from"] = _SERIALIZER.query("from_parameter", from_parameter, "iso-8601")
|
|
744
745
|
if to is not None:
|
|
745
746
|
_params["to"] = _SERIALIZER.query("to", to, "iso-8601")
|
|
746
747
|
_params["windowSize"] = _SERIALIZER.query("window_size", window_size, "str")
|
|
@@ -3177,14 +3178,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3177
3178
|
was last updated. Required.
|
|
3178
3179
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date
|
|
3179
3180
|
of the grant.
|
|
3180
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3181
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
3182
|
+
rolled over at reset, after which they can have a different balance compared
|
|
3183
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
3184
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3185
|
+
MinRolloverAmount)).
|
|
3185
3186
|
"metadata": {
|
|
3186
3187
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3187
3188
|
},
|
|
3189
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
3190
|
+
rolled over at reset, after which they can have a different balance compared
|
|
3191
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
3192
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3193
|
+
MinRolloverAmount)).
|
|
3188
3194
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time
|
|
3189
3195
|
the grant will recurr.
|
|
3190
3196
|
"priority": 1, # Optional. Default value is 1. The priority of the
|
|
@@ -3765,14 +3771,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3765
3771
|
was last updated. Required.
|
|
3766
3772
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date
|
|
3767
3773
|
of the grant.
|
|
3768
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3774
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
3775
|
+
rolled over at reset, after which they can have a different balance compared
|
|
3776
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
3777
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3778
|
+
MinRolloverAmount)).
|
|
3773
3779
|
"metadata": {
|
|
3774
3780
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3775
3781
|
},
|
|
3782
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
3783
|
+
rolled over at reset, after which they can have a different balance compared
|
|
3784
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
3785
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3786
|
+
MinRolloverAmount)).
|
|
3776
3787
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time
|
|
3777
3788
|
the grant will recurr.
|
|
3778
3789
|
"priority": 1, # Optional. Default value is 1. The priority of the
|
|
@@ -3884,14 +3895,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3884
3895
|
"duration": "str" # The expiration period duration like month.
|
|
3885
3896
|
Required. Known values are: "HOUR", "DAY", "WEEK", "MONTH", and "YEAR".
|
|
3886
3897
|
},
|
|
3887
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3898
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3899
|
+
over at reset, after which they can have a different balance compared to what
|
|
3900
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3901
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3902
|
+
MinRolloverAmount)).
|
|
3892
3903
|
"metadata": {
|
|
3893
3904
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3894
3905
|
},
|
|
3906
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3907
|
+
over at reset, after which they can have a different balance compared to what
|
|
3908
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3909
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3910
|
+
MinRolloverAmount)).
|
|
3895
3911
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
3896
3912
|
Grants with higher priority are applied first. Priority is a positive decimal
|
|
3897
3913
|
numbers. With lower numbers indicating higher importance. For example, a priority
|
|
@@ -3933,14 +3949,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3933
3949
|
last updated. Required.
|
|
3934
3950
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date of the
|
|
3935
3951
|
grant.
|
|
3936
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3952
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3953
|
+
over at reset, after which they can have a different balance compared to what
|
|
3954
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3955
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3956
|
+
MinRolloverAmount)).
|
|
3941
3957
|
"metadata": {
|
|
3942
3958
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3943
3959
|
},
|
|
3960
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3961
|
+
over at reset, after which they can have a different balance compared to what
|
|
3962
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3963
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3964
|
+
MinRolloverAmount)).
|
|
3944
3965
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time the grant
|
|
3945
3966
|
will recurr.
|
|
3946
3967
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
@@ -4017,14 +4038,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
4017
4038
|
last updated. Required.
|
|
4018
4039
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date of the
|
|
4019
4040
|
grant.
|
|
4020
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4041
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
4042
|
+
over at reset, after which they can have a different balance compared to what
|
|
4043
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
4044
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
4045
|
+
MinRolloverAmount)).
|
|
4025
4046
|
"metadata": {
|
|
4026
4047
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
4027
4048
|
},
|
|
4049
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
4050
|
+
over at reset, after which they can have a different balance compared to what
|
|
4051
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
4052
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
4053
|
+
MinRolloverAmount)).
|
|
4028
4054
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time the grant
|
|
4029
4055
|
will recurr.
|
|
4030
4056
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
@@ -4081,14 +4107,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
4081
4107
|
"duration": "str" # The expiration period duration like month.
|
|
4082
4108
|
Required. Known values are: "HOUR", "DAY", "WEEK", "MONTH", and "YEAR".
|
|
4083
4109
|
},
|
|
4084
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4110
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
4111
|
+
over at reset, after which they can have a different balance compared to what
|
|
4112
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
4113
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
4114
|
+
MinRolloverAmount)).
|
|
4089
4115
|
"metadata": {
|
|
4090
4116
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
4091
4117
|
},
|
|
4118
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
4119
|
+
over at reset, after which they can have a different balance compared to what
|
|
4120
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
4121
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
4122
|
+
MinRolloverAmount)).
|
|
4092
4123
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
4093
4124
|
Grants with higher priority are applied first. Priority is a positive decimal
|
|
4094
4125
|
numbers. With lower numbers indicating higher importance. For example, a priority
|
|
@@ -4130,14 +4161,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
4130
4161
|
last updated. Required.
|
|
4131
4162
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date of the
|
|
4132
4163
|
grant.
|
|
4133
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4164
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
4165
|
+
over at reset, after which they can have a different balance compared to what
|
|
4166
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
4167
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
4168
|
+
MinRolloverAmount)).
|
|
4138
4169
|
"metadata": {
|
|
4139
4170
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
4140
4171
|
},
|
|
4172
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
4173
|
+
over at reset, after which they can have a different balance compared to what
|
|
4174
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
4175
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
4176
|
+
MinRolloverAmount)).
|
|
4141
4177
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time the grant
|
|
4142
4178
|
will recurr.
|
|
4143
4179
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
@@ -4311,8 +4347,8 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
4311
4347
|
subject_id_or_key: str,
|
|
4312
4348
|
entitlement_id: str,
|
|
4313
4349
|
*,
|
|
4314
|
-
from_parameter: datetime.datetime,
|
|
4315
4350
|
window_size: str,
|
|
4351
|
+
from_parameter: Optional[datetime.datetime] = None,
|
|
4316
4352
|
to: Optional[datetime.datetime] = None,
|
|
4317
4353
|
window_time_zone: str = "UTC",
|
|
4318
4354
|
**kwargs: Any
|
|
@@ -4329,13 +4365,14 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
4329
4365
|
:type subject_id_or_key: str
|
|
4330
4366
|
:param entitlement_id: A unique ULID for an entitlement. Required.
|
|
4331
4367
|
:type entitlement_id: str
|
|
4332
|
-
:keyword from_parameter: Start of time range to query entitlement: date-time in RFC 3339
|
|
4333
|
-
format.
|
|
4334
|
-
Gets truncated to the granularity of the underlying meter. Required.
|
|
4335
|
-
:paramtype from_parameter: ~datetime.datetime
|
|
4336
4368
|
:keyword window_size: Size of the time window to group the history by. Cannot be shorter than
|
|
4337
4369
|
meter granularity. Known values are: "MINUTE", "HOUR", and "DAY". Required.
|
|
4338
4370
|
:paramtype window_size: str
|
|
4371
|
+
:keyword from_parameter: Start of time range to query entitlement: date-time in RFC 3339
|
|
4372
|
+
format. Defaults to
|
|
4373
|
+
the last reset.
|
|
4374
|
+
Gets truncated to the granularity of the underlying meter. Default value is None.
|
|
4375
|
+
:paramtype from_parameter: ~datetime.datetime
|
|
4339
4376
|
:keyword to: End of time range to query entitlement: date-time in RFC 3339 format. Defaults to
|
|
4340
4377
|
now.
|
|
4341
4378
|
If not now then gets truncated to the granularity of the underlying meter. Default value is
|
|
@@ -4421,8 +4458,8 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
4421
4458
|
_request = build_get_entitlement_history_request(
|
|
4422
4459
|
subject_id_or_key=subject_id_or_key,
|
|
4423
4460
|
entitlement_id=entitlement_id,
|
|
4424
|
-
from_parameter=from_parameter,
|
|
4425
4461
|
window_size=window_size,
|
|
4462
|
+
from_parameter=from_parameter,
|
|
4426
4463
|
to=to,
|
|
4427
4464
|
window_time_zone=window_time_zone,
|
|
4428
4465
|
headers=_headers,
|
|
@@ -2476,14 +2476,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
2476
2476
|
was last updated. Required.
|
|
2477
2477
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date
|
|
2478
2478
|
of the grant.
|
|
2479
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2479
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
2480
|
+
rolled over at reset, after which they can have a different balance compared
|
|
2481
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
2482
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
2483
|
+
MinRolloverAmount)).
|
|
2484
2484
|
"metadata": {
|
|
2485
2485
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
2486
2486
|
},
|
|
2487
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
2488
|
+
rolled over at reset, after which they can have a different balance compared
|
|
2489
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
2490
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
2491
|
+
MinRolloverAmount)).
|
|
2487
2492
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time
|
|
2488
2493
|
the grant will recurr.
|
|
2489
2494
|
"priority": 1, # Optional. Default value is 1. The priority of the
|
|
@@ -3064,14 +3069,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3064
3069
|
was last updated. Required.
|
|
3065
3070
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date
|
|
3066
3071
|
of the grant.
|
|
3067
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
3073
|
+
rolled over at reset, after which they can have a different balance compared
|
|
3074
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
3075
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3076
|
+
MinRolloverAmount)).
|
|
3072
3077
|
"metadata": {
|
|
3073
3078
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3074
3079
|
},
|
|
3080
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are
|
|
3081
|
+
rolled over at reset, after which they can have a different balance compared
|
|
3082
|
+
to what they had before the reset. Balance after the reset is calculated as:
|
|
3083
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3084
|
+
MinRolloverAmount)).
|
|
3075
3085
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time
|
|
3076
3086
|
the grant will recurr.
|
|
3077
3087
|
"priority": 1, # Optional. Default value is 1. The priority of the
|
|
@@ -3183,14 +3193,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3183
3193
|
"duration": "str" # The expiration period duration like month.
|
|
3184
3194
|
Required. Known values are: "HOUR", "DAY", "WEEK", "MONTH", and "YEAR".
|
|
3185
3195
|
},
|
|
3186
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3196
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3197
|
+
over at reset, after which they can have a different balance compared to what
|
|
3198
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3199
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3200
|
+
MinRolloverAmount)).
|
|
3191
3201
|
"metadata": {
|
|
3192
3202
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3193
3203
|
},
|
|
3204
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3205
|
+
over at reset, after which they can have a different balance compared to what
|
|
3206
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3207
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3208
|
+
MinRolloverAmount)).
|
|
3194
3209
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
3195
3210
|
Grants with higher priority are applied first. Priority is a positive decimal
|
|
3196
3211
|
numbers. With lower numbers indicating higher importance. For example, a priority
|
|
@@ -3232,14 +3247,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3232
3247
|
last updated. Required.
|
|
3233
3248
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date of the
|
|
3234
3249
|
grant.
|
|
3235
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3250
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3251
|
+
over at reset, after which they can have a different balance compared to what
|
|
3252
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3253
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3254
|
+
MinRolloverAmount)).
|
|
3240
3255
|
"metadata": {
|
|
3241
3256
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3242
3257
|
},
|
|
3258
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3259
|
+
over at reset, after which they can have a different balance compared to what
|
|
3260
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3261
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3262
|
+
MinRolloverAmount)).
|
|
3243
3263
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time the grant
|
|
3244
3264
|
will recurr.
|
|
3245
3265
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
@@ -3316,14 +3336,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3316
3336
|
last updated. Required.
|
|
3317
3337
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date of the
|
|
3318
3338
|
grant.
|
|
3319
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3339
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3340
|
+
over at reset, after which they can have a different balance compared to what
|
|
3341
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3342
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3343
|
+
MinRolloverAmount)).
|
|
3324
3344
|
"metadata": {
|
|
3325
3345
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3326
3346
|
},
|
|
3347
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3348
|
+
over at reset, after which they can have a different balance compared to what
|
|
3349
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3350
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3351
|
+
MinRolloverAmount)).
|
|
3327
3352
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time the grant
|
|
3328
3353
|
will recurr.
|
|
3329
3354
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
@@ -3380,14 +3405,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3380
3405
|
"duration": "str" # The expiration period duration like month.
|
|
3381
3406
|
Required. Known values are: "HOUR", "DAY", "WEEK", "MONTH", and "YEAR".
|
|
3382
3407
|
},
|
|
3383
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3408
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3409
|
+
over at reset, after which they can have a different balance compared to what
|
|
3410
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3411
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3412
|
+
MinRolloverAmount)).
|
|
3388
3413
|
"metadata": {
|
|
3389
3414
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3390
3415
|
},
|
|
3416
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3417
|
+
over at reset, after which they can have a different balance compared to what
|
|
3418
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3419
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3420
|
+
MinRolloverAmount)).
|
|
3391
3421
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
3392
3422
|
Grants with higher priority are applied first. Priority is a positive decimal
|
|
3393
3423
|
numbers. With lower numbers indicating higher importance. For example, a priority
|
|
@@ -3429,14 +3459,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3429
3459
|
last updated. Required.
|
|
3430
3460
|
"expiresAt": "2020-02-20 00:00:00", # Optional. The expiration date of the
|
|
3431
3461
|
grant.
|
|
3432
|
-
"maxRolloverAmount": 0, # Optional. Default value is 0.
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3462
|
+
"maxRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3463
|
+
over at reset, after which they can have a different balance compared to what
|
|
3464
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3465
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3466
|
+
MinRolloverAmount)).
|
|
3437
3467
|
"metadata": {
|
|
3438
3468
|
"str": "str" # Optional. Dictionary of :code:`<string>`.
|
|
3439
3469
|
},
|
|
3470
|
+
"minRolloverAmount": 0, # Optional. Default value is 0. Grants are rolled
|
|
3471
|
+
over at reset, after which they can have a different balance compared to what
|
|
3472
|
+
they had before the reset. Balance after the reset is calculated as:
|
|
3473
|
+
Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset,
|
|
3474
|
+
MinRolloverAmount)).
|
|
3440
3475
|
"nextRecurrence": "2020-02-20 00:00:00", # Optional. The next time the grant
|
|
3441
3476
|
will recurr.
|
|
3442
3477
|
"priority": 1, # Optional. Default value is 1. The priority of the grant.
|
|
@@ -3610,8 +3645,8 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3610
3645
|
subject_id_or_key: str,
|
|
3611
3646
|
entitlement_id: str,
|
|
3612
3647
|
*,
|
|
3613
|
-
from_parameter: datetime.datetime,
|
|
3614
3648
|
window_size: str,
|
|
3649
|
+
from_parameter: Optional[datetime.datetime] = None,
|
|
3615
3650
|
to: Optional[datetime.datetime] = None,
|
|
3616
3651
|
window_time_zone: str = "UTC",
|
|
3617
3652
|
**kwargs: Any
|
|
@@ -3628,13 +3663,14 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3628
3663
|
:type subject_id_or_key: str
|
|
3629
3664
|
:param entitlement_id: A unique ULID for an entitlement. Required.
|
|
3630
3665
|
:type entitlement_id: str
|
|
3631
|
-
:keyword from_parameter: Start of time range to query entitlement: date-time in RFC 3339
|
|
3632
|
-
format.
|
|
3633
|
-
Gets truncated to the granularity of the underlying meter. Required.
|
|
3634
|
-
:paramtype from_parameter: ~datetime.datetime
|
|
3635
3666
|
:keyword window_size: Size of the time window to group the history by. Cannot be shorter than
|
|
3636
3667
|
meter granularity. Known values are: "MINUTE", "HOUR", and "DAY". Required.
|
|
3637
3668
|
:paramtype window_size: str
|
|
3669
|
+
:keyword from_parameter: Start of time range to query entitlement: date-time in RFC 3339
|
|
3670
|
+
format. Defaults to
|
|
3671
|
+
the last reset.
|
|
3672
|
+
Gets truncated to the granularity of the underlying meter. Default value is None.
|
|
3673
|
+
:paramtype from_parameter: ~datetime.datetime
|
|
3638
3674
|
:keyword to: End of time range to query entitlement: date-time in RFC 3339 format. Defaults to
|
|
3639
3675
|
now.
|
|
3640
3676
|
If not now then gets truncated to the granularity of the underlying meter. Default value is
|
|
@@ -3720,8 +3756,8 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
|
|
|
3720
3756
|
_request = build_get_entitlement_history_request(
|
|
3721
3757
|
subject_id_or_key=subject_id_or_key,
|
|
3722
3758
|
entitlement_id=entitlement_id,
|
|
3723
|
-
from_parameter=from_parameter,
|
|
3724
3759
|
window_size=window_size,
|
|
3760
|
+
from_parameter=from_parameter,
|
|
3725
3761
|
to=to,
|
|
3726
3762
|
window_time_zone=window_time_zone,
|
|
3727
3763
|
headers=_headers,
|
|
@@ -2,7 +2,7 @@ openmeter/__init__.py,sha256=7klRT7LAGDqBcZsl7LGZrgrABVwyncgVUlidfaPiJm4,702
|
|
|
2
2
|
openmeter/_client.py,sha256=TIXIPi_UVO-d5BHra7_xIiKmLfZBrmc4L_Xq2gxi4lM,3982
|
|
3
3
|
openmeter/_configuration.py,sha256=CIdMxPaIXwDLaCsnvmdmHTfplV_cRp24101RJCEWtes,1807
|
|
4
4
|
openmeter/_operations/__init__.py,sha256=GVYObnS1nT-wbN8ONRxlAiH6NBeAXlOBi7olGJE9niA,682
|
|
5
|
-
openmeter/_operations/_operations.py,sha256=
|
|
5
|
+
openmeter/_operations/_operations.py,sha256=UURUKik4RHiZxRJz7_Tx1bOsh3UIjzWSr4a8k_oC-zs,200397
|
|
6
6
|
openmeter/_operations/_patch.py,sha256=ptSL-JhY1fbGT9Cw2cUkPF1TPz5qVgXwTMMT5h41XUc,4874
|
|
7
7
|
openmeter/_patch.py,sha256=P7PMm3Gbjlk56lI6B_Ra43hSW5qGMEmN3cNYGH5uZ3s,674
|
|
8
8
|
openmeter/_serialization.py,sha256=vQIv-wuCQabtiIq2DXOr7-InGADqxlXTGNEKv9OlDPs,78873
|
|
@@ -11,11 +11,11 @@ openmeter/aio/__init__.py,sha256=7klRT7LAGDqBcZsl7LGZrgrABVwyncgVUlidfaPiJm4,702
|
|
|
11
11
|
openmeter/aio/_client.py,sha256=O0VpMfw42UuTN_ZTIL3dw944PviLIrBBCSp7UaexyKQ,4100
|
|
12
12
|
openmeter/aio/_configuration.py,sha256=NtT-cxQWkt8q_FvMfwqqil18Tt9zJmWGVju4U9s7OsE,1817
|
|
13
13
|
openmeter/aio/_operations/__init__.py,sha256=GVYObnS1nT-wbN8ONRxlAiH6NBeAXlOBi7olGJE9niA,682
|
|
14
|
-
openmeter/aio/_operations/_operations.py,sha256=
|
|
14
|
+
openmeter/aio/_operations/_operations.py,sha256=LaG_mTB_2rJAmAC5IJbAcxY9pXKdrD25fZo567WLWb0,174629
|
|
15
15
|
openmeter/aio/_operations/_patch.py,sha256=P7PMm3Gbjlk56lI6B_Ra43hSW5qGMEmN3cNYGH5uZ3s,674
|
|
16
16
|
openmeter/aio/_patch.py,sha256=P7PMm3Gbjlk56lI6B_Ra43hSW5qGMEmN3cNYGH5uZ3s,674
|
|
17
17
|
openmeter/aio/_vendor.py,sha256=CFsSbXOBydpg_f_uciu6Pe6cvF__6ofZ6KFEhkaMMEU,862
|
|
18
18
|
openmeter/py.typed,sha256=dcrsqJrcYfTX-ckLFJMTaj6mD8aDe2u0tkQG-ZYxnEg,26
|
|
19
|
-
openmeter-1.0.
|
|
20
|
-
openmeter-1.0.
|
|
21
|
-
openmeter-1.0.
|
|
19
|
+
openmeter-1.0.0b99.dist-info/METADATA,sha256=kayAadV0YY0WVINqQlLeRwX8lwhLQn4pxSsMbdNaPPs,2257
|
|
20
|
+
openmeter-1.0.0b99.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
21
|
+
openmeter-1.0.0b99.dist-info/RECORD,,
|
|
File without changes
|